Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

How to detect supported languages? #26

Open
mahemoff opened this issue Feb 9, 2017 · 2 comments
Open

How to detect supported languages? #26

mahemoff opened this issue Feb 9, 2017 · 2 comments

Comments

@mahemoff
Copy link

mahemoff commented Feb 9, 2017

I've seen the error "not available for stemming in " for unsupported languages. Is there a way to detect all supported languages, or test if a language is supported, so this exception can be prevented?

(I guess I'll just hardcode the list for now based on https://github.com/aurelian/ruby-stemmer/tree/master/libstemmer_c/src_c)

@mahemoff
Copy link
Author

mahemoff commented Feb 9, 2017

In case it's useful for anyone, I've hard-coded them for now as follows:

STEMMABLE_LANGUAGES = Set.new %w(da en fi fr de hu it la no po es sv ro ru tr)

@aurelian
Copy link
Owner

Looks good, I think the complete list is in https://github.com/aurelian/ruby-stemmer/blob/master/libstemmer_c/libstemmer/modules.txt in case you need the encoding too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants