| FSAs |   |
An FSA defines a set of strings. It is primarily used to accept and reject strings. |
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| FSTs |   |
Instead of defining sets of strings, FSTs defines sets of PAIRS of strings. A set of pairs in set theory is called a relation. FSTs define relations on strings. Not all string relations can be captured by FSTs (as we'll see). The set that can be captured is called the regular relations. Example 1: Sheep language transducer: transduces "b"s into 2 and "a"s into 1. Leaves "!" alone. Example 2: A and B swapper: Given a string that consist of an even number of a's followed by an even number of b's, it will swap the a's and b's. Python: Install nltk (NLTK home page) modules:
An FST is still an FSA with a relational alphabet. |
|||||||||||||||||||||
|
Upper and Lower |
  |
An FST therefore has TWO alphabets, the upper alphabets (left side of colons) and the lower alphabet (right side of colon):
|
|||||||||||||||||||||
|
Recognition Analysis Generation |
  |
The basic idea of a transducer is that it is an FSA with two tapes, which we will call the upper and lower tapes. Transducers can be run in three ways:
|
|||||||||||||||||||||
|
Non- Determinism |
  |
AS with FSAs, FSTs can be deterministic or non-deterministic.
|
|||||||||||||||||||||
| Epsilons |   |
FSTs can have epsilon transitions:
All of these possibilities have their uses. The only truly pernicious epsilon uses, as with FSAs, involve epsilon loops. Examples:
|
|||||||||||||||||||||
| Rules |   |
A key application of FSTs is rules. |
|||||||||||||||||||||
|
Closure Properties |
  |
From Jurafsky and Martin, Ch 2, we learned: FSAs are closed under:
FSTs have only a a subset of these closure properties:
Example:
In general for a transducer T1 and T2:
|
|||||||||||||||||||||
|
Simple Implementation Issues |
  |
Here's a python version of a transducer recognizer, which shows the close relationship of FSTs and FSAs. Python code. |
|||||||||||||||||||||
|
Finite-State Model |
  |
Phonological rules LOOK like context-sensitive grammar rules:
It turns out the languages described by Phonological rules are regular, because they obey an implicit restriction:
Note: It's not the rule itself that is the problem. It's the way the rule is allowed to apply: The domain of application of the rule must always move left or right, including the case where material is inserted. Using the description from Karttunen (1991), and using "^" to mark the position where the rule applies:
|
|||||||||||||||||||||
|
Rewriting Rules as Regular Relations |
  |
We allow rewrite rules. In the simplest case of a rewrite rule, an underlying form is ALWAYS rewritten ito some surface form: abc - > deThis says EVERY instance of "abc" is turned into a "de". This means the string "abc" is not part of the surface language. In general, reqrite rules have contexts. Consider a rule:
What strings stand in the relation? those that obey the rule.
In fact, Each rule defines a regular relation. [No proof given. Notice this is a claim about the practice of phonologists as well as a claim about human languages.] |
|||||||||||||||||||||
| Key Idea |
Since each rule defines a regular relation, it can be described by a Finite-State Transducer. In xfst: xfst[3]: read regex [a b c -> d e]; 472 bytes. 5 states, 22 arcs, Circular. xfst[4]: apply up apply up> abc apply up> de abc de apply up> xr xr (type Control-D) xfst[4]: apply down apply down> abc de apply down> de de apply down> abcabc dede apply down> xr xr apply down> (type Control-D) xfst[4]: apply up apply up> dede abcabc abcde deabc dede apply up> It is possible to define rules that apply in parallel, simultaneously to every portion of the string they are suited for: % xfst xfst[0]: read regex [a -> b, b -> a] ; 124 bytes. 1 state, 3 arcs, Circular. xfst[1]: apply up apply up> abba baab apply up> exit exit apply up> xfst[1]: apply down apply down> abba baab apply down> bbbbb aaaaa apply down> aaaaa bbbbb apply down> |
||||||||||||||||||||||
|
The regular relation of a rule |
Suppose we have a rule that
A rough approximation of the corresponding regular relation is:
This is approximate because it leaves out the complications due the fact that the output of a rule may serve as a context for another application. |
||||||||||||||||||||||
|
e-insertion Revisited |
  |
Here's the machine in the textbook. Here's another version generated by software tools we have in the CL lab (fsa).
|
|||||||||||||||||||||
|
Feasible Pairs |
  |
Corresponding to the notion of "alphabet" in our FSAs we have the the notion "feasible pairs" in our FST. If g:k is a feasible pair, then the last row in the table is:
Most sounds can be realized as themselves in some environment. Why? So each sound paired with itself is one of the feasible pairs:
|
|||||||||||||||||||||
|
Identity Relation |
  |
The regular relation which allows every symbol to be realized as itself is special. It is called the identity relation. |
|||||||||||||||||||||
|
Special Symbols |
  |
Some symbols are special and are never realized as themselves:
|
|||||||||||||||||||||
|
Rule- ordering: Karttunen's example |
Consider the following pair of rules.
(b) p -> m (  kampan -> kamman ) (a) changes N to m before p. (b) changes it to p to m following m. This transducer implements both rules. For xfst, I prepare a file named "kaNpat.regex" with the following contents: [ N -> m || _ p ] .o. [ p -> m || m _ ];This "composes" the two rules. Now to load these into xfst: %xfst xfst[1]: read regex < kaNpat.regex; Opening file kaNpat.regex... 356 bytes. 4 states, 15 arcs, Circular. Closing file kaNpat.regex... xfst[2]: apply down apply down> kaNpat kammat apply down> xfst[2]: apply up apply up> kammat kaNpat kampat kammat apply up> Points of note: Roughly: This defines a relation that accepts any underlying and surface tapes without an underlying N. More precisely, it accepts any surface tapes without an underlying N as long as the corresponding surface and underlying letters are feasible pairs. The feasible pairs:
|