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

type SwedishStemmer

source code

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

The Swedish Snowball stemmer.


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

Instance Methods [hide private]
unicode
stem(self, word)
Stem a Swedish 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 Swedish vowels.
unicode __s_ending = u'bcdfghjklmnoprtvy'
Letters that may directly appear before a word final 's'.
tuple __step1_suffixes = (u'heterna', u'hetens', u'heter', u'heten',...
Suffixes to be deleted in step 1 of the algorithm.
tuple __step2_suffixes = (u'dd', u'gd', u'nn', u'dt', u'gt', u'kt', ...
Suffixes to be deleted in step 2 of the algorithm.
tuple __step3_suffixes = (u'fullt', u'löst', u'els', u'lig', u'ig')
Suffixes to be deleted in step 3 of the algorithm.
Method Details [hide private]

stem(self, word)

source code 

Stem a Swedish 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'heterna',
 u'hetens',
 u'heter',
 u'heten',
 u'anden',
 u'arnas',
 u'ernas',
 u'ornas',
...

__step2_suffixes

Suffixes to be deleted in step 2 of the algorithm.
Type:
tuple
Value:
(u'dd', u'gd', u'nn', u'dt', u'gt', u'kt', u'tt')