/*------------------------------------------------------------------------- * * LemClient.hpp * * Copyright (c) 2005 Andrei V. Shetuhin & AOT.ru * * Лемматизатор. * * *------------------------------------------------------------------------- */ #ifndef _LEM_CLIENT_HPP__ #define _LEM_CLIENT_HPP__ 1 #include #include #define C_RUS_GRAM_TAB 0x01 #define C_ENG_GRAM_TAB 0x02 #define C_GER_GRAM_TAB 0x04 #define C_LANG_COUNT 3 // FWD Decl class CAgramtab; class CLemmatizer; namespace lem { // // Результат лемматизации // struct LemmResult { // Первая форма std::string first_form; // Язык int lang; // Часть речи int part_of_speech; std::string part_of_speech_str; // Описание текущей формы std::string src_ancode; // Описание форм std::vector all_ancodes; // Словарное слово bool vocabulary; // Все морфоформы std::vector all_words; }; // // Лемматизатор // class Lemmatizer { public: // Конструктор Lemmatizer(const std::string &sRML, const int iLang); // Лемматизация всего слова std::vector Lemmatize(const std::string &sWord, bool bOnlyVocabulary = false); // Деструктор ~Lemmatizer() throw(); private: // Падаем void Fatal(const std::string &sError); CLemmatizer * aLemmatizers[C_LANG_COUNT]; CAgramtab * aAGramtabs[C_LANG_COUNT]; }; } // namespace lem #endif // _LEM_CLIENT_HPP__ // End.