The derived class dates_en implements an English date/time recognizer. More...
#include <dates_modules.h>
Public Member Functions | |
dates_en () | |
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. | |
Private Attributes | |
std::map< std::string, int > | numDay |
translate day numbers (first, second...) to a number (1, 2...) |
The derived class dates_en implements an English date/time recognizer.
dates_en::dates_en | ( | ) |
Constructor.
Create a dates recognizer for English.
References A, AH, AH1, aux, B, BH, BH1, C, CH, CH1, D, DH, DH1, DH1b, E, Eb, Ebb, Ec, EH, EH1, EH1b, EH1c, EHb, F, Fb, FH, FH1, automat::Final, G, Gb, Gbb, GH, GH1, H, Ha, I, Ib, Ic, automat::initialState, J, Jb, K, L, M, MAX_STATES, MAX_TOKENS, N, dates_module::nDia, dates_module::nMes, numDay, O, P, STOP, automat::stopState, TK_centnum, TK_colon, TK_comma, TK_date, TK_daynum, TK_dot, TK_hhmm, TK_hour, TK_hournum, TK_kyearnum, TK_min, TK_minnum, TK_month, TK_monthnum, TK_other, TK_shmonth, TK_wa, TK_wabout, TK_wacdc, TK_wampm, TK_wand, TK_wat, TK_wday, TK_weekday, TK_whalf, TK_whundred, TK_win, TK_wmidnight, TK_wmin, TK_wmonth, TK_wmorning, TK_woclock, TK_wof, TK_wpast, TK_wquarter, TK_wthe, TK_wto, TK_wyear, TK_yearnum, dates_module::tok, TRACE, and automat::trans.
int dates_en::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, B, C, CH, CH1, D, DH, DH1, DH1b, E, Eb, Ebb, Ec, F, Fb, G, Gb, Gbb, H, Ha, I, Ic, J, Jb, K, M, O, dates_module::RE_Date, dates_module::RE_Time1, dates_module::RE_Time2, TK_centnum, TK_date, TK_daynum, TK_hhmm, TK_hour, TK_hournum, TK_kyearnum, TK_min, TK_minnum, TK_monthnum, TK_number, TK_other, TK_yearnum, dates_module::tok, and TRACE.
void dates_en::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::daytemp, dates_module::hour, dates_module::inGbb, dates_module::meridian, dates_module::minute, dates_module::month, dates_module::sign, dates_module::temp, dates_module::weekday, and dates_module::year.
void dates_en::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_en::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 AH, AH1, aux, B, BH, BH1, CH, CH1, dates_module::day, dates_module::daytemp, DH, DH1, DH1b, E, Eb, Ebb, Ec, EH, EH1, EH1b, EH1c, EHb, F, FH, Gb, Gbb, GH, GH1, dates_module::hour, I, Ib, Ic, dates_module::inGbb, J, Jb, L, M, dates_module::meridian, dates_module::minute, dates_module::month, dates_module::nDia, dates_module::nMes, numDay, O, P, dates_module::RE_Date, dates_module::RE_Time1, dates_module::RE_Time2, dates_module::sign, dates_module::temp, TK_centnum, TK_date, TK_daynum, TK_hhmm, TK_hour, TK_hournum, TK_kyearnum, TK_min, TK_minnum, TK_month, TK_monthnum, TK_number, TK_shmonth, TK_wampm, TK_weekday, TK_whalf, TK_wmidnight, TK_wmorning, TK_woclock, TK_wpast, TK_wquarter, TK_wto, TK_yearnum, TRACE, dates_module::weekday, and dates_module::year.
std::map<std::string,int> dates_en::numDay [private] |
translate day numbers (first, second...) to a number (1, 2...)
Referenced by dates_en(), and StateActions().