#NEWLINE# def set_stemmer_language( language ) : #NEWLINE# #INDENT# global STEMMER #NEWLINE# if ( not ( language in LANGUAGES ) ) : #NEWLINE# #INDENT# raise ValueError ( ( ( 'Valid languages are danish, dutch, english, finnish,' + ' french, german, hungarian, italian, norwegian, porter, portuguese,' ) + 'romanian, russian, spanish, swedish' ) ) #NEWLINE# #UNINDENT# STEMMER = SnowballStemmer ( language )