The derived class quantities_es implements a Spanish quantities recognizer. More...
#include <quantities_modules.h>
Public Member Functions | |
quantities_es (const std::string &) | |
Constructor. | |
Private Member Functions | |
int | ComputeToken (int, sentence::iterator &, sentence &) |
Compute the right token code for word j from given state. | |
void | ResetActions () |
Reset acumulators used by state actions: value1, value2 (for ratios). | |
void | StateActions (int, int, int, sentence::const_iterator) |
Perform necessary actions in "state" reached from state "origin" via word j interpreted as code "token": Basically, when reaching a state with an informative. | |
void | SetMultiwordAnalysis (sentence::iterator, int) |
Set the appropriate lemma and parole for the new multiword. |
The derived class quantities_es implements a Spanish quantities recognizer.
quantities_es::quantities_es | ( | const std::string & | QuantFile | ) |
Constructor.
Create a quantities recognizer for Spanish.
References A, locutions::add_locution(), B, C, quantities_module::currency_key, D, E, ERROR_CRASH, F, automat::Final, quantities_module::fract, G, automat::initialState, MAX_STATES, MAX_TOKENS, quantities_module::measures, STOP, automat::stopState, TK_avo, TK_n100, TK_number, TK_part, TK_pc, TK_unit, TK_wcada, TK_wde, TK_wpor, TK_wsobre, quantities_module::tok, TRACE, automat::trans, and quantities_module::units.
int quantities_es::ComputeToken | ( | int | state, | |
sentence::iterator & | j, | |||
sentence & | se | |||
) | [private, virtual] |
Compute the right token code for word j from given state.
Implements automat.
References automat::annotate(), B, D, E, quantities_module::fract, quantities_module::measures, TK_avo, TK_n100, TK_number, TK_other, TK_unit, quantities_module::tok, and TRACE.
void quantities_es::ResetActions | ( | ) | [private, virtual] |
Reset acumulators used by state actions: value1, value2 (for ratios).
Implements automat.
References quantities_module::unitCode, quantities_module::unitType, quantities_module::value1, and quantities_module::value2.
void quantities_es::SetMultiwordAnalysis | ( | sentence::iterator | i, | |
int | fstate | |||
) | [private, virtual] |
Set the appropriate lemma and parole for the new multiword.
Implements automat.
References quantities_module::currency_key, TRACE, quantities_module::unitCode, quantities_module::unitType, quantities_module::value1, and quantities_module::value2.
void quantities_es::StateActions | ( | int | origin, | |
int | state, | |||
int | token, | |||
sentence::const_iterator | j | |||
) | [private, virtual] |
Perform necessary actions in "state" reached from state "origin" via word j interpreted as code "token": Basically, when reaching a state with an informative.
Implements automat.
References B, C, quantities_module::fract, G, TK_avo, TK_n100, TK_number, TK_part, TK_pc, TRACE, quantities_module::unitCode, quantities_module::units, quantities_module::unitType, quantities_module::value1, and quantities_module::value2.