Frog
|
a datastructure to hold all frogged information of one Sentence More...
#include <FrogData.h>
Public Member Functions | |
size_t | size () const |
bool | empty () const |
void | resolve_mwus () |
void | append (const frog_record &) |
std::string | get_language () const |
std::string | sentence (bool=false) const |
Public Attributes | |
std::vector< frog_record > | units |
the records that make up the sentence More... | |
std::vector< frog_record > | mw_units |
the MWU records that make up the sentence More... | |
std::map< size_t, size_t > | mwus |
Friends | |
frog_data | extract_fd (std::vector< Tokenizer::Token > &) |
a datastructure to hold all frogged information of one Sentence
void frog_data::append | ( | const frog_record & | fr | ) |
add a frog_record to the frog_data structure
fr | the record to add. |
|
inline |
string frog_data::get_language | ( | ) | const |
return the language of the frog_data structure
void frog_data::resolve_mwus | ( | ) |
resolve MWU's by merging them into the first record of the MWU
string frog_data::sentence | ( | bool | tokenized = false | ) | const |
extract the sentence from a frog_data structure by concatenating the words in the units. Normally separated by spaces.
tokenized | When true, the 'no_space' value is taken into account. |
|
inline |
|
friend |
std::vector<frog_record> frog_data::mw_units |
the MWU records that make up the sentence
std::map<size_t,size_t> frog_data::mwus |
std::vector<frog_record> frog_data::units |
the records that make up the sentence