voctrainer.H
1 /*
2  Vocatra, a small and fast vocabulary trainer
3  Copyright (C) 2006-2008 Oliver Sauder <os@esite.ch>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License
7  as published by the Free Software Foundation; either version 2
8  of the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19 
20 #ifndef _VOCTRAINER_H
21 #define _VOCTRAINER_H
22 
23 #include "vocstruct.H"
24 #include "vocprinter.H"
25 
31 {
32 private:
40  bool compareStrings(std::string str1,std::string str2,const bool &casemode);
41 
50  bool checkWord(const std::string &word,const std::vector<std::string> &words,
51  const bool &casemode);
52 
62  static bool compareLeftLanguage(const SWord &word1,const SWord &word2);
63 
73  static bool compareRightLanguage(const SWord &word1,const SWord &word2);
74 
81  void sortVocabulary(const enVocLang &enLang);
82 
83 public:
87  CVocTrainer(CVocPrinter *pvpPrinter);
88 
91  ~CVocTrainer();
92 
103  int Init(char** files,const int &nNumFiles,const bool &bSynonym,const enVocLang &enLang);
104 
116  void Learn(const enVocMode &enMode,const enVocLang &enLang,
117  const int &nNumPasses,const bool &bDebugMode,
118  const bool &bStackMode,const bool &bCaseMode,
119  const bool &bBeep);
120 
121 private:
123  std::vector<SWord> m_vocabulary;
124 
127 };
128 
129 #endif //_VOCTRAINER_H

Get Vocatra at SourceForge.net. Fast, secure and Free Open Source software downloads Generated for Vocatra by doxygen