Type error on creating spacy document object #11493
Answered
by
rmitsch
DrZainulabdeen
asked this question in
Help: Other Questions
-
I have scraped and saved a book as txt file with utf-8 encoding but loading this file as an spacy object gives type error
I am not sure how a text file can have type error, you can download the book from https://github.com/DrZainulabdeen/FireAndBlood-CharacterAnalysis/blob/master/data/fire-and-blood.txt NER = spacy.load('en_core_web_sm')
NER.max_length = '2000000'
book_path = 'data/fire-and-blood.txt'
with open(book_path, 'r', encoding = 'utf-8') as f:
book = f.read()
book_doc = NER(book) |
Beta Was this translation helpful? Give feedback.
Answered by
rmitsch
Sep 13, 2022
Replies: 1 comment
-
Hi @DrZainulabdeen, you assigned |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
DrZainulabdeen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @DrZainulabdeen, you assigned
NER.max_length
a string value. Try running it withNER.max_length = 2000000
.