The derived class numbers_it implements a Italian number recognizer. More...
#include <numbers_modules.h>
Public Member Functions | |
numbers_it (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. | |
Private Attributes | |
long double | hundreds |
long double | thousands |
long double | floatUnits |
The derived class numbers_it implements a Italian number recognizer.
numbers_it::numbers_it | ( | const std::string & | dec, | |
const std::string & | thou | |||
) |
Constructor.
Create a numbers recognizer for Italian.
References B1, automat::Final, automat::initialState, MAX_STATES, MAX_TOKENS, numbers_module::power, specialState, STOP, automat::stopState, TK_bill, TK_c, TK_d, TK_mil, TK_mill, TK_milr, TK_special, TK_t, TK_u, TK_we, TK_whalf, TK_wquarter, numbers_module::tok, TRACE, automat::trans, TUH1, TUH2, TUH3, TUH4, TUH5, TUH6, TUH7, TUHT1, TUHT2, TUHT3, TUHT4, TUHT5, TUHT6, TUHT7, TUHTM1, TUHTM2, TUHTM3, TUHTM4, TUHTM5, TUHTM6, TUHTM7, TUHTMlrd1, TUHTMlrd2, TUHTMlrd3, TUHTMlrd4, TUHTMlrd5, TUHTMlrd6, TUHTMlrd7, and numbers_module::value.
int numbers_it::ComputeToken | ( | int | state, | |
sentence::iterator & | j, | |||
sentence & | se | |||
) | [private, virtual] |
Compute the right token code for word j from given state.
Implements automat.
References B1, numbers_module::iscode, numbers_module::RE_code, numbers_module::RE_number, specialState, StateActions(), STOP, TK_code, TK_num, TK_other, TK_special, TK_we, numbers_module::tok, TRACE, and automat::trans.
void numbers_it::ResetActions | ( | ) | [private, virtual] |
Reset acumulators used by state actions: bilion, milion, units.
Implements automat.
References numbers_module::bilion, numbers_module::block, floatUnits, hundreds, numbers_module::iscode, numbers_module::milion, thousands, and numbers_module::units.
void numbers_it::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, hundreds, numbers_module::iscode, numbers_module::milion, specialState, thousands, TRACE, and numbers_module::units.
void numbers_it::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 numbers_module::bilion, COD, CODE, hundreds, numbers_module::iscode, numbers_module::MACO_Decimal, numbers_module::MACO_Thousand, numbers_module::milion, numbers_module::power, thousands, TK_c, TK_mil, TK_mill, TK_milr, TK_num, TRACE, TUH1, TUH2, TUH3, TUH4, TUH5, TUH6, TUH7, TUHT1, TUHT2, TUHT3, TUHT4, TUHT5, TUHT6, TUHT7, TUHTM1, TUHTM2, TUHTM3, TUHTM4, TUHTM5, TUHTM6, TUHTM7, TUHTMlrd1, TUHTMlrd2, TUHTMlrd3, TUHTMlrd4, TUHTMlrd5, TUHTMlrd6, TUHTMlrd7, numbers_module::units, and numbers_module::value.
Referenced by ComputeToken().
long double numbers_it::floatUnits [private] |
Referenced by ResetActions().
long double numbers_it::hundreds [private] |
Referenced by ResetActions(), SetMultiwordAnalysis(), and StateActions().
long double numbers_it::thousands [private] |
Referenced by ResetActions(), SetMultiwordAnalysis(), and StateActions().