[R] Usage of SnowballStemmer for German

Sascha Wolfer sascha at cognition.uni-freiburg.de
Tue Sep 15 12:32:20 CEST 2009


Dear List,

I tried to use the SnowballStemmer function in the package "Snowball".  
It works, but obviously it uses English as its default language and I  
can't figure out how to change the language. SnowballStemmer takes 2  
args: a character vector with the words to be stemmed and "control =  
NULL":

"an object of class Weka_control, or a character vector of control  
options, or NULL (default). Available options can be obtained on-line  
using the Weka Option Wizard WOW, or the Weka documentation."

 > WOW(SnowballStemmer)
returns

-S      The name of the snowball stemmer (default 'porter').   
available stemmers: danish, dutch,
         english, finnish, french, german, hungarian, italian,  
norwegian, porter, portuguese,
         russian, spanish, swedish
	Number of arguments: 1.

So I tried stuff like
 > SnowballStemmer(<character vector with words in it>, "-S german")
but the result doesn't change, the stemming language is obviously  
english.

Could anyone help me out on this?

Thanks.




More information about the R-help mailing list