The derived class dates_ca implements a Catalan date/time recognizer. More...
#include <dates_modules.h>
Public Member Functions | |
dates_ca () | |
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: day, year, month, hour, minute, etc. | |
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 token (day, year, month, etc) store that part of the date. | |
void | SetMultiwordAnalysis (sentence::iterator, int) |
Set the appropriate lemma and parole for the new multiword. |
The derived class dates_ca implements a Catalan date/time recognizer.
dates_ca::dates_ca | ( | ) |
Constructor.
Create a dates recognizer for Catalan.
References A, AH, B, BH, BH1, BH2, C, CH, CH1, D, DH, DH1, E, Eb, EH, EH1, EH1b, EHb, F, FH, FH1, FH1b, automat::Final, G, GH, GH1, H, Ha, Hb, Hc, I, Ib, IH, IH1, automat::initialState, J, JH, JH1, K, KH, KH1, L, LH, LH1, MAX_STATES, MAX_TOKENS, MH, MH1, MH1b, MHb, dates_module::nDia, NH, NH1, dates_module::nMes, P, S1, S2, STOP, automat::stopState, TK_colon, TK_comma, TK_date, TK_daynum, TK_dot, TK_hhmm, TK_hour, TK_hournum, TK_min, TK_minnum, TK_month, TK_monthnum, TK_number, TK_quartnum, TK_roman, TK_shmonth, TK_wa, TK_wacdc, TK_wal, TK_walla, TK_wampm, TK_wcap, TK_wcentury, TK_wday, TK_wde, TK_wdel, TK_weekday, TK_wel, TK_wen, TK_whour, TK_wi, TK_wla, TK_wmenys, TK_wmidnight, TK_wmig, TK_wmin, TK_wmitja, TK_wmonth, TK_wmorning, TK_wpast, TK_wpunto, TK_wquart, TK_wyear, dates_module::tok, TRACE, and automat::trans.
int dates_ca::ComputeToken | ( | int | state, | |
sentence::iterator & | j, | |||
sentence & | se | |||
) | [private, virtual] |
Compute the right token code for word j from given state.
Implements automat.
References A, AH, B, C, CH, CH1, D, E, Eb, EH, EH1, EH1b, EHb, F, FH1, G, H, Hb, Hc, K, LH, LH1, MH, MH1, MH1b, MHb, dates_module::RE_Date, dates_module::RE_Roman, dates_module::RE_Time1, dates_module::RE_Time2, S1, TK_date, TK_daynum, TK_hhmm, TK_hour, TK_hournum, TK_min, TK_minnum, TK_monthnum, TK_number, TK_other, TK_quartnum, TK_roman, dates_module::tok, and TRACE.
void dates_ca::ResetActions | ( | ) | [private, virtual] |
Reset acumulators used by state actions: day, year, month, hour, minute, etc.
Implements automat.
References dates_module::century, dates_module::day, dates_module::hour, dates_module::meridian, dates_module::minute, dates_module::month, dates_module::sign, dates_module::temp, dates_module::weekday, and dates_module::year.
void dates_ca::SetMultiwordAnalysis | ( | sentence::iterator | i, | |
int | fstate | |||
) | [private, virtual] |
Set the appropriate lemma and parole for the new multiword.
Implements automat.
References dates_module::century, dates_module::day, dates_module::hour, dates_module::meridian, dates_module::minute, dates_module::month, TRACE, dates_module::weekday, and dates_module::year.
void dates_ca::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 token (day, year, month, etc) store that part of the date.
Implements automat.
References A, B, BH, BH1, BH2, dates_module::century, CH, CH1, D, dates_module::day, E, Eb, EH1b, EHb, FH1, FH1b, G, GH, GH1, dates_module::hour, I, Ib, IH, IH1, JH, JH1, K, L, LH, LH1, dates_module::meridian, MH, MH1, MH1b, MHb, dates_module::minute, dates_module::month, dates_module::nDia, NH, NH1, dates_module::nMes, P, dates_module::RE_Date, dates_module::RE_Time1, dates_module::RE_Time2, S2, dates_module::sign, dates_module::temp, TK_date, TK_daynum, TK_hhmm, TK_hour, TK_hournum, TK_min, TK_minnum, TK_month, TK_monthnum, TK_number, TK_quartnum, TK_roman, TK_shmonth, TK_wampm, TK_weekday, TK_wmidnight, TK_wmig, TK_wmitja, TK_wmorning, TK_wpunto, TK_wquart, TRACE, dates_module::weekday, and dates_module::year.