| Home | Trees | Indices | Help |
|---|
|
|
class_fsa_recognize.fsa_recognizer --+
|
det_fsa_recognizer_with_sink_state
Deterministic fsa recognizer which adds a sink state to its fsa upon initializiation, if necessary, and has a slightly simplified recognition algorithm as a result.
|
|||
|
|||
|
|||
| Boolean |
|
||
|
|||
|
Inherited from |
|||
|
|||
|
self.transitions is a list of k dictionaries,indexed 0:k-1, all
storing integer values < k, representing an FSA transition table with
each integer value corresponding to a state. If there is any state
undefined for some input symbol in |
Iterate through Differs from the The sink state means that no failure with an in-alphabet string is due to a state being undefined for the input: >>> R1 = det_fsa_recognizer(fsa1, True) >>> R2 = det_fsa_recognizer_with_sink_state(fsa1, True) >>> R1.recognize('baa!a') State 4 not defined for a False >>> R2.recognize('baa!a') Ending in sink state 5 False >>>
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Feb 4 22:00:34 2009 | http://epydoc.sourceforge.net |