this.name = name;
this.locale = settings.get("locale", "en_US");
this.ignoreCase = settings.getAsBoolean("ignoreCase", Boolean.TRUE);
this.dedup = settings.getAsBoolean("dedup", Boolean.TRUE);
if (!locales.contains(locale)) {
throw new ElasticSearchException("invalid locale '" + locale + "' for hunspell aff/dic");
}
try {
InputStream affixStream = HunspellStemFilterFactory.class.getResourceAsStream(locale + ".aff");
InputStream dictStream = HunspellStemFilterFactory.class.getResourceAsStream(locale + ".dic");
this.dictionary = new HunspellDictionary(affixStream, dictStream, version, ignoreCase);