# tones.fst # D. Gibbon, 2008-08-11 # =============================================================== # DESCRIPTION # The automaton models the following rules for a two-tone terracing language: # H -> h-constant / # _ # L -> l-constant / # _ # H -> h-upsweep / h _ # L -> l-upstep / h _ # H -> h-downstep / l _ # L -> l-downdrift / l _ # That is: # 1. the intial H or L tone is an approximate h or l constant, respectively. # 2. Following a H tone: # - a H tends to be realised higher (upsweep), # - a following L tends to be raised (upstep, e.g. to mid). # 3. Following a L tone: # - a L tends to be realised lower (downdrift), # - a following H tends to be lowerd (downstep). # 4. Only two well-defined levels of representation are required: # - underlying (represented by upper case), # - surface phonetic (represented by lower case). # 5. There is no extrinsic rule ordering: all rules apply opportunistically. # 6. The rules # - only depend on the immediately preceding tone, # - are *not* context-sensitive in the technical sense. # Typical input/output behaviour: # ndfstinterpreter.py off tones.fst forward on 'H H L L H H L L' # => H:h-cons H:h-upsw L:l-upst L:l-dwnd H:h-dwns H:h-upsw L:l-upst L:l-dwn # ndfstinterpreter.py off tones.fst forward off 'H H L L H H L L' # => h-cons h-upsw l-upst l-dwnd h-dwns h-upsw l-upst l-dwnd # ndfstinterpreter.py off tones.fst reverse off 'h-cons h-upsw l-upst l-dwnd h-dwns h-upsw l-upst l-dwnd' # => H H L L H H L L # ndfstinterpreter.py off tones.fst reverse on 'h-cons h-upsw l-upst l-dwnd h-dwns h-upsw l-upst l-dwnd' # h-cons:H h-upsw:H l-upst:L l-dwnd:L h-dwns:H h-upsw:H l-upst:L l-dwnd:L # Equivalent finite state netowrk: # Rough ASCII art representation # Arrowheads are indicated by {>, <, ^, V} # Phonetic output is abbreviated # # /\ H:upsw # V / # -----> (q1) # H:c/ ^| # / || # (q0) H:dwnst||L:upst # \ || # Lc\ |v # -----> (q2) # / ^ # L:dwndr \/ # Equivalent regular expression: # The central disjunction '|' covers H and L initial tones. # The other disjunctions permit demiterrace iterations and # main terrace iteration. # The final parenthesis permits correct termination. # The Kleene operators signify zero or more ('*') or one ('?') occurrences. # H:c ( H:upsw | L:upstp L:dwndr* H:dwnst )* ( L:upst L:dwndr* )? | # L:c ( L:dwnd | H:dwnst H:upswp* L:upstp )* ( H:downst H:upswp* )? # =============================================================== initial=q0 terminal=q1,q2 fst= q0,H,h-cons,q1; q0,L,l-cons,q2; q1,H,h-upsw,q1; q1,L,l-upst,q2; q2,H,h-dwns,q1; q2,L,l-dwnd,q2