woohooo
woohooo

Reputation: 11

how to use snowball's catalan stemmer?

I want to use the catalan stemmer provided in here: http://snowball.tartarus.org/algorithms/catalan/stemmer.html

However, when I do:

from nltk.stem.snowball import SnowballStemmer   
stemmer = SnowballStemmer("catalan")

it says:

the language Catalan is not supported

could anybody help me? what am I doing wrong?

for Spanish it does work when I type:

from nltk.stem.snowball import SnowballStemmer
stemmer = SnowballStemmer("spanish")

Many thanks!

Upvotes: 1

Views: 925

Answers (1)

tadamhicks
tadamhicks

Reputation: 925

You are not doing anything wrong. Supported languages for the SnowballStemmer are found inside the source code, and do not include Catalan:

class SnowballStemmer(StemmerI):

    """
    Snowball Stemmer

    The following languages are supported:
    Danish, Dutch, English, Finnish, French, German,
    Hungarian, Italian, Norwegian, Portuguese, Romanian, Russian,
    Spanish and Swedish.

Found here: http://www.nltk.org/_modules/nltk/stem/snowball.html

Upvotes: 1

Related Questions