locutions.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
00030 #ifndef _LOCUTIONS
00031 #define _LOCUTIONS
00032
00033 #include <map>
00034 #include <set>
00035
00036 #include "fries/language.h"
00037 #include "freeling/automat.h"
00038
00043
00044 class locutions: public automat {
00045 private:
00047 std::map<std::string,std::string> locut;
00049 std::set<std::string> prefixes;
00051 std::set<std::string> acc_mw,longest_mw;
00053 std::vector<word> components;
00055 int over_longest;
00057 std::list<analysis> mw_analysis;
00058
00059 void check(const std::string, std::set<std::string> &, bool &, bool &);
00060 int ComputeToken(int, sentence::iterator &, sentence &);
00061 void ResetActions();
00062 void StateActions(int, int, int, sentence::const_iterator);
00063 void SetMultiwordAnalysis(sentence::iterator, int);
00064 bool ValidMultiWord(const word &);
00065
00066 public:
00068 locutions(const std::string &);
00069 void add_locution(const std::string &);
00070 };
00071
00072
00073
00074 #endif
00075