00001 // ========== This file is under LGPL, the GNU Lesser General Public Licence 00002 // ========== Dialing Syntax Analysis (www.aot.ru) 00003 // ========== Copyright by Dmitry Pankratov, Igor Nozhov, Alexey Sokirko 00004 00005 #ifndef homonym_h 00006 #define homonym_h 00007 00008 enum EGraPairType {Date, WebAddr, Oborot, Keyb, GermanDividedCompound, UnknownPairType }; 00009 00010 00011 00012 class CFormInfo; 00013 00014 #include "AncodePattern.h" 00015 00016 class CHomonym : public CAncodePattern 00017 { 00018 00019 public: 00020 // morphology 00021 string m_strLemma; 00022 00023 // corpus frequence information 00024 long m_lFreqHom; 00025 00026 // Oborots 00027 int m_OborotNo; 00028 bool m_bOborot1; 00029 bool m_bOborot2; 00030 bool m_bInOb; 00031 00032 00033 long m_lPradigmID; 00034 00035 bool m_bSmallNumber; 00036 size_t m_iCmpnLen; 00037 bool m_bCmplLem; 00038 00039 bool m_bRussianOdin; 00040 00041 00042 // a special slot to mark all homonyms which should be deleted by 00043 // function CSynWord::DeleteMarkedHomonymsWithClauses 00044 bool m_bDelete; 00045 00046 00047 CHomonym(const CAgramtab* pGramTab); 00048 00049 00050 bool operator<(const CHomonym& hom) const 00051 { 00052 return m_strLemma < hom.m_strLemma; 00053 } 00054 00055 bool HasSetOfGrammemsExact(QWORD Grammems) const; 00056 bool IsOb1() const; 00057 bool IsOb2() const; 00058 bool IsIsOb() const; 00059 bool IsLemma(const char* lemma) const; 00060 bool IsMorphNoun() const; 00061 bool IsSynNoun() const; 00062 bool IsLeftNounModifier() const; 00063 void DeleteOborotMarks(); 00064 00065 bool ProcessLemmaAndGrammems(const char* strLemma); 00066 void SetLemma(string Lemma); 00067 string GetGrammemsStr() const; 00068 00069 void SetMorphUnknown(); 00070 void SetHomonym(const CFormInfo* F); 00071 00072 00073 00074 }; 00075 00076 #endif