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'