360 likes | 464 Views
Finite-State Technology and Linguistic Applications. 12-16 March 2001 Xerox Research Centre Europe Grenoble Laboratory 6, chemin de Maupertuis 38240 MEYLAN, France Kenneth BEESLEY. Ken Beesley: Brief Introduction. B.A., Linguistics and Computer Science, Brigham Young University, 1978
E N D
Finite-State Technology and Linguistic Applications 12-16 March 2001 Xerox Research Centre Europe Grenoble Laboratory 6, chemin de Maupertuis 38240 MEYLAN, France Kenneth BEESLEY
Ken Beesley: Brief Introduction • B.A., Linguistics and Computer Science, Brigham Young University, 1978 • Diploma, Linguistics and Phonetics, Univ. of Glasgow, 1979 • D.Phil., “Epistemics” (Cognitive Science), Univ. of Edinburgh, 1983 • ALPNET, computer assisted translation, 1984-1990 • 1988-1990 Arabic morphology project, exposure to Finite-State Morphology from Lauri Karttunen at COLING 1988 • Microlytics (Xerox spinoff), 1990-1993 • Xerox Corporation 1993-present • Morphology projects: Arabic, Spanish, Portuguese, Italian, Dutch, (Malay), (Aymara); also teaching finite-state programming techniques • Some people are into finite-state programming for the mathematics and algorithms; I’m in it because it lets me build working systems for interesting natural languages.
Goals for the Week • Introduce finite-state theory • Introduce the Xerox Finite-State “Calculus”, a practical software implementation of the theory: xfst, lexc • Try to convince you that finite-state natural-language processing is a Good Thing • The Hope: Inspire a few of you to start your own computational projects, perhaps on Maltese Finite-state techniques are widely used today in both research and industry for natural-language processing. The software implementations and documentation are improving steadily, and they are increasingly available to all of us.
Schedule • Monday 12 March LC1117 Gentle Introduction • 17.00-19.00 • Tuesday 13 Unix Lab Intro. to xfst • 17.00-19.30 • Wednesday 14 Unix Lab More on xfst • 10.00-12.30 • Thursday 15 Unix Lab Intro. to lexc • 17.00-19.30 • Friday 16 403 CCT Linguistics Circle • 18.30-20.00
Today’s Goals • Understand “Regular” Languages and Relations. • Understand the mathematical operations that can be performed on such Languages and Relations. • Understand how Languages, Relations, Regular Expressions, and Networks are interrelated. • Understand that we can create finite-state networks and compute with them using Xerox Finite-State Technology • xfst interface • Regular-Expression Compiler • Access to Finite-State Algorithms • lexc language • Used mainly for lexicons and for describing morphotactics
Why is “Finite State” Computing So Interesting? • Finite-state systems are mathematically elegant, easily manipulated and modifiable. • Computationally efficient. Usually very compact. • The programming we linguists do is declarative. We describe the facts of our natural language; i.e. we write grammars. We do not hack ad hoc code. • The runtime code, which applies our systems to linguistic input, is already written and it is completely language-independent. • Finite-state systems are inherently bidirectional: we can use the same system to analyze and to generate.
What is Finite-State Computing Good For? • Mostly “lower-level” natural language processing • Tokenization • Spelling checking/correction • Phonology • Morphological Analysis/Generation Emphasis this week • Part-of-Speech Tagging • “Shallow” Syntactic Parsing and “Chunking” Finite-state techniques cannot do everything; but for tasks where they do apply, they are extremely attractive.
Where is Xerox Finite-State Technology Used? • Xerox Research • Xerox Palo Alto Research Center • Xerox Research Centre Europe • Xerox Business Units and Partners • ATS • MKMS • Inxight • Universities and Research Groups • Over 70 licensees • We would like to make Xerox technology the de facto standard
The Gentle Introduction • Chapter 1 of The Book • Physical Finite-State Machines (Automata) • Linguistic Finite-State Machines • Symbol • Alphabet • Language • Lookup and Generation • Quick Review of Set Theory • Languages, Relations and Transducers
Physical Machines with Finite States • The Lightswitch Machine PUSH UP OFF ON PUSH DOWN
Physical Machines with Finite States • The Lightswitch Toggle Machine PUSH OFF ON PUSH
Physical Machines with Finite States • The Fan in Ken’s Old Car R R R LOW MED HI OFF L L L
Physical Machines with Finite States • Three-Way Lightswitch R R R LOW MED HI OFF R
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
Physical Machines with Finite States • The Cola Machine Start State Final/Accept State N N N N N 5 10 15 20 25 0 D D D D Q
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
Linguistic Machines a n t o c t g i r e m a e s “Apply” m e s a
More Linguistic Machines c l e a r v e e A Transducer “Apply Down” mesas+Noun+Fem+Pl m e s a +Noun +Fem +Pl m e s a 0 0 s “Apply Up” m e s a s
A Morphological Analyzer Analysis Word Language Transducer Surface Word Language
A Quick Review of Set Theory • A set is a collection of objects. B A E D We can enumerate the “members” or “elements” of finite sets: { A, D, B, E}. There is no significant order in a set, so { A, D, B, E } is the same set as { E, A, D, B }, etc.
Uniqueness of Elements • You cannot have two or more ‘A’ elements in the same set B A D E { A, A, D, B, E} is just a redundant specification of the set { A, D, B, E }.
Cardinality of Sets • The Empty Set: • A Finite Set: • An Infinite Set: e.g. The Set of all Positive Integers Norway Denmark Sweden
Simple Operations on Sets: Union A B D E C Set 1 Set 2 B C A D E Union of Set1 and Set 2
Simple Operations on Sets (2): Union A B C D C Set 1 Set 2 B C A D Union of Set1 and Set 2
Simple Operations on Sets (3): Intersection A B C D C Set 1 Set 2 C Intersection of Set1 and Set 2
Simple Operations on Sets (4): Subtraction A B C D C Set 1 Set 2 A B Set 1 minus Set 2
Formal Languages Very Important Concept in Formal Language Theory: A Language is just a Set of Words. • We use the terms “word” and “string” interchangeably. • A Language can be empty, have finite cardinality, or be infinite in size. • You can union, intersect and subtract languages, just like any other sets.
Union of Languages (Sets) dog cat rat elephant mouse Language 1 Language 2 dog cat rat elephant mouse Union of Language 1 and Language 2
Intersection of Languages (Sets) dog cat rat elephant mouse Language 1 Language 2 Intersection of Language 1 and Language 2
Intersection of Languages (Sets) dog cat rat rat mouse Language 1 Language 2 rat Intersection of Language 1 and Language 2
Subtraction of Languages (Sets) dog cat rat rat mouse Language 1 Language 2 dog cat Language 1 minus Language 2
Languages • A language is a set of words (=strings). • Words (strings) are composed of symbols (letters) that are “concatenated” together. • At another level, words are composed of “morphemes”. • In most natural languages, we concatenate morphemes together to form whole words. For sets consisting of words (i.e. for Languages), the operation of concatenation is very important.
Concatenation of Languages work talk walk 0 ing ed s Root Language Suffix Language The concatenation of the Suffix language after the Root language. work working worked works talk talking talked talks walk walking walked walks
Languages and Networks 0 t a s w a l k s s o i r n g e Network/Language 1 d Network/Language 2 0 a t s w a l k The concatenation of Network 1 and Network 2 s i o n g r e d
Grammars, Languages, Networks Grammar written in xfst or lexc Describes Compiles Into Language or Relation Finite-State Network Recognize or Map In the coming days, we will learn how to write xfst and lexc grammars and compile them into working systems.
Tasks/Exercises • Read chapter 1, at least up to page 28 • Do Exercises 1.10.1 (page 34) and 1.10.2 (page 36). • For more rigor, read Chapter 2. Do the graphing exercise in Appendix B (page 381).