00001 // ========== This file is under LGPL, the GNU Lesser General Public Licence 00002 // ========== Dialing Lemmatizer (www.aot.ru) 00003 // ========== Copyright by Alexey Sokirko 00004 00005 #ifndef PREDICT_H 00006 #define PREDICT_H 00007 00008 00009 #pragma warning(disable:4786) 00010 #include "../common/utilit.h" 00011 #include "MorphAutomat.h" 00012 00013 00015 struct CPredictTuple 00016 { 00017 WORD m_ItemNo; 00018 DWORD m_LemmaInfoNo; 00019 BYTE m_PartOfSpeechNo; 00020 }; 00021 00022 00024 class CPredictBase 00025 { 00026 CMorphAutomat m_SuffixAutomat; 00027 void FindRecursive(int r, string& curr_path, vector<CPredictTuple>& Infos) const; 00028 public: 00029 DwordVector m_ModelFreq; 00030 00031 00032 CPredictBase(MorphLanguageEnum); 00033 00034 void Load (const string &path); 00035 bool Find(const string &lettId, vector<CPredictTuple>& res) const; 00036 }; 00037 00038 00039 00040 00041 00042 #endif 00043