The derived class numbers_ca implements a Galician number recognizer. More...
#include <numbers_modules.h>
Public Member Functions | |
numbers_gl (const std::string &, 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: bilion, milion, units. | |
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, update current nummerical value. | |
void | SetMultiwordAnalysis (sentence::iterator, int) |
Set the appropriate lemma and parole for the new multiword. |
The derived class numbers_ca implements a Galician number recognizer.
numbers_gl::numbers_gl | ( | const std::string & | dec, | |
const std::string & | thou | |||
) |
Constructor.
Create a numbers recognizer for Galician.
References B1, B2, B3, B4, B5, B6, B7, B8, Bk, Bu, COD, automat::Final, automat::initialState, M1, M1a, M1b, M2, M3, M4, M5, M6, M7, M8, MAX_STATES, MAX_TOKENS, Mk, Mu, numbers_module::power, S1, S1a, S1b, S2, S3, S4, S5, S6, S7, S8, Sk, STOP, automat::stopState, Su, TK_bill, TK_c, TK_cent, TK_code, TK_d, TK_dec, TK_doc, TK_mil, TK_mill, TK_milr, TK_num, TK_u, TK_wcuarto, TK_wmedio, TK_wy, numbers_module::tok, TRACE, automat::trans, numbers_module::value, X1, X2, X3, X4, and X5.
int numbers_gl::ComputeToken | ( | int | state, | |
sentence::iterator & | j, | |||
sentence & | se | |||
) | [private, virtual] |
Compute the right token code for word j from given state.
Implements automat.
References numbers_module::RE_code, numbers_module::RE_number, TK_code, TK_num, TK_other, numbers_module::tok, and TRACE.
void numbers_gl::ResetActions | ( | ) | [private, virtual] |
Reset acumulators used by state actions: bilion, milion, units.
Implements automat.
References numbers_module::bilion, numbers_module::block, numbers_module::iscode, numbers_module::milion, and numbers_module::units.
void numbers_gl::SetMultiwordAnalysis | ( | sentence::iterator | i, | |
int | fstate | |||
) | [private, virtual] |
Set the appropriate lemma and parole for the new multiword.
Implements automat.
References numbers_module::bilion, CODE, numbers_module::iscode, numbers_module::milion, TRACE, and numbers_module::units.
void numbers_gl::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, update current nummerical value.
Implements automat.
References B2, B3, B5, B6, B7, numbers_module::bilion, Bk, numbers_module::block, Bu, COD, CODE, numbers_module::iscode, M1, M1b, M2, M3, M5, M6, M7, numbers_module::MACO_Decimal, numbers_module::MACO_Thousand, numbers_module::milion, Mk, Mu, numbers_module::power, S1, S1b, S2, S3, S5, S6, S7, Sk, Su, TK_bill, TK_mill, TK_num, TRACE, numbers_module::units, numbers_module::value, X1, X3, X4, and X5.