Frog
Public Member Functions | Public Attributes | Friends | List of all members
frog_data Class Reference

a datastructure to hold all frogged information of one Sentence More...

#include <FrogData.h>

Collaboration diagram for frog_data:
Collaboration graph
[legend]

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_recordunits
 the records that make up the sentence More...
 
std::vector< frog_recordmw_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 > &)
 

Detailed Description

a datastructure to hold all frogged information of one Sentence

Member Function Documentation

◆ append()

void frog_data::append ( const frog_record fr)

add a frog_record to the frog_data structure

Parameters
frthe record to add.

◆ empty()

bool frog_data::empty ( ) const
inline

◆ get_language()

string frog_data::get_language ( ) const

return the language of the frog_data structure

Returns
a string loop through all records and return the first non-default language value returns "default" when nothing was found

◆ resolve_mwus()

void frog_data::resolve_mwus ( )

resolve MWU's by merging them into the first record of the MWU

◆ sentence()

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.

Parameters
tokenizedWhen true, the 'no_space' value is taken into account.
Returns
a UTF8 string of the orginal words, separated by 1 space except when the no_space value is set AND tokenized is true

◆ size()

size_t frog_data::size ( ) const
inline

Friends And Related Function Documentation

◆ extract_fd

frog_data extract_fd ( std::vector< Tokenizer::Token > &  )
friend

Member Data Documentation

◆ mw_units

std::vector<frog_record> frog_data::mw_units

the MWU records that make up the sentence

◆ mwus

std::map<size_t,size_t> frog_data::mwus

◆ units

std::vector<frog_record> frog_data::units

the records that make up the sentence


The documentation for this class was generated from the following files: