#include <splitter.h>
Collaboration diagram for splitter:
Public Member Functions | |
splitter (const string &) | |
Constructor. | |
list< sentence > | split (const list< word > &, bool) |
split sentences with default options | |
Private Member Functions | |
bool | end_of_sentence (list< word >::const_iterator, const list< word > &) const |
check for sentence markers | |
Private Attributes | |
bool | SPLIT_AllowBetweenMarkers |
configuration options | |
int | SPLIT_MaxLines |
set< string > | starters |
Sentence delimiters. | |
map< string, bool > | enders |
map< string, int > | markers |
Open-close marker pairs (parenthesis, etc). | |
bool | betweenMrk |
int | no_split_count |
int | mark_type |
list< sentence > | ls |
accumulated list of returned sentences | |
sentence | buffer |
accumulated words of current sentence |
|
Constructor.
|
|
check for sentence markers
|
|
split sentences with default options If a sentence marker is reached (or flush flag is set), return all sentences currently in buffer, and clean buffer. If a new sentence is started but not completed, keep in buffer, and wait for further calls with more data. |
|
|
|
accumulated words of current sentence
|
|
|
|
accumulated list of returned sentences
|
|
|
|
Open-close marker pairs (parenthesis, etc).
|
|
|
|
configuration options
|
|
|
|
Sentence delimiters.
|