summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladv@rosedu.org>2012-01-19 21:49:08 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-03-09 15:04:00 (GMT)
commit65679c27623512a79de7c6d92c75d1a9530fb756 (patch)
tree0f4baf79436fb592702bc6830c7b032528a0e55b /SwifTools/SpellChecker.h
parent4ba6dfe66b5898c3b7162b263b2529c534feddc1 (diff)
downloadswift-contrib-65679c27623512a79de7c6d92c75d1a9530fb756.zip
swift-contrib-65679c27623512a79de7c6d92c75d1a9530fb756.tar.bz2
Big spell checker chunk
Diffstat (limited to 'SwifTools/SpellChecker.h')
-rw-r--r--SwifTools/SpellChecker.h13
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_;
};
}