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 __PARADIGM_H_ 00006 #define __PARADIGM_H_ 00007 00008 #include "../common/utilit.h" 00009 #include "MorphAutomat.h" 00010 00011 class CLemmatizer; 00012 00013 00014 class CFormInfo 00015 { 00016 bool m_bPrefixesWereCut; 00017 bool m_bFlexiaWasCut; 00018 string m_UserPrefix; 00019 CAutomAnnotationInner m_InnerAnnot; 00020 const CLemmaInfoAndLemma& GetLemmaInfo() const; 00021 const CFlexiaModel& GetFlexiaModel() const; 00022 bool IsValid() const; 00023 00024 public: 00025 const CLemmatizer* m_pParent; 00026 string m_InputWordBase; 00027 bool m_bFound; 00028 00029 00030 CFormInfo(); 00031 void Create(const CLemmatizer* pParent, const CAutomAnnotationInner& A, const string& InputWordForm, bool bFound); 00032 void Copy(const CFormInfo& from); 00033 void AttachLemmatizer(const CLemmatizer* parent); 00034 bool SetParadigmId(DWORD newVal); 00035 00036 DWORD GetParadigmId() const; 00037 DWORD GetCount () const; 00038 00039 string GetSrcNorm() const; 00040 // returns the weight of a word form 00041 int GetHomonymWeightWithForm(WORD pos) const; 00042 // returns the weight of this word 00043 int GetWordWeight() const; 00044 00045 string GetAncode(WORD pos) const; 00046 string GetWordForm (WORD pos) const; 00047 string GetSrcAncode() const; 00048 int GetHomonymWeight() const; 00049 BYTE GetAccentedVowel(WORD pos) const; 00050 BYTE GetSrcAccentedVowel() const; 00051 string GetCommonAncode() const; 00052 char GetLemSign() const; 00053 size_t GetLemmaPrefixLength() const; 00054 string FormatAsInPlmLine() const; 00055 void SetUserPrefix(const string& UserPrefix); 00056 void SetUserUnknown(); 00057 }; 00058 00059 00060 #endif //__PARADIGM_H_