dates_default Class Reference

The derived class dates_default implements a default date/time recognizer (only simple patterns are recognized). More...

#include <dates_modules.h>

Inheritance diagram for dates_default:
Inheritance graph
[legend]
Collaboration diagram for dates_default:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 dates_default ()
 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.

Detailed Description

The derived class dates_default implements a default date/time recognizer (only simple patterns are recognized).


Constructor & Destructor Documentation

dates_default::dates_default (  ) 

Constructor.

Create a default dates recognizer.

References A, B, C, D, automat::Final, automat::initialState, MAX_STATES, MAX_TOKENS, STOP, automat::stopState, TK_date, TK_hhmm, TK_hour, TK_min, TRACE, and automat::trans.


Member Function Documentation

int dates_default::ComputeToken ( int  state,
sentence::iterator &  j,
sentence &  se 
) [private, virtual]

Compute the right token code for word j from given state.

Implements automat.

References dates_module::RE_Date, dates_module::RE_Time1, dates_module::RE_Time2, TK_date, TK_hhmm, TK_hour, TK_min, TK_other, and TRACE.

void dates_default::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::temp, dates_module::weekday, and dates_module::year.

void dates_default::SetMultiwordAnalysis ( sentence::iterator  i,
int  fstate 
) [private, virtual]

Set the appropriate lemma and parole for the new multiword.

Implements automat.

References 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_default::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 dates_module::day, dates_module::hour, dates_module::minute, dates_module::month, TRACE, and dates_module::year.


The documentation for this class was generated from the following files:
Generated on Tue Jul 27 16:29:32 2010 for FreeLing by  doxygen 1.6.3