Tried installing the latest developer version of textacy in the master, by cloning the git into local directory and using pip install -e
Imported textacy.spacier.utils.make_doc_from_text_chunks (couldn't wait for 0.6.2) and used it with add text to Corpus
Got this error
UnboundLocalError Traceback (most recent call last)
<ipython-input-8-cbd2470b16ae> in <module>()
7 for i in np.arange(len(flat_corpus)):
8 if len(flat_corpus[i]) >= long_texts:
----> 9 doc = textacy.spacier.utils.make_doc_from_text_chunks(flat_corpus[i], english, chunk_size=100000)
10 corpus.add_text(doc)
11 else:
c:\users\gdev\documents\research\nlp\textacy\textacy\spacier\utils.py in make_doc_from_text_chunks(text, lang, chunk_size)
66 # iterate over text chunks and accumulate components needed to make a doc
67 while i < text_len:
---> 68 chunk_doc = spacy_lang(text[i: i + chunk_size])
69 words.extend(tok.text for tok in chunk_doc)
70 spaces.extend(bool(tok.whitespace_) for tok in chunk_doc)
UnboundLocalError: local variable 'spacy_lang' referenced before assignment
platform: win32
python: 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
Tried installing the latest developer version of textacy in the master, by cloning the git into local directory and using pip install -e Imported textacy.spacier.utils.make_doc_from_text_chunks (couldn't wait for 0.6.2) and used it with add text to Corpus
Got this error