summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/PPMLanguageModel.h
Side-by-side diff
Diffstat (limited to 'inputmethods/dasher/PPMLanguageModel.h') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/PPMLanguageModel.h7
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
@@ -7,50 +7,51 @@
/////////////////////////////////////////////////////////////////////////////
#ifndef __PPMLanguageModel_h__
#define __PPMLanguageModel_h__
#include "NoClones.h"
#include "MSVC_Unannoy.h"
#include <vector>
#include <stdio.h>
#include "LanguageModel.h"
-static char dumpTrieStr[40000];
+// static char dumpTrieStr[40000];
const int MAX_ORDER = 5;
const int maxcont =200;
namespace Dasher {class CPPMLanguageModel;}
class Dasher::CPPMLanguageModel : public Dasher::CLanguageModel, private NoClones
{
public:
CPPMLanguageModel(CAlphabet *_alphabet, int _normalization);
- ~CPPMLanguageModel();
+ virtual ~CPPMLanguageModel();
class CPPMnode {
public:
CPPMnode* find_symbol(int sym);
CPPMnode* add_symbol_to_node(int sym,int *update);
CPPMnode* child;
CPPMnode* next;
CPPMnode* vine;
short int count;
const short int symbol;
CPPMnode(int sym);
};
class CPPMContext : public CContext {
public:
- CPPMContext(CPPMContext const &input) {head = input.head; order= input.order;}
+ CPPMContext(CPPMContext const &input) : CContext(input)
+ { head = input.head;order= input.order;}
CPPMContext(CPPMnode* _head=0, int _order=0) : head(_head),order(_order) {};
~CPPMContext() {};
void dump();
CPPMnode* head;
int order;
};
void ReleaseContext(CContext*);
CContext* GetRootContext();
inline CContext* CloneContext(CContext*);
void EnterSymbol(CContext* context, modelchar Symbol);
//inline bool GetProbs(CContext*,std::vector<symbol> &newchars,std::vector<unsigned int> &groups,std::vector<unsigned int> &probs,double addprob);