Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Computational Linguistics Finite State Machines (derived from Ken Beesley)

Similar presentations


Presentation on theme: "Introduction to Computational Linguistics Finite State Machines (derived from Ken Beesley)"— Presentation transcript:

1 Introduction to Computational Linguistics Finite State Machines (derived from Ken Beesley)

2 Language and Notation LANGUAGE NOTATION = a set of strings = a specialised formalism

3 Language and Notation NOTATION sing s[aiou]ng s.ng (sing|song) [0-9] [0-9][0-9] [0-9]* LANGUAGE sing sang, sing,song,sung sang, sing,song,sung… sing,song 0,1,2,3,4,5,6,7,8,9 01,02,03,...99 0…9,00…99,000…999…

4 Languages, Notations and Machines LANGUAGE NOTATION MACHINE

5 Regular Languages and Finite State Machines REGULAR LANGUAGE REGULAR EXPRESSION FINITE STATE MACHINE describe recognise

6 Physical Machines with Finite States The Lightswitch Machine OFFON PUSH UP PUSH DOWN

7 Physical Machines with Finite States The Lightswitch Toggle Machine OFFON PUSH

8 Physical Machines with Finite States The Fan in Ken Beesley’s Old Car OFF HILOWMED RRR L LL

9 Physical Machines with Finite States Three-Way Lightswitch OFF HILOWMED RRR R

10 The Cola Machine Need to enter 25 cents (USA) to get a drink Accepts the following coins: –Nickel = 5 cents –Dime = 10 cents –Quarter = 25 cents For simplicity, our machine needs exact change We will model only the coin-accepting mechanism

11 Physical Machines with Finite States The Cola Machine 0 N D Q NNNN DDD 510152025 Start StateFinal/Accept State

12 Finite State Automaton A Finite State Automaton comprises: An alphabet (a set of symbols) A set of states of which –one or more is a start state –one or more is a final state A transition function indicating the transitions between states according to symbols from the alphabet.

13 Finite State Recognition A given FSM recognises a string if, from the start state, there is a path to a final state in which each transition is licenced by the transition function applied to successive characters in the string. An FSM recognises a language if it recognises every string in the language.

14 The Cola Machine Language List of all the sequences of coins accepted: –Q –DDN –DND –NDD –DNNN –NDNN –NNDN –NNND –NNNNN Think of the coins as SYMBOLS or CHARACTERS The set of symbols accepted is the ALPHABET of the machine Think of sequences of coins as WORDS or “strings” The set of words accepted by the machine is its LANGUAGE

15 Linguistic Machines c ant o t i g re m e s a m e s a “Apply”

16 A Morphological Analyzer FS Transducer Surface Word Language DOGS Lexical Word Language DOG +PL


Download ppt "Introduction to Computational Linguistics Finite State Machines (derived from Ken Beesley)"

Similar presentations


Ads by Google