Closed aurora1625 closed 4 years ago
Hi @aurora1625, the resources
sub-package isn't imported at the top-level of textacy
, so you need to import it specifically:
In [1]: import textacy
In [2]: textacy.resources
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-346557c6846d> in <module>
----> 1 textacy.resources
AttributeError: module 'textacy' has no attribute 'resources'
In [3]: import textacy.resources
In [4]: textacy.resources.DepecheMood()
Out[4]: Resource('depeche_mood')
I'll update the docs if they suggest otherwise.
Hi I try to use depechemood, after downloading the resource with
python -m textacy download depeche_mood
Then I try to install it.
rs = textacy.resources.DepecheMood(lang="en", word_rep="lemmapos")
I come across the following behaviour.
environment
{'platform': 'darwin', 'python': '3.7.5 (default, Oct 25 2019, 10:52:18) \n[Clang 4.0.1 (tags/RELEASE_401/final)]', 'spacy': '2.0.16', 'spacy_models': ['en_core_web_lg', 'en_core_web_sm'], 'textacy': '0.9.1'}
spacy
version: 2.0.16textacy
version: 0.9.1Could anyone offer some help?
Thanks!