diff options
author | Vlad Voicu <vladvoic@gmail.com> | 2011-11-28 16:37:32 (GMT) |
---|---|---|
committer | vlad <vlad@tyrion.(none)> | 2012-10-13 13:55:44 (GMT) |
commit | 4ef710cfcc4aa4f171426ef55cbece00cd69af62 (patch) | |
tree | 243974bc3ae35199d7e4317bc737552e1a2a6f0b /SwifTools/SpellChecker.h | |
parent | 3cf3828562d54db0ddaacfcea755b15c5b8c5e90 (diff) | |
download | swift-contrib-4ef710cfcc4aa4f171426ef55cbece00cd69af62.zip swift-contrib-4ef710cfcc4aa4f171426ef55cbece00cd69af62.tar.bz2 |
Initial, buggy version of a minimal spell-checker
Diffstat (limited to 'SwifTools/SpellChecker.h')
-rw-r--r-- | SwifTools/SpellChecker.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/SwifTools/SpellChecker.h b/SwifTools/SpellChecker.h new file mode 100644 index 0000000..3a9ff38 --- /dev/null +++ b/SwifTools/SpellChecker.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2011 Voicu Vlad + * Licensed under the Simplified BSD license. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#include <vector> +#include <boost/algorithm/string.hpp> + +#pragma once + +class AspellSpeller; +class AspellConfig; + +namespace Swift { + class SpellChecker { + public: + SpellChecker(); + bool isCorrect(const std::string& word); + void getSuggestions(const std::string& word, std::vector<std::string>& list); + private: + AspellSpeller* speller_; + AspellConfig* config_; + }; +} |