Is it possible to to change words like running, helping, cooks, finds and happily into run, help, cook, find and happy using nltk?
There are some stemming algorithms implemented in nltk
. It looks like Lancaster
stemming algorithm will work for you.
>>> from nltk.stem.lancaster import LancasterStemmer
>>> st = LancasterStemmer()
>>> st.stem('happily')
'happy'
>>> st.stem('cooks')
'cook'
>>> st.stem('helping')
'help'
>>> st.stem('running')
'run'
>>> st.stem('finds')
'find'