finite state methods in natural language processing 1
play

Finite-State Methods in Natural-Language Processing: 1Motivation - PowerPoint PPT Presentation

Finite-State Methods in Natural-Language Processing: 1Motivation Ronald M. Kaplan and Martin Kay Motivation 1 Finite-State Methods in Language Processing The Application of a branch of mathematics The regular branch of automata


  1. Finite-State Methods in Natural-Language Processing: 1—Motivation Ronald M. Kaplan and Martin Kay Motivation — 1

  2. Finite-State Methods in Language Processing The Application of a branch of mathematics — The regular branch of automata theory to a branch of computational linguistics in which what is crucial is (or can be reduced to) — Properties of string sets and string relations with — A notion of bounded dependency Motivation — 2

  3. Applications Finite Languges • Approximations to — Dictionaries • phenomena involving — Compression mostly bounded dependency Phenomena involving • — Syntax bounded dependency Phenomena that can be — Morpholgy • translated into the realm of • Spelling strings with bounded • Hyphenation dependency • Tokenization — Syntax • Morphological Analysis — Phonology Motivation — 3

  4. Correspondences Computational Device Finite-State Automaton Descriptive Notation: Set of Objects : Regular Expression Regular Language Motivation — 4

  5. The Basic Idea • At any given moment,an automaton is in one of a finite number of states • A transition from one state to another is possible when the automaton contains a corresponding transition. • The process can stop only when the automaton is in one of a subset of the states, called final . • Transitions are labeled with symbols so that a sequence of transitions corresponds to a sequence of symbols. Motivation — 5

  6. Bounded Dependency The choice between γ 1 and γ 2 depends on a bounded number of preceding symbols. γ 1 ? γ 2 Motivation — 6

  7. Bounded Dependency The choice between γ 1 and γ 2 depends on a bounded number of preceding symbols. γ 1 s i s i ? γ 2 irrelevant Motivation — 7

  8. Closure Properties and Operations • By definition — Union — Concatenation — Iteration • By deduction — Intersection — Complementation — Substitution — Reversal — ... Motivation — 8

  9. Operations on Languages and Automata For the set-theoretic operations on languages there are corresponding operations on automata. M ( L 1 ⊗ L 2) = M ( L 1) ⊕ M ( L 2) M ( L ) is a machine that characterizes the language L . We will use the same symbols for corresponding operations We will use the same symbols for corresponding operations Motivation — 9

  10. Automata-based Calculus • Closure gives: — Complementation → Universal quantification — Intersection → Combinations of constraints • Machines give: — Finite representations for (potentially) infinite sets — Practical implementation • Combination gives: — Coherence — Robustness — Reasonable machine transformations Motivation — 10

  11. Quantification Σ * xy Σ * There is an x followed by a y in the string Σ * xy Σ * There is no xy sequence in the string Σ * xy Σ * There is a y preceded by something that is not an x Σ * xy Σ * Every y is preceded by an x . ∃ y . ∃ x . precedes ( x , y ) Motivation — 11

  12. Universal Quantification— i before e except after c e Σ * cei Σ * e r e h t o i, other c c e, i, other c Motivation — 12

  13. Universal Quantification— i before e except after c Not after c or e: anything but ei e e After e: no i r e h t o i, other c c e, i, other After c: anything c Motivation — 13

  14. Only e i after c e Σ * cei Σ * ∩Σ * cie Σ * e other c i,other c e , o t i,other h e r c i c 4 Motivation — 14

  15. Only e i after c Not after c or e: anything but ei e e After e: no i other c i,other c e , o t i,other h e After c: not ie r c i c After ci: no e 4 Motivation — 15

  16. Alternative Notations Closure ⇒ Recursive Formalisms ⇒ Higher-level Constructs L 1 ← L 2 L 1 L 2 ≡ Σ * cei Σ * Σ * c ← ei Σ * ≡ Choose notation for theoretical significance and practical convenience. Motivation — 16

  17. What is a Finite-State Automaton? • An alphabet of symbols, • A finite set of states, • A transition function from states and symbols to states, • A distinguished member of the set of states called the start state , and • A distinguished subset of the set of states called final states . Pace terminology, same definition as for Pace terminology, same definition as for directed graphs with labeled edges, plus directed graphs with labeled edges, plus initial and final states. initial and final states. Motivation — 17

  18. i to x Unless otherwise marked, the start state is usually the leftmost in x the diagram v i i i 0 2 1 3 4 i i 5 v, x We draw final states with a double circle Motivation — 18

  19. Regular Languages • Languages — sets of strings • Regular languages — a subset of languages • Closed under concatenation, union, and iteration • Every regular language is chracterized by (at least) one finite-state automaton • Languages may contain infinitely many strings but automata are finite Motivation — 19

  20. Regular Expressions • Formulae with operators that denote — union — concatenation — iteration a* [b | c] a* [b | c] Any number of a ’s followed by either b or c. Motivation — 20

  21. Some Motivations • Word Recognition • Dictionary Lookup • Spelling Conventions Motivation — 21

  22. Word Recognition A word recognizer takes a string of characters as input and returns “yes” or “no” according as the word is or is not in a given set. Solves the membership problem. e.g. Spell Checking, Scrabble Motivation — 22

  23. Approximate methods • Has right set of letters (any order). • Has right sounds (Soundex). • Random (suprimposed) coding (Unix Spell) hash 1 Bit Word hash 2 Table hash k Motivation — 23

  24. Exact Methods • Hashing • Search (linear, binary ...) k r v a • Digital search (“Tries”) d r a k d c a a b e h s s g i n a c k z b z d u e s g i n Folds together common prefixes Motivation — 24

  25. Exact Methods (continued) • Finite-state automata Folds together common prefixes and suffixes Motivation — 25

  26. Enumeration vs. Description • Enumeration — Representation includes an item for each object. Size = f(Items) • Description — Representation provides a characterization of the set of all items. Size = g(Common properties, Exceptions) — Adding item can decrease size. Motivation — 26

  27. Classification Exact Approximate Enumeration Hash table Soundex Binary search Description Trie Unix Spell FSM Right letter Motivation — 27

  28. FSM Extends to Infinite Sets Productive compounding Kindergartensgeselschaft Motivation — 28

  29. Statistics English Portuguese Vocabulary Words 81,142 206,786 KBytes 858 2,389 PKPAK 313 683 PKZIP 253 602 FSM States 29,317 17,267 Transitions 67,709 45,838 KBytes 203 124 From Lucchese and Kowaltowski (1993) Motivation — 29

  30. Dictionary Lookup Dictionary lookup takes a string of characters as input and returns “yes” or “no” according as the word is or is not in a given set and returns information about the word . Motivation — 30

  31. Lookup Methods Approximate — guess the information If it ends in “ed”, it’s a past-tense verb. Exact — store the information for finitely many words Table Lookup • Hash • Search • Trie —store at word-endings. FSM • Store at final states? No suffix collapse — reverts to Trie. Motivation — 31

  32. Word Identifiers Associate a unique, useful, identifier with each of n words, e.g. an integer from 1 to n . This can be used to index a vector of dictionary information. word → i Information i n Motivation — 32

  33. Pre-order Walk A pre-order walk of an n- word FSM, counting final states, assigns such integers, even if suffixes are collapsed ⇒ Linear Search. drip → 1 drips → 2 drop → 3 drops → 4 Motivation — 33

  34. Suffix Counts • Store with each state the size of its suffix set • Skip irrelevant transitions, incrementing count by destination suffix sizes. 2 4 4 4 1 0 drip → 1 drips → 2 drop → 3 drops → 4 Motivation — 34

  35. • Minimal Perfect Hash (Lucchesi and Kowaltowski) • Word-number mapping (Kaplan and Kay, 1985) Motivation — 35

  36. Spelling Conventions iN+tractable → intractable iN+practical → impractical iN is the common negative prefix — im before labial — in otherwise c.f. input → input Motivation — 36

  37. An in/im Transducer No exit from this state except over a labial. No labials from this state Motivation — 37

  38. Generation — “intractable” N 1 i m 0 0 N t r a i 2 0 0 n t r a Motivation — 38

  39. Generation — “impractical” N p r a 1 0 0 i m p r a 0 0 N i 2 n Motivation — 39

  40. Recognition — “intractable” n t r a 0 0 0 i n t r a 0 0 N t r a i 2 0 0 n t r a Motivation — 40

  41. Generation — “input” N p u t 1 0 0 0 i m p u t 0 0 N i 2 n Motivation — 41

  42. A Word Transducer Finite-State Base Forms Transducers Morphology Finite-state Machine Spelling Rules Finite-state machine Text Forms Motivation — 42

Recommend


More recommend