#include "AppleSpellChecker.h"
#include "WordLangTuple.h"
-#include "support/lassert.h"
#include "support/debug.h"
#include "support/docstring_list.h"
#include "support/AppleSpeller.h"
SpellChecker::Result toResult(SpellCheckResult status);
string toString(SpellCheckResult status);
int numDictionaries() const;
-
+
/// the speller
AppleSpeller speller;
-
+
/// language map
map<string, string> languageMap;
-
+
};
}
-AppleSpellChecker::AppleSpellChecker(): d(new Private)
-{
-}
+AppleSpellChecker::AppleSpellChecker()
+ : d(new Private)
+{}
AppleSpellChecker::~AppleSpellChecker()
{
suggestions.clear();
string const word_str = to_utf8(wl.word());
- size_t num = AppleSpeller_makeSuggestion(d->speller,
+ size_t num = AppleSpeller_makeSuggestion(d->speller,
word_str.c_str(), wl.lang()->code().c_str());
for (size_t i = 0; i < num; i++) {
char const * next = AppleSpeller_getSuggestion(d->speller, i);
return result;
}
-
+
int AppleSpellChecker::numMisspelledWords() const
{
return AppleSpeller_numMisspelledWords(d->speller);