Issues with NLTK lemmatizer (WordNet) I want to lemmatize set of plural keywords automatically such as 'Web based technologies', 'Information systems' etc. I want to transform them to to 'Web based technology', 'Information system' respectively.

I tried NLTK as follows

from nltk.stem import WordNetLemmatizer

lemmatizer = WordNetLemmatizer()

print(lemmatizer.lemmatize("Web based technologies"))


Even though this perform fine for words such as 'cats' to 'cat', for the keywords I have mentioned I get the same plural form. Any idea how to solve this? Or are there any other tools/APIs that I can make use of?

P.S. Given the keywords I only want to get the singular term of it
As far as I know the nltk lemmatizer works on words or rather ngrams. Your example is a trigram, an easier way to work through this is:

word="web based technologies"
splits=word.split()
word=" ".join(lemmatizer.lemmatize(w) for w in splits)