#include <automat.h>
Inheritance diagram for automat:
Public Member Functions | |
automat () | |
Constructor. | |
virtual | ~automat () |
Destructor. | |
void | annotate (sentence &) |
Detect patterns in sentence using default options. | |
Protected Attributes | |
int | initialState |
state code of initial state | |
int | stopState |
state code for stop State | |
int | trans [MAX_STATES][MAX_TOKENS] |
Transition tables. | |
set< int > | Final |
set of final states | |
Private Member Functions | |
virtual int | ComputeToken (int, sentence::const_iterator, const sentence &)=0 |
pure virtual function to be provided by the child class. | |
virtual void | ResetActions ()=0 |
pure virtual function to be provided by the child class . | |
virtual void | StateActions (int, int, int, sentence::const_iterator)=0 |
pure virtual function to be provided by the child class. | |
virtual void | SetMultiwordAnalysis (sentence::iterator) const =0 |
pure virtual function to be provided by the child class. | |
virtual bool | ValidMultiWord (const word &) const |
virtual function (true by default). | |
sentence::iterator | BuildMultiword (sentence &, sentence::iterator, sentence::iterator) const |
Private function to re-arrange sentence when match found. |
..).
Details:
Child classes must provide a constructor that:
Child classes must provide the virtual functions:
Child classes must declare and manage any private attribute or function they may need to perform the expected computations
|
Constructor. Since automat is an abstract class, this is called always from child constructors. |
|
Destructor.
|
|
Detect patterns in sentence using default options. Recognize the longest pattern starting at first possible start found. Repeat the process starting from first word after recognized pattern, until sentence ends. |
|
Private function to re-arrange sentence when match found.
|
|
pure virtual function to be provided by the child class. Computes token code for current word in current state. Implemented in dates_default, dates_es, dates_ca, locutions, np, numbers_default, numbers_es, numbers_ca, numbers_gl, numbers_en, quantities_default, and quantities_es. |
|
pure virtual function to be provided by the child class . Resets automaton internal variables when a new search is started. Implemented in dates_default, dates_es, dates_ca, locutions, np, numbers_default, numbers_es, numbers_ca, numbers_gl, numbers_en, quantities_default, and quantities_es. |
|
pure virtual function to be provided by the child class. Sets analysis for pattern identified as a multiword. Implemented in dates_default, dates_es, dates_ca, locutions, np, numbers_default, numbers_es, numbers_ca, numbers_gl, numbers_en, quantities_default, and quantities_es. |
|
pure virtual function to be provided by the child class. Performs appropriate internal actions, given origin and destinanation states, token code and word. Implemented in dates_default, dates_es, dates_ca, locutions, np, numbers_default, numbers_es, numbers_ca, numbers_gl, numbers_en, quantities_default, and quantities_es. |
|
virtual function (true by default). Allows the child class to perform a last-minute check before effectively building the multiword. Reimplemented in np. |
|
set of final states
|
|
state code of initial state
|
|
state code for stop State
|
|
Transition tables.
|