Class for finite-state recognizers.
Each fsa_recognizer instance has an fsa stored in self.fsa, which
must be supplied at initialization time.
The recognize method defined here is just a stub for recognize methods
that must be defined for the various subclasses of fsa_recognizer. Such
stubs are sometimes called abstract methods.
|
|
|
|
|
__repr__(self)
Each class instance should report the most specific class it belongs
to on printing. |
source code
|
|
|
|
|
|
|
|
|
|
recognize(self,
string)
Abstract class method, implemented by each subclass. |
source code
|
|
|
|
| state_not_defined_for_message(self,
state,
obs) |
source code
|
|
|
|
|