Could anyone point me to a solution/lib to instead of lemmatise, to do inflection(?). And for multiple languages (English, Dutch, German and French).
Or to give an example. I have the lemma 'science' for which I need the words 'sciences', 'scientific', 'scientifically'... returned. So plural and adjectives.
I looked into NLTK (cf Wordnet and Spacy), but did not find a solution.
You can invert a
lemmatisefunction by applying it to every word in the Scrabble dictionary, and grouping words with a common stem in a python dict.Of course the groups will strongly depend on the
lemmatisefunction you have. Below, I usenltk.stem.WordNetLemmatizer.lemmatize, which correctly groups'science'and'sciences'under the same stem'science', but doesn't group'scientific'with them.So you'll need a more "brutal" lemmatise function that brings more words to the same stem.