about summary refs log tree commit diff stats
path: root/malaprop.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-09-11 02:47:25 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-09-11 02:47:25 -0400
commit4a02cefc939c8b35353927fa0276b267996902d5 (patch)
tree7fd76dc9867bf117a6b6369cb73c3551c4c8dff0 /malaprop.h
parentaf41efa7c49fb8beec4484f67fd485621abe7169 (diff)
downloadrawr-ebooks-4a02cefc939c8b35353927fa0276b267996902d5.tar.gz
rawr-ebooks-4a02cefc939c8b35353927fa0276b267996902d5.tar.bz2
rawr-ebooks-4a02cefc939c8b35353927fa0276b267996902d5.zip
Removed legacy malaprop code
Diffstat (limited to 'malaprop.h')
-rw-r--r--malaprop.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/malaprop.h b/malaprop.h deleted file mode 100644 index 91a18eb..0000000 --- a/malaprop.h +++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef MALAPROP_H_8F382336
2#define MALAPROP_H_8F382336
3
4#include <string>
5#include <map>
6#include <set>
7
8class malaprop
9{
10public:
11 void addWord(std::string word);
12 void stats();
13 std::string alternate(std::string word);
14
15private:
16 struct soundex {
17 char prefix;
18 int code;
19
20 bool operator<(const soundex& other) const
21 {
22 return (prefix < other.prefix) || (code < other.code);
23 }
24 };
25
26 std::map<soundex, std::set<std::string> > dict;
27
28 soundex soundify(std::string l);
29};
30
31#endif /* end of include guard: MALAPROP_H_8F382336 */