Diffstat (limited to 'inputmethods/dasher/PPMLanguageModel.h') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/dasher/PPMLanguageModel.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/inputmethods/dasher/PPMLanguageModel.h b/inputmethods/dasher/PPMLanguageModel.h index bd860b8..7025a0a 100644 --- a/inputmethods/dasher/PPMLanguageModel.h +++ b/inputmethods/dasher/PPMLanguageModel.h | |||
@@ -13,22 +13,22 @@ | |||
13 | #include "MSVC_Unannoy.h" | 13 | #include "MSVC_Unannoy.h" |
14 | #include <vector> | 14 | #include <vector> |
15 | #include <stdio.h> | 15 | #include <stdio.h> |
16 | 16 | ||
17 | #include "LanguageModel.h" | 17 | #include "LanguageModel.h" |
18 | 18 | ||
19 | static char dumpTrieStr[40000]; | 19 | // static char dumpTrieStr[40000]; |
20 | const int MAX_ORDER = 5; | 20 | const int MAX_ORDER = 5; |
21 | const int maxcont =200; | 21 | const int maxcont =200; |
22 | 22 | ||
23 | namespace Dasher {class CPPMLanguageModel;} | 23 | namespace Dasher {class CPPMLanguageModel;} |
24 | class Dasher::CPPMLanguageModel : public Dasher::CLanguageModel, private NoClones | 24 | class Dasher::CPPMLanguageModel : public Dasher::CLanguageModel, private NoClones |
25 | { | 25 | { |
26 | public: | 26 | public: |
27 | CPPMLanguageModel(CAlphabet *_alphabet, int _normalization); | 27 | CPPMLanguageModel(CAlphabet *_alphabet, int _normalization); |
28 | ~CPPMLanguageModel(); | 28 | virtual ~CPPMLanguageModel(); |
29 | 29 | ||
30 | class CPPMnode { | 30 | class CPPMnode { |
31 | public: | 31 | public: |
32 | CPPMnode* find_symbol(int sym); | 32 | CPPMnode* find_symbol(int sym); |
33 | CPPMnode* add_symbol_to_node(int sym,int *update); | 33 | CPPMnode* add_symbol_to_node(int sym,int *update); |
34 | CPPMnode* child; | 34 | CPPMnode* child; |
@@ -38,13 +38,14 @@ public: | |||
38 | const short int symbol; | 38 | const short int symbol; |
39 | CPPMnode(int sym); | 39 | CPPMnode(int sym); |
40 | }; | 40 | }; |
41 | 41 | ||
42 | class CPPMContext : public CContext { | 42 | class CPPMContext : public CContext { |
43 | public: | 43 | public: |
44 | CPPMContext(CPPMContext const &input) {head = input.head;order= input.order;} | 44 | CPPMContext(CPPMContext const &input) : CContext(input) |
45 | { head = input.head;order= input.order;} | ||
45 | CPPMContext(CPPMnode* _head=0, int _order=0) : head(_head),order(_order) {}; | 46 | CPPMContext(CPPMnode* _head=0, int _order=0) : head(_head),order(_order) {}; |
46 | ~CPPMContext() {}; | 47 | ~CPPMContext() {}; |
47 | void dump(); | 48 | void dump(); |
48 | CPPMnode* head; | 49 | CPPMnode* head; |
49 | int order; | 50 | int order; |
50 | }; | 51 | }; |