我正在执行nlp任务。我为您编写了以下代码白蚁提取物. 执行时显示错误。如果您建议解决这些错误,这将很有帮助。你知道吗
from topia.termextract import extract
from topia.termextract import tag
# Setup Term Extractor
extractor = extract.TermExtractor()
# Some sample text
text ='''
Police shut Palestinian theatre in Jerusalem.
Israeli police have shut down a Palestinian theatre in East Jerusalem.
The action, on Thursday, prevented the closing event of an international
literature festival from taking place."""
# Extract Keywords
keywords_topica = extractor(text)
print(keywords_topica)
我在googlecolab中使用python3。你知道吗
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-9a094f024dfe> in <module>()
----> 1 from topia.termextract import extract
2 from topia.termextract import tag
3 frames
/usr/local/lib/python3.6/dist-packages/zope/interface/declarations.py in implements(*interfaces)
481 # the coverage for this block there. :(
482 if PYTHON3:
--> 483 raise TypeError(_ADVICE_ERROR % 'implementer')
484 _implements("implements", interfaces, classImplements)
485
TypeError: Class advice impossible in Python3. Use the @implementer class decorator instead.
目前没有回答
相关问题 更多 >
编程相关推荐