You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AttributeError Traceback (most recent call last)
in ()
----> 1 from harvesttext import HarvestText
2 ht = HarvestText()
D:\python\lib\site-packages\harvesttext_init_.py in ()
2 #!/usr/bin/env python
3 import pickle
----> 4 from .harvesttext import HarvestText
5 from .resources import *
6
D:\python\lib\site-packages\harvesttext\harvesttext.py in ()
21 from .sentiment import SentimentMixin
22 from .summary import SummaryMixin
---> 23 from .word_discover import WordDiscoverMixin
24 from .resources import get_baidu_stopwords
25
D:\python\lib\site-packages\harvesttext\word_discover.py in ()
9 from .resources import get_baidu_stopwords
10 from .algorithms.word_discoverer import WordDiscoverer
---> 11 from .algorithms.entity_discoverer import NFLEntityDiscoverer, NERPEntityDiscover
12 from .algorithms.keyword import textrank
13
D:\python\lib\site-packages\harvesttext\algorithms\entity_discoverer.py in ()
9 from collections import defaultdict
10 from sklearn.metrics.pairwise import cosine_similarity
---> 11 from gensim.models import FastText
12
13 class NERPEntityDiscover:
D:\python\lib\site-packages\gensim\models_init_.py in ()
20 from .atmodel import AuthorTopicModel # noqa:F401
21 from .ldaseqmodel import LdaSeqModel # noqa:F401
---> 22 from .fasttext import FastText # noqa:F401
23 from .translation_matrix import TranslationMatrix, BackMappingTranslationMatrix # noqa:F401
24
D:\python\lib\site-packages\gensim\models\fasttext.py in ()
322
323
--> 324 class FastText(BaseWordEmbeddingsModel):
325 """Train, use and evaluate word representations learned using the method
326 described in Enriching Word Vectors with Subword Information <https://arxiv.org/abs/1607.04606>_, aka FastText.
D:\python\lib\site-packages\gensim\models\fasttext.py in FastText()
494
495 @Property
--> 496 @gensim.utils.deprecated("Attribute will be removed in 4.0.0, use wv.min_n instead")
497 def min_n(self):
498 return self.wv.min_n
AttributeError: module 'gensim' has no attribute 'utils'
我已经仔细查看过本库的README和之前的Issues,没有发现解决方案。
问题描述
安装出现以下问题
AttributeError Traceback (most recent call last)
in ()
----> 1 from harvesttext import HarvestText
2 ht = HarvestText()
D:\python\lib\site-packages\harvesttext_init_.py in ()
2 #!/usr/bin/env python
3 import pickle
----> 4 from .harvesttext import HarvestText
5 from .resources import *
6
D:\python\lib\site-packages\harvesttext\harvesttext.py in ()
21 from .sentiment import SentimentMixin
22 from .summary import SummaryMixin
---> 23 from .word_discover import WordDiscoverMixin
24 from .resources import get_baidu_stopwords
25
D:\python\lib\site-packages\harvesttext\word_discover.py in ()
9 from .resources import get_baidu_stopwords
10 from .algorithms.word_discoverer import WordDiscoverer
---> 11 from .algorithms.entity_discoverer import NFLEntityDiscoverer, NERPEntityDiscover
12 from .algorithms.keyword import textrank
13
D:\python\lib\site-packages\harvesttext\algorithms\entity_discoverer.py in ()
9 from collections import defaultdict
10 from sklearn.metrics.pairwise import cosine_similarity
---> 11 from gensim.models import FastText
12
13 class NERPEntityDiscover:
D:\python\lib\site-packages\gensim_init_.py in ()
3 """
4
----> 5 from gensim import parsing, corpora, matutils, interfaces, models, similarities, summarization, utils # noqa:F401
6 import logging
7
D:\python\lib\site-packages\gensim\models_init_.py in ()
20 from .atmodel import AuthorTopicModel # noqa:F401
21 from .ldaseqmodel import LdaSeqModel # noqa:F401
---> 22 from .fasttext import FastText # noqa:F401
23 from .translation_matrix import TranslationMatrix, BackMappingTranslationMatrix # noqa:F401
24
D:\python\lib\site-packages\gensim\models\fasttext.py in ()
322
323
--> 324 class FastText(BaseWordEmbeddingsModel):
325 """Train, use and evaluate word representations learned using the method
326 described in
Enriching Word Vectors with Subword Information <https://arxiv.org/abs/1607.04606>
_, aka FastText.D:\python\lib\site-packages\gensim\models\fasttext.py in FastText()
494
495 @Property
--> 496 @gensim.utils.deprecated("Attribute will be removed in 4.0.0, use wv.min_n instead")
497 def min_n(self):
498 return self.wv.min_n
AttributeError: module 'gensim' has no attribute 'utils'
操作系统:
win10
python版本:3.7
HarvestText版本:0.8.1.1
genism版本:3.8.3
请问下这个如何解决?
The text was updated successfully, but these errors were encountered: