Package nltk :: Package stem :: Module snowball :: Class NorwegianStemmer
[hide private]
[frames] | no frames]

type NorwegianStemmer

source code

          object --+            
                   |            
        api.StemmerI --+        
                       |        
_LanguageSpecificStemmer --+    
                           |    
        _ScandinavianStemmer --+
                               |
                              NorwegianStemmer

The Norwegian Snowball stemmer.


Note: A detailed description of the Norwegian stemming algorithm can be found under http://snowball.tartarus.org/algorithms /norwegian/stemmer.html.

Instance Methods [hide private]
unicode
stem(self, word)
Stem a Norwegian word and return the stemmed form.
source code

Inherited from _ScandinavianStemmer (private): _r1_scandinavian

Inherited from _LanguageSpecificStemmer: __init__, __repr__

Class Variables [hide private]
unicode __vowels = u'aeiouyæåø'
The Norwegian vowels.
unicode __s_ending = u'bcdfghjlmnoprtvyz'
Letters that may directly appear before a word final 's'.
tuple __step1_suffixes = (u'hetenes', u'hetene', u'hetens', u'heter'...
Suffixes to be deleted in step 1 of the algorithm.
tuple __step2_suffixes = (u'dt', u'vt')
Suffixes to be deleted in step 2 of the algorithm.
tuple __step3_suffixes = (u'hetslov', u'eleg', u'elig', u'elov', u's...
Suffixes to be deleted in step 3 of the algorithm.
Method Details [hide private]

stem(self, word)

source code 

Stem a Norwegian word and return the stemmed form.

Parameters:
  • word (str, unicode) - The word that is stemmed.
Returns: unicode
The stemmed form.
Overrides: api.StemmerI.stem

Class Variable Details [hide private]

__step1_suffixes

Suffixes to be deleted in step 1 of the algorithm.
Type:
tuple
Value:
(u'hetenes',
 u'hetene',
 u'hetens',
 u'heter',
 u'heten',
 u'endes',
 u'ande',
 u'ende',
...

__step3_suffixes

Suffixes to be deleted in step 3 of the algorithm.
Type:
tuple
Value:
(u'hetslov',
 u'eleg',
 u'elig',
 u'elov',
 u'slov',
 u'leg',
 u'eig',
 u'lig',
...