diff options
author | Vlad Voicu <vladvoic@gmail.com> | 2011-11-28 16:37:32 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-09 15:03:59 (GMT) |
commit | b8f10af29258705b4610e99ba69f5ecab42ef6ae (patch) | |
tree | 9f182e47e07b5cfda70079a8e1ac9a80eaa981f1 /SwifTools/SpellChecker.h | |
parent | 0833f7da453db9cd0fc3a78c793e7532663ab86b (diff) | |
download | swift-contrib-b8f10af29258705b4610e99ba69f5ecab42ef6ae.zip swift-contrib-b8f10af29258705b4610e99ba69f5ecab42ef6ae.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_; + }; +} |