Package nltk :: Package stem
[hide private]
[frames] | no frames]

Source Code for Package nltk.stem

 1  # Natural Language Toolkit: Stemmers 
 2  # 
 3  # Copyright (C) 2001-2008 NLTK Project 
 4  # Author: Trevor Cohn <[email protected]> 
 5  #         Edward Loper <[email protected]> 
 6  #         Steven Bird <[email protected]> 
 7  # URL: <http://nltk.org> 
 8  # For license information, see LICENSE.TXT 
 9   
10  """ 
11  Interfaces used to remove morphological affixes from words, leaving 
12  only the word stem.  Stemming algorithms aim to remove those affixes 
13  required for eg. grammatical role, tense, derivational morphology 
14  leaving only the stem of the word.  This is a difficult problem due to 
15  irregular words (eg. common verbs in English), complicated 
16  morphological rules, and part-of-speech and sense ambiguities 
17  (eg. C{ceil-} is not the stem of C{ceiling}). 
18   
19  C{StemmerI} defines a standard interface for stemmers. 
20  """ 
21   
22  from api import * 
23  from regexp import * 
24  from porter import * 
25  from lancaster import * 
26  from wordnet import * 
27  from rslp import * 
28   
29  __all__ = [ 
30      # Stemmer interface 
31      'StemmerI', 
32   
33      # Stemmers 
34      'RegexpStemmer', 'PorterStemmer', 'LancasterStemmer', 
35      'WordnetStemmer', 'RSLPStemmer' 
36      ] 
37   
38  ###################################################################### 
39  #{ Deprecated 
40  ###################################################################### 
41  from nltk.internals import Deprecated 
42 -class StemI(StemmerI, Deprecated):
43 """Use nltk.StemmerI instead."""
44 -class Regexp(RegexpStemmer, Deprecated):
45 """Use nltk.RegexpStemmer instead."""
46 -class Porter(PorterStemmer, Deprecated):
47 """Use nltk.PorterStemmer instead."""
48 -class Lancaster(LancasterStemmer, Deprecated):
49 """Use nltk.LancasterStemmer instead."""
50 -class Wordnet(WordnetStemmer, Deprecated):
51 """Use nltk.WordnetStemmer instead."""
52