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 _RELAX_TAGGER
00030 #define _RELAX_TAGGER
00031
00032 #include <list>
00033 #include <string>
00034
00035 #include "language.h"
00036 #include "tagger.h"
00037 #include "relax.h"
00038 #include "constraint_grammar.h"
00039
00040 using namespace std;
00041
00042
00050
00051 class relax_tagger : public POS_tagger {
00052 private:
00054 relax solver;
00056 constraint_grammar c_gram;
00057
00060 bool CheckCondition(const sentence &, sentence::const_iterator, int,
00061 const condition &, list<list<pair<int,int> > > &) const;
00064 bool CheckWordMatchCondition(const list<string> &, bool, int, sentence::const_iterator,
00065 list<pair<int,int> > &) const;
00067 bool check_possible_matching(const string &, word::const_iterator,
00068 sentence::const_iterator) const;
00070 bool check_match(const string &, const string &) const;
00071
00072 public:
00074 relax_tagger(const string &, int, double, double, bool);
00075
00077 void analyze(list<sentence> &);
00079 list<sentence> analyze(const list<sentence> &);
00080 };
00081
00082
00083 #endif