user638564
user638564

Reputation: 45

ntlk python frenchStemmer

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

Answers (1)

Mevin Babu
Mevin Babu

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

Related Questions