blob: c517b7208985498dc995980a214fb6017b8e86c3 (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#if !defined (_HEADER_SUFFIX_ARRAY_SCANNING_BASE_CLASS_)
#define _HEADER_SUFFIX_ARRAY_SCANNING_BASE_CLASS_
#include "_SuffixArrayApplicationBase.h"
/**
* \ingroup scan
* C_SuffixArrayScanningBase class provides functions to scan through an indexed corpus
* and output information such as the type/token frequency of the data
* Revision $Rev: 3794 $
* Last Modified $LastChangedDate: 2007-06-29 02:17:32 -0400 (Fri, 29 Jun 2007) $
**/
class C_SuffixArrayScanningBase : public C_SuffixArrayApplicationBase
{
public:
void setNgramOutputFreqThresh(int n, unsigned int freqThresh);
void scanSuffixArrayForHighFreqNgramType();
void scanSuffixArrayForCountofCounts(int maxFreqConsidered);
void scanSuffixArrayForTypeToken();
C_SuffixArrayScanningBase(const char * filename, unsigned int maxN);
C_SuffixArrayScanningBase();
~C_SuffixArrayScanningBase();
protected:
void setParam_maxFreqConsidered(int maxFreqConsidered);
void constructCountOfCountsTable();
void initializeForScanning(const char * filename, unsigned int maxN);
int maxN;
int maxFreqConsidered;
unsigned int * countOfCountsTable;
IndexType vocIdForSentStart;
IndexType vocIdForSentEnd;
IndexType vocIdForCorpusEnd;
private:
void scanSuffixArray(char actionType);
S_nGramScanningInfoElement * nGramScanningList;
unsigned int * typeFreq;
unsigned int * tokenFreq;
};
#endif
|