splitter.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 _SPLITTER
00030 #define _SPLITTER
00031
00032 #include <map>
00033 #include <set>
00034
00035 #include "fries/language.h"
00036
00037
00044
00045 class splitter {
00046 private:
00048 bool SPLIT_AllowBetweenMarkers;
00049 int SPLIT_MaxLines;
00051 std::set<std::string> starters;
00052 std::map<std::string,bool> enders;
00054 std::map<std::string,int> markers;
00055
00056
00057 bool betweenMrk;
00058 int no_split_count;
00059 std::list<int> mark_type;
00060 std::list<std::string> mark_form;
00061
00063
00065 sentence buffer;
00066
00068 bool end_of_sentence(std::list<word>::const_iterator, const std::list<word> &) const;
00069
00070 public:
00072 splitter(const std::string &);
00073
00075 void split(const std::list<word> &, bool, std::list<sentence> &ls);
00076 std::list<sentence> split(const std::list<word> &, bool);
00077 };
00078
00079 #endif
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089