本文介绍了Nltk中的WordNetLemmatizer可以阻止单词吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Wordnet查找词干. wordnet是否具有阻止功能?我使用此导入功能来进行阻止,但无法按预期进行.

I want to find word stems with Wordnet. Does wordnet have a function for stemming? I use this import for my stemming, but it doesn't work as expected.

from nltk.stem.wordnet import WordNetLemmatizer
WordNetLemmatizer().lemmatize('Having','v')

推荐答案

尝试在 nltk.stem 模块,例如 PorterStemmer .这是NLTK词干的在线演示: http://text-processing.com/demo/stem/

Try using one of the stemmers in nltk.stem module, such as the PorterStemmer. Here's an online demo of NLTK's stemmers: http://text-processing.com/demo/stem/

这篇关于Nltk中的WordNetLemmatizer可以阻止单词吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 08:04