FreeLing
3.1
|
Class splitter implements a sentence splitter, which accumulates lists of words until a sentence is completed, and then returns a list of sentence objects. More...
#include <splitter.h>
Public Member Functions | |
splitter (const std::wstring &) | |
Constructor. | |
void | split (const std::list< word > &, bool, std::list< sentence > &ls) |
split sentences with default options | |
std::list< sentence > | split (const std::list< word > &, bool) |
Private Member Functions | |
bool | end_of_sentence (std::list< word >::const_iterator, const std::list< word > &) const |
check for sentence markers | |
Private Attributes | |
bool | SPLIT_AllowBetweenMarkers |
configuration options | |
int | SPLIT_MaxWords |
std::set< std::wstring > | starters |
Sentence delimiters. | |
std::map< std::wstring, bool > | enders |
std::map< std::wstring, int > | markers |
Open-close marker pairs (parenthesis, etc) | |
bool | betweenMrk |
int | no_split_count |
std::list< int > | mark_type |
std::list< std::wstring > | mark_form |
sentence | buffer |
accumulated list of returned sentences |
Class splitter implements a sentence splitter, which accumulates lists of words until a sentence is completed, and then returns a list of sentence objects.
freeling::splitter::splitter | ( | const std::wstring & | ) |
Constructor.
Create a sentence splitter.
References freeling::config_file::add_section(), freeling::config_file::close(), ERROR_CRASH, freeling::config_file::get_content_line(), freeling::config_file::get_section(), freeling::config_file::open(), SAME, and TRACE.
bool freeling::splitter::end_of_sentence | ( | std::list< word >::const_iterator | , |
const std::list< word > & | |||
) | const [private] |
check for sentence markers
Check whether a word is a sentence end (eg a dot followed by a capitalized word).
void freeling::splitter::split | ( | const std::list< word > & | , |
bool | , | ||
std::list< sentence > & | ls | ||
) |
split sentences with default options
std::list<sentence> freeling::splitter::split | ( | const std::list< word > & | , |
bool | |||
) |
bool freeling::splitter::betweenMrk [private] |
sentence freeling::splitter::buffer [private] |
accumulated list of returned sentences
accumulated words of current sentence
std::map<std::wstring,bool> freeling::splitter::enders [private] |
std::list<std::wstring> freeling::splitter::mark_form [private] |
std::list<int> freeling::splitter::mark_type [private] |
std::map<std::wstring,int> freeling::splitter::markers [private] |
Open-close marker pairs (parenthesis, etc)
int freeling::splitter::no_split_count [private] |
configuration options
int freeling::splitter::SPLIT_MaxWords [private] |
std::set<std::wstring> freeling::splitter::starters [private] |
Sentence delimiters.