Lovins stemmer

I've written a quicky C extension wrapper around Linh Huynh's implementation of a Lovins stemmer to make it accessible from Python. It only has one function in it, stem(), that applies the Lovins stemming algorithm on a word.

(Note to self: here's a local copy of the Porter Stemmer written by Vivake Gupta. I made a small change so that it too has a nice stem() function in the module.)

Sample usage

>>> import lovins
>>> words = 'hello this is a test of the emergency broadcast system'.split()
>>> for w in words:
...     print w, lovins.stem(w)
... 
hello hel
this th
is is
a a
test test
of of
the th
emergency emerg
broadcast broadcast
system system

Releases

Back to Python.