ddc
MorphDictBuilder.h
Go to the documentation of this file.
1 //
2 // This file is part of DDC.
3 //
4 // DDC is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // DDC is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with DDC. If not, see <http://www.gnu.org/licenses/>.
16 //
17 // ========== Dialing Lemmatizer (www.aot.ru)
18 // ========== Copyright by Alexey Sokirko, Bryan Jurish (2011)
19 
20 #ifndef MorphDictBuilder_h
21 #define MorphDictBuilder_h
22 
23 
24 #include "MorphDict.h"
25 #include "MorphAutomBuilder.h"
26 
27 #include "../MorphWizardLib/wizard.h"
28 
29 
31 {
32 
33 
34  // m_ModelInfo[i][j] is a word which should be written into CTrieNodeBuild::m_Info
35  // where i is the index of MorphoWizard::m_FlexiaModels
36  // and j is a the index of CFlexiaModel::m_Flexia
37  vector< vector <bool> > m_ModelInfo;
38  vector< DwordVector > m_PrefixSets;
39 
40 
41  void ClearRegister();
42 
43 
44  bool CheckFlexiaGramInfo(const MorphoWizard& Wizard) const;
45  bool GeneratePrefixes(const MorphoWizard& Wizard);
46 
47  // debug functions
48  bool CheckRegister() const;
49 
51 
52 
53 
54 public:
57 
58  bool CreateAutomat(const MorphoWizard& Wizard);
59  bool GenerateLemmas(const MorphoWizard& Wizard);
60  bool GenerateUnitedFlexModels(const MorphoWizard& Wizard);
61  bool GenPredictIdx(const MorphoWizard& wizard, int PostfixLength, int MinFreq, string path);
62 };
63 
64 
65 
66 
67 #endif
68 
69 /*--- emacs style variables ---
70  * Local Variables:
71  * mode: C++
72  * c-file-style: "ellemtel"
73  * c-basic-offset: 4
74  * tab-width: 8
75  * indent-tabs-mode: nil
76  * End:
77  */
vector< DwordVector > m_PrefixSets
Definition: MorphDictBuilder.h:38
Definition: MorphDictBuilder.h:30
bool CreateAutomat(const MorphoWizard &Wizard)
Definition: MorphDictBuilder.cpp:188
Definition: MorphAutomBuilder.h:76
bool GeneratePrefixes(const MorphoWizard &Wizard)
Definition: MorphDictBuilder.cpp:150
CMorphAutomatBuilder * GetFormBuilder()
Definition: MorphDictBuilder.h:50
bool GenerateLemmas(const MorphoWizard &Wizard)
Definition: MorphDictBuilder.cpp:42
bool CheckRegister() const
Definition: MorphDict.h:47
bool GenerateUnitedFlexModels(const MorphoWizard &Wizard)
Definition: MorphDictBuilder.cpp:103
CMorphAutomat * m_pFormAutomat
Definition: MorphDict.h:52
Definition: wizard.h:145
~CMorphDictBuilder()
Definition: MorphDictBuilder.cpp:34
bool CheckFlexiaGramInfo(const MorphoWizard &Wizard) const
vector< vector< bool > > m_ModelInfo
Definition: MorphDictBuilder.h:37
MorphLanguageEnum
Definition: utilit.h:162
CMorphDictBuilder(MorphLanguageEnum Language)
Definition: MorphDictBuilder.cpp:28
bool GenPredictIdx(const MorphoWizard &wizard, int PostfixLength, int MinFreq, string path)
Definition: CreatePredictionBase.cpp:178