chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.22k stars 250 forks source link

module 'textacy.spacier' has no attribute 'utils' #193

Closed iliuhin closed 6 years ago

iliuhin commented 6 years ago

Hi,

I installed Textacy using Conda: $ conda install -c conda-forge textacy

I was planning to use the method: textacy.spacier.utils.make_doc_from_text_chunks(text, "en", chunk_size=100000), "To split a (long) text into more manageable chunks"

But i receive the error: module 'textacy.spacier' has no attribute 'utils'

I did try the following imports: import textacy from textacy.spacier import* from textacy.spacier import utils import textacy.utils

When i run dir(textacy) i have the following list: ['Corpus', 'Doc', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__resources_dir__', '__spec__', '__version__', 'absolute_import', 'compat', 'constants', 'corpora', 'corpus', 'data', 'doc', 'export', 'extract', 'fileio', 'keyterms', 'lexicon_methods', 'load_spacy', 'logger', 'logging', 'math_utils', 'network', 'os', 'pkgutil', 'preprocess', 'preprocess_text', 'similarity', 'spacier', 'spacy_pipelines', 'spacy_utils', 'text_stats', 'text_utils', 'tm', 'utils', 'viz', 'vsm']

I think the problem is the textacy installed version, but how can I upgrade to the latest one (0.6.1), while I'm using conda?

Update:

bdewilde commented 6 years ago

Hi @iliuhin , the make_docs_from_text_chunks() function only got added in the last couple days, and hasn't been released yet; you're welcome to install the latest dev version from the master branch and use it, if you're feeling adventurous. I don't know much about developing with conda or on WIndows, but: I can see from this page that only the linux version has been getting updated with new versions. I'll submit an issue on the textacy feedstock repo to find out how to resolve this.

bdewilde commented 6 years ago

Hi again, the maintainer of the textacy conda feedstock has pushed a fix, and now I see that Windows has v0.6.1. Please try updating to this newest version. Again, make_docs_from_text_chunks() is brand new and not yet released, but it'll be included in v0.6.2 for Linux, Windows, and OSX.