about summary refs log tree commit diff stats
path: root/kgramstats.h
blob: 248b193c41e882010560231fc59285f84bef6dcc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <string>
#include <map>
#include <list>
#include <vector>

using namespace::std;

#ifndef KGRAMSTATS_H
#define KGRAMSTATS_H

typedef list<string> kgram;

class kgramstats
{
public:
	kgramstats(string corpus, int maxK);
	vector<string> randomSentence(int n);
	
private:
	typedef struct
	{
		int all;
		int titlecase;
		int uppercase;
		int period;
	} token_data;
	int maxK;
	map<kgram, map<string, token_data*>* >* stats;
};

void printKgram(kgram k);
std::string canonize(std::string f);

#endif