# METADATA # Filename: # test.fst # Author: # D. Gibbon # Date: 2008-08-11 # Description: Demo fst file for ndfstinterpreter.py # Usage for ndfstinterpreter.py is: # ndfstinterpreter.py trace filename direction relation inputstring # (call with no arguments for further information) # Features: # - generous use of white space in fst configuration file (this file) # - error messages for fst configuration file input # - optional prettyprinted trace for fst run # ================================================================== # DEMO FST BEHAVIOUR # This fst transduces the following regular relation: # (a:A|a:X)*(a:Y|b:B)(c:C)? # Typical inputs in forward mode: # a, b, a a, a b, a a a, a a a b, ... b c, a a c, a b c, ... # Typical input and response: # ndfstinterpreter-work.py off forward test.fst 'a a b c' # ['A A B C', 'A X B C', 'X A B C', 'X X B C'] # ================================================================== # DEMO FST FORMATS # Initial state: initial = q0 # Set of terminal states: terminal = q1,q2 # Transition quadruples : # This is the set of fst transitions: fst = q0,a,A,q0; q0,a,X,q0; q0,a,Y,q1; q0,b,B,q1; q0,c,C,q2