2. Outline
●
●
●
●
●
What is Regular Expression
How to Implement Regular Expression
Finite-State Automata
FSA to Model Morphological Knowledge
Finite-State Transducer
3. What is Regular Expression?
● How to recognize a sheep language?
baa!
baaa!
baaaa!
...
● /ba+!/
4. How to Implement the Regular Expression?
● Use Finite-State Automata (有限狀態機) to
implement the regular expression
6. Finite-State Automata (cont.)
1. First, start in the start state (q0)
2. Check the next letter of the input
3. If it matches the symbol on an arc leaving the current
state, then cross that arc, move to the next state, and
also advance one symbol in the input.
7. Finite-State Automata (cont.)
4. If we are in the accepting state (q4) when we run out of
input, the machine has successfully recognized the
input as some legitimate sheep language.
5. If the machine never gets to the final state, it rejects the
input.
8. FSA to Model Morphological Knowledge
● How to recognize an English noun?
● The Problem of Nominal Inflection:
cat / cats
mouse / mice
9. FSA to Accept Nominal Inflection
reg-noun
plural
irreg-sg-noun
irreg-pl-noun
cat
s
mouse
mice