Reputation: 45
I an trying to initialize FrenchStemmer
:
stemmer = nltk.stem.FrenchStemmer('french')
and the error is:
AttributeError: 'module' object has no attribute 'FrenchStemmer'
Has anyone seen this error before?
Upvotes: 1
Views: 2994
Reputation: 2475
That's because nltk.stem has no module called as FrenchStemmer.
The French stemmer available is in SnowballStemmer() and you can access it by
import nltk
stemmer=nltk.stem.SnowballStemmer('french')
or by
import nltk
stemmer=nltk.stem.snowball.FrenchStemmer()
Upvotes: 4