Package org.apache.lucene.analysis.hunspell

Examples of org.apache.lucene.analysis.hunspell.Dictionary


        this.hunspellDir = resolveHunspellDirectory(settings, env);
        this.defaultIgnoreCase = settings.getAsBoolean(HUNSPELL_IGNORE_CASE, false);
        dictionaries = CacheBuilder.newBuilder().build(new CacheLoader<String, Dictionary>() {
            @Override
            public Dictionary load(String locale) throws Exception {
                Dictionary dictionary = knownDictionaries.get(locale);
                if (dictionary == null) {
                    dictionary = loadDictionary(locale, settings, env);
                }
                return dictionary;
            }
View Full Code Here


                dicStreams.add(new FileInputStream(dicFiles[i]));
            }

            affixStream = new FileInputStream(affixFiles[0]);

            return new Dictionary(affixStream, dicStreams, ignoreCase);

        } catch (Exception e) {
            logger.error("Could not load hunspell dictionary [{}]", e, locale);
            throw e;
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.lucene.analysis.hunspell.Dictionary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.