00001 #ifndef __ABBREV__ 00002 #define __ABBREV__ 00003 00004 #include <regexx.h> 00005 00006 class Abbrev { 00007 private: 00008 //variables needed by abbrev 00009 /*vector< pair<string, string> > ad; 00010 vector< pair<string, string> > ar; 00011 vector< pair<string, string> > vn; 00012 vector< pair<string, string> > nv; 00013 vector< pair<string, string> > nn; 00014 vector< pair<string, string> > nz; 00015 vector< pair<string, string> > st; 00016 vector< pair<string, string> > or; 00017 vector< pair<string, string> > an; 00018 vector< pair<string, string> > empty;*/ 00019 vector<string> pron; 00020 vector<string> unpron; 00021 regexx::Regexx rxx; 00022 regexx::Regexx pron_2; 00023 00024 vector<string> getPron() const { return pron; } 00025 vector<string> getUnpron() const { return unpron; } 00026 //void Abbrev::split(string w, const char c, vector< string > & v) const; 00027 //void Abbrev::storeRegEx(const vector<string> & v); 00028 void Abbrev::readFromFile(const string & file, unsigned type); 00029 bool Abbrev::pronList(const string & s, const bool & flag); 00030 bool Abbrev::pronAbbrev(const string & s); 00031 00032 public: 00033 Abbrev(); 00034 ~Abbrev(); 00035 vector<string> Abbrev::operator () (const string & text); 00036 }; 00037 00038 #endif