-
Book Overview & Buying
-
Table Of Contents
Python Text Processing with NLTK 2.0 Cookbook: LITE
By :
Stemming is a technique for removing affixes from a word, ending up with the stem. For example, the stem of "cooking" is "cook", and a good stemming algorithm knows that the "ing" suffix can be removed. Stemming is most commonly used by search engines for indexing words. Instead of storing all forms of a word, a search engine can store only the stems, greatly reducing the size of index while increasing retrieval accuracy.
One of the most common stemming algorithms is the Porter Stemming Algorithm, by Martin Porter. It is designed to remove and replace well known suffixes of English words, and its usage in NLTK will be covered next.
The resulting stem is not always a valid word. For example, the stem of "cookery" is "cookeri". This is a feature, not a bug.
NLTK comes with an implementation of the Porter Stemming Algorithm, which is very easy to use. Simply instantiate the PorterStemmer class and call the...
Change the font size
Change margin width
Change background colour