Skip to content Skip to sidebar Skip to footer

Nltk: Lemmatizer And Pos_tag

I build a Plaintext-Corpus and the next step is to lemmatize all my texts. I'm using the WordNetLemmatizer and need the pos_tag for each token in order to do not get the Problem th

Solution 1:

You need to convert the tag from the pos_tagger to one of the four "syntactic categories" that wordnet recognizes, then pass that to the lemmatizer as the word_pos.

From the docs:

Syntactic category: n for noun files, v for verb files, a for adjective files, r for adverb files.

Post a Comment for "Nltk: Lemmatizer And Pos_tag"