/* * Copyright (c) 2011 Vlad Voicu * Licensed under the Simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include #include #include #ifdef HAVE_HUNSPELL #include #else #define HAVE_NO_SPELL_CHECK #endif namespace Swift { SpellCheckerFactory::SpellCheckerFactory() { } SpellChecker* SpellCheckerFactory::createSpellChecker() { #ifdef HAVE_HUNSPELL //TODO(vladv): Do something smart about finding available dictionaries, // maybe a UI button to select language from available dictionaries? const char* dictPath = "/usr/share/hunspell/en_US.dic"; const char* affixPath = "/usr/share/hunspell/en_US.aff"; return new HunspellChecker(affixPath, dictPath); #endif } }