00001 00002 // CCOMSyntaxHolder is a class which is created to work with Dialing Shallow Syntax 00003 // via COM-interfaces. The main methods of the class are the following: 00004 // 1. BOOL LoadSyntax(MorphLanguageEnum langua) - loading all dictionaries 00005 // of the syntax system into the memory for the given language 00006 // 2. BOOL GetSentencesFromSynAn(string str) - building a syntax structure for 00007 // the given text ("str") 00008 00009 00010 #ifndef COMSyntaxHolder 00011 #define COMSyntaxHolder 00012 00013 #include "utilit.h" 00014 #include <comdef.h> 00015 #include <atlbase.h> 00016 #import "../../bin/Lemmatizer.tlb" 00017 #import "../../bin/MAPost.tlb" 00018 #import "../../bin/Agramtab.tlb" 00019 #import "../../bin/Graphan.tlb" 00020 #import "../../bin/Synan.tlb" 00021 00022 class CCOMSyntaxHolder 00023 { 00024 public: 00025 MorphLanguageEnum m_CurrentLanguage; 00026 00027 GRAPHANLib::IGraphmatFilePtr m_piGraphan; 00028 LEMMATIZERLib::ILemmatizerPtr m_piLemmatizer; 00029 AGRAMTABLib::IGramTabPtr m_pGramTab; 00030 MAPOSTLib::IMAPostPtr m_piMAPost; 00031 SYNANLib::ISentencesCollectionPtr m_piSentCollection; 00032 LEMMATIZERLib::IPLMLineCollectionPtr m_piAfterMorphPlmLines; 00033 LEMMATIZERLib::IPLMLineCollectionPtr m_piBeforeSyntaxPlmLines; 00034 00035 CCOMSyntaxHolder(); 00036 ~CCOMSyntaxHolder(); 00037 BOOL LoadSyntax(MorphLanguageEnum langua); 00038 00039 void DeleteProcessors(); 00040 BOOL LoadSyntaxModule(MorphLanguageEnum langua); 00041 00042 BOOL BuildBeforeSyntax(string str, BOOL bFile, BOOL bWriteIntermFiles, BOOL bSaveIntermResults); 00043 BOOL BuildSyntax(BOOL bSaveIntermResults); 00044 BOOL GetSentencesFromSynAn(string str, BOOL bFile, BOOL bWriteIntermFiles, BOOL bSaveIntermResults); 00045 00046 00047 00048 }; 00049 extern string GetClauseTypeDescr(MorphLanguageEnum Language, const SYNANLib::IClausePtr& piClause, int ClauseRootNo); 00050 #endif