diff options
| author | Vlad Voicu <vladv@rosedu.org> | 2012-01-19 21:49:08 (GMT) |
|---|---|---|
| committer | vlad <vlad@tyrion.(none)> | 2012-10-13 13:55:44 (GMT) |
| commit | eca3a097403adbd85fe3b0cf366f29ecc37cacc6 (patch) | |
| tree | dbc86052c3c5e8f98eee56af06b20d79261d27f0 /SwifTools/SpellChecker.h | |
| parent | 66d6e33635a22bfdfdd82ffab1b1693aa77f6181 (diff) | |
| download | swift-contrib-eca3a097403adbd85fe3b0cf366f29ecc37cacc6.zip swift-contrib-eca3a097403adbd85fe3b0cf366f29ecc37cacc6.tar.bz2 | |
Big spell checker chunk
Diffstat (limited to 'SwifTools/SpellChecker.h')
| -rw-r--r-- | SwifTools/SpellChecker.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/SwifTools/SpellChecker.h b/SwifTools/SpellChecker.h index a7272e9..a9cbe77 100644 --- a/SwifTools/SpellChecker.h +++ b/SwifTools/SpellChecker.h @@ -4,7 +4,10 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +#include <SwifTools/SpellParser.h> + #include <boost/algorithm/string.hpp> +#include <boost/tuple/tuple.hpp> #include <vector> #pragma once @@ -12,8 +15,16 @@ namespace Swift { class SpellChecker { public: - virtual ~SpellChecker() { }; + SpellChecker() { + parser_ = new SpellParser(); + } + virtual ~SpellChecker() { + delete parser_; + }; virtual bool isCorrect(const std::string& word) = 0; virtual void getSuggestions(const std::string& word, std::vector<std::string>& list) = 0; + virtual void checkFragment(const std::string& fragment, PositionPairVector& misspelledPositions) = 0; + protected: + SpellParser *parser_; }; } |
Swift