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
00027
00032 #ifndef _moot_FSM_POTSDAM_H
00033 #define _moot_FSM_POTSDAM_H
00034
00035 #ifdef HAVE_CONFIG_H
00036 # include <mootmUnConfig.h>
00037 # include <mootmConfig.h>
00038 #endif
00039
00040 #if defined(USE_FSM_POTSDAM)
00041
00042 #include <mootFSMBase.h>
00043
00044 #include <FSMTypes.h>
00045 #include <FSM.h>
00046 #include <FSMSymSpec.h>
00047 #include <FSMWeight.h>
00048
00049 #include <vector>
00050 #include <string>
00051 #include <list>
00052 #include <set>
00053
00055 #define moot_SYM_ATT_COMPAT true
00056
00057 namespace mootm {
00058 using namespace std;
00059 using namespace moot;
00060
00064 class mootFSMPotsdam : public mootFSMBase {
00065 protected:
00066
00067
00068
00070 typedef FSMSymbolString TagString;
00071
00073 typedef FSM::FSMWeightedSymbolVector MorphAnalysis;
00074
00076 typedef set<MorphAnalysis> MorphAnalysisSet;
00077
00079 typedef set<FSMSymbolString> TagStringSet;
00080
00081
00082 protected:
00083
00084
00085
00086 FSMSymSpec *syms;
00087 FSM *mfst;
00089 list<string> syms_msgs;
00090 FSM result;
00093 MorphAnalysisSet analyses;
00094
00095 public:
00096
00097
00098
00100 mootFSMPotsdam(void)
00101 : syms(NULL),
00102 mfst(NULL)
00103 {};
00104
00106 ~mootFSMPotsdam(void) {
00107 if (mfst) delete mfst;
00108 if (syms) delete syms;
00109 };
00110
00112 virtual bool load(const string &fstfile, const string &symfile="");
00113
00115 virtual bool valid(void) const
00116 { return syms && mfst && *mfst; }
00117
00119 virtual mootToken& analyze_token(mootToken &tok, bool want_avm=true, bool want_warnings=true);
00120
00121
00122 protected:
00123
00124
00125
00127 void check_symspec_messages(void);
00128
00129 };
00130
00131
00133 typedef class mootFSMPotsdam mootFSM;
00134
00135 };
00136
00137 #endif
00138
00139
00140 #ifdef HAVE_CONFIG_H
00141 # include <mootmUnConfig.h>
00142 #endif
00143
00144
00145 #endif