I am working with lemmatizers in python and it is interesting. I am testing how it works with word like 'does', 'did','are', 'is'. I got the right base word but I noticed the "u'" it stick in from of those words
from nltk.stem.wordnet import WordNetLemmatizer
tokens = ['did', 'does', 'do', "doesn't",'are', 'is', 'splendid']
lemm = WordNetLemmatizer()
tokens2 = [lemm.lemmatize(i, 'v') for i in tokens]
print tokens
print tokens2
Output:
['did', 'does', 'do', "doesn't", 'are', 'is', 'splendid']
[u'do', u'do', 'do', "doesn't", u'be', u'be', 'splendid']
How can I get rid of "u'" so that it reads
['do', 'do', 'do', "doesn't", 'be', 'be', 'splendid']
Thank you very much