Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 NLTK 和 Python 学习自然语言处理(英语)。有没有办法在 POS 标记期间或之后获得动词的不定式形式。
例如:
关闭,您需要在开头添加“to”:
>>> from nltk.stem.wordnet import WordNetLemmatizer >>> lemmatizer = WordNetLemmatizer() >>> lemmatizer.lemmatize('is', 'v') 'be' >>> lemmatizer.lemmatize('provided', 'v') 'provide' >>> lemmatizer.lemmatize('using', 'v') 'use'