我在这里为阿拉伯语安装了这个词干分析器。我用这段代码运行它:
from snowballstemmer import stemmer
ar_stemmer = stemmer("arabic")
ar_stemmer.stemWord(u"فسميتموها")
当我运行它时,我得到了这个:
Traceback (most recent call last):
File "C:\Users\CLIENT\Desktop\snowballstemmer-1.1.0.tar\snowballstemmer- 1.1.0\stemmer.py", line 9, in <module>
ar_stemmer = stemmer("arabic")
File "C:\Anaconda2\lib\site-packages\snowballstemmer\__init__.py", line 57, in stemmer
raise KeyError("Stemming algorithm '%s' not found" % lang)
KeyError: "Stemming algorithm 'arabic' not found"