about summary refs log tree commit diff stats
path: root/kgramstats.h
diff options
context:
space:
mode:
authorFeffernoose <fefferburbia@gmail.com>2013-10-01 18:15:22 -0400
committerFeffernoose <fefferburbia@gmail.com>2013-10-01 18:15:22 -0400
commit8de3134bf2cd26ff81359df703e5fbc6280448d7 (patch)
tree325e99abac6b7e3316334af7961645e9381e6517 /kgramstats.h
parent2b1f8c3363ef667bc20f33bbb5a856a35f2591ba (diff)
downloadrawr-ebooks-8de3134bf2cd26ff81359df703e5fbc6280448d7.tar.gz
rawr-ebooks-8de3134bf2cd26ff81359df703e5fbc6280448d7.tar.bz2
rawr-ebooks-8de3134bf2cd26ff81359df703e5fbc6280448d7.zip
Wrote program
Diffstat (limited to 'kgramstats.h')
-rw-r--r--kgramstats.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/kgramstats.h b/kgramstats.h new file mode 100644 index 0000000..069bb90 --- /dev/null +++ b/kgramstats.h
@@ -0,0 +1,28 @@
1#include <string>
2#include <map>
3#include <list>
4#include <vector>
5
6using namespace::std;
7
8#ifndef KGRAMSTATS_H
9#define KGRAMSTATS_H
10
11typedef list<string> kgram;
12
13class kgramstats
14{
15public:
16 kgramstats(string corpus, int maxK);
17 map<string, int>* lookupExts(kgram tk);
18 int getMaxK();
19 vector<string> randomSentence(int n);
20
21private:
22 int maxK;
23 map<kgram, map<string, int>* >* stats;
24};
25
26void printKgram(kgram k);
27
28#endif \ No newline at end of file