Natural Language Analysis - WordNetLemmatizer isn't working

Viewed 24

I have used this code to apply Lemmatizations to my training df. I have 3 columns: label, article_title and article_text. I have cleaned the the second too(lower case, remove punct and removed stopwords). This code however leaves some words the same? Like examining is examining not examine for example.

lemmatizer = WordNetLemmatizer()`

def lemmatize_text(text):
lemmatizer = WordNetLemmatizer()
return [lemmatizer.lemmatize(w) for w in text]
train['article_title_lemma']=train['article_title_stopwords'].apply(lemmatize_text)
train['article_text_lemma']=train['article_text_stopwords'].apply(lemmatize_text)`
0 Answers
Related