00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _VOCTRAINER_H
00021 #define _VOCTRAINER_H
00022
00023 #include "vocstruct.H"
00024 #include "vocprinter.H"
00025
00030 class CVocTrainer
00031 {
00032 private:
00040 bool compareStrings(std::string str1,std::string str2,const bool &casemode);
00041
00050 bool checkWord(const std::string &word,const std::vector<std::string> &words,
00051 const bool &casemode);
00052
00062 static bool compareLeftLanguage(const SWord &word1,const SWord &word2);
00063
00073 static bool compareRightLanguage(const SWord &word1,const SWord &word2);
00074
00081 void sortVocabulary(const enVocLang &enLang);
00082
00083 public:
00087 CVocTrainer(CVocPrinter *pvpPrinter);
00088
00091 ~CVocTrainer();
00092
00103 int Init(char** files,const int &nNumFiles,const bool &bSynonym,const enVocLang &enLang);
00104
00116 void Learn(const enVocMode &enMode,const enVocLang &enLang,
00117 const int &nNumPasses,const bool &bDebugMode,
00118 const bool &bStackMode,const bool &bCaseMode,
00119 const bool &bBeep);
00120
00121 private:
00123 std::vector<SWord> m_vocabulary;
00124
00126 CVocPrinter *m_pvpPrinter;
00127 };
00128
00129 #endif //_VOCTRAINER_H