tokenizer.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 _TOKENIZER
00030 #define _TOKENIZER
00031
00032 #include <set>
00033 #include <map>
00034 #include <list>
00035
00036 #include "fries/language.h"
00037 #include "regexp-pcre++.h"
00038
00045
00046 class tokenizer {
00047 private:
00049 std::set<std::string> abrevs;
00051 std::list<std::pair<std::string,RegEx> > rules;
00053 std::map<std::string,int> matches;
00054
00055 public:
00057 tokenizer(const std::string &);
00058
00060 void tokenize(const std::string &, std::list<word> &);
00062 std::list<word> tokenize(const std::string &);
00064 void tokenize(const std::string &, unsigned long &, std::list<word> &);
00066 std::list<word> tokenize(const std::string &, unsigned long &);
00067 };
00068
00069 #endif
00070
00071
00072
00073
00074
00075
00076
00077
00078