Abstract interface for generic read file fn.
Open FST file file and return raw_dic , a
dictionary representation of the FST represented there.
The keys of the dictionary are state names, possibly renamed from the
original representation. raw_dic [state_name] is a transition
function for that state represented as a dictionary.
Two keys are special in transition functions:
-
'final' takes a boolean value specifying whether this is a final
state.
-
'start' takes a boolean value specifying whether this is a start
state. (not used)
All other keys in transition fns are upper lg chars whose values are
dictionaries whose keys are lower lg chars:
raw_dic[state][upper][lower] = the set of states transitioned to
in the state C{state} when upper
char C{char} is paired with lower lg
char C{lower}
Implementations of this method should always call initialize reader
first, to zero out all the file-specific attributes of
self .
- Parameters:
file - file containing some representation of an FST.
- Returns: dictionary of dictionary of dictionaries
|