【发布时间】:2020-04-19 19:07:26
【问题描述】:
我已经成功安装py-thesaurus-1.0.5
但...
当我尝试使用它时,它什么也没显示...
from py_thesaurus import Thesaurus
input_word = "cheap"
new_instance = Thesaurus(input_word)
# Get the synonyms according to part of speech
# Default part of speech is noun
print(new_instance.get_synonym())
print(new_instance.get_synonym(pos='verb'))
print(new_instance.get_synonym(pos='adj'))
# Get the definitions
print(new_instance.get_definition())
# Get the antonyms
print(new_instance.get_antonym())
输出是:
[] [] [] Give a non-empty argument [] []
【问题讨论】:
标签: python nlp python-import