suffixes.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028
00029 #ifndef _SUFFIXES
00030 #define _SUFFIXES
00031
00032 #include <string>
00033 #include <set>
00034 #include <map>
00035
00036 #include "fries/language.h"
00037 #include "freeling/sufrule.h"
00038 #include "freeling/accents.h"
00039
00040 #define SUF 0
00041 #define PREF 1
00042
00043
00044 class dictionary;
00045
00050
00051 class affixes {
00052
00053 private:
00055 accents accen;
00056
00058 std::multimap<std::string,sufrule> affix[2];
00060 std::multimap<std::string,sufrule> affix_always[2];
00061
00063 std::set<unsigned int> ExistingLength[2];
00065 unsigned int Longest[2];
00066
00068 void look_for_affixes_in_list (int, std::multimap<std::string,sufrule> &, word &, dictionary &) const;
00070 void look_for_combined_affixes(std::multimap<std::string,sufrule> &, std::multimap<std::string,sufrule> &, word &, dictionary &) const;
00072 std::set<std::string> GenerateRoots(int, const sufrule &, const std::string &) const;
00074 void SearchRootsList(std::set<std::string> &, const std::string &, sufrule &, word &, dictionary &) const;
00076 void ApplyRule(const std::string &, const std::list<analysis> &, const std::string &, sufrule &, word &, dictionary &) const;
00077
00079 void CheckRetokenizable(const sufrule &, const std::string &, const std::string &, const std::string &, dictionary &, std::list<word> &) const;
00080
00081 public:
00083 affixes(const std::string &, const std::string &);
00084
00086 void look_for_affixes(word &, dictionary &);
00087 };
00088
00089 #endif