1

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!

KrisWebDev
  • 9,342
  • 4
  • 39
  • 59
woohooo
  • 11
  • 3

1 Answers1

1

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

tadamhicks
  • 905
  • 1
  • 14
  • 34
  • Many thanks for your answer. Then, how you go about calling this catalan stemmer? http://snowball.tartarus.org/algorithms/catalan/stemmer.html' – woohooo Mar 12 '16 at 12:46
  • woohoo, that is part of a C library. They have a man page on their site that I suggest you look at: http://snowball.tartarus.org/runtime/use.html – tadamhicks Mar 14 '16 at 17:35