>>> from nltk import word_tokenize
>>> from nltk.stem import WordNetLemmatizer
>>> wnl = WordNetLemmatizer()
>>> [wnl.lemmatize(i) for i in "the woman's going home".split()]
['the', "woman's", 'going', 'home']
>>> [wnl.lemmatize(i) for i in "the women's home is in London".split()]
['the', "women's", 'home', 'is', 'in', 'London']
在柠檬化之前,有必要标记文本。在
没有标记化:
使用标记化:
^{pr2}$相关问题 更多 >
编程相关推荐