LING 581: Advanced Computational Linguistics Lecture Notes April 2nd.

Slides:



Advertisements
Similar presentations
Grammar types There are 4 types of grammars according to the types of rules: – General grammars – Context Sensitive grammars – Context Free grammars –
Advertisements

C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Grammars, constituency and order A grammar describes the legal strings of a language in terms of constituency and order. For example, a grammar for a fragment.
About Grammars CS 130 Theory of Computation HMU Textbook: Sec 7.1, 6.3, 5.4.
LING 581: Advanced Computational Linguistics Lecture Notes March 26th.
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
ICE1341 Programming Languages Spring 2005 Lecture #5 Lecture #5 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
ICE1341 Programming Languages Spring 2005 Lecture #4 Lecture #4 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 7: 9/12.
Theory of Computation What types of things are computable? How can we demonstrate what things are computable?
PZ02A - Language translation
LING 388 Language and Computers Take-Home Final Examination 12/9/03 Sandiway FONG.
1 Foundations of Software Design Lecture 23: Finite Automata and Context-Free Grammars Marti Hearst Fall 2002.
LING 388 Language and Computers Lecture 11 10/7/03 Sandiway FONG.
Normal forms for Context-Free Grammars
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Models of Generative Grammar Smriti Singh. Generative Grammar  A Generative Grammar is a set of formal rules that can generate an infinite set of sentences.
Language Translation Principles Part 1: Language Specification.
Three Generative grammars
The Nature of Computer Languages. Grammars Since the development of ALGOL in the mid 1950s, programming languages have been described using formal grammars.
1 13. LANGUAGE AND COMPLEXITY 2007 년 11 월 03 일 인공지능연구실 한기덕 Text: Speech and Language Processing Page.477 ~ 498.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 7 Mälardalen University 2010.
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
Tree-adjoining grammar (TAG) is a grammar formalism defined by Aravind Joshi and introduced in Tree-adjoining grammars are somewhat similar to context-free.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
Lecture 23: Finite State Machines with no Outputs Acceptors & Recognizers.
CS/IT 138 THEORY OF COMPUTATION Chapter 1 Introduction to the Theory of Computation.
Winter 2007SEG2101 Chapter 71 Chapter 7 Introduction to Languages and Compiler.
1 Chapter 3 Describing Syntax and Semantics. 3.1 Introduction Providing a concise yet understandable description of a programming language is difficult.
Pushdown Automata (PDAs)
Languages, Grammars, and Regular Expressions Chuck Cusack Based partly on Chapter 11 of “Discrete Mathematics and its Applications,” 5 th edition, by Kenneth.
Grammars CPSC 5135.
Lecture # 5 Pumping Lemma & Grammar
Copyright © by Curt Hill Grammar Types The Chomsky Hierarchy BNF and Derivation Trees.
CS 461 – Sept. 19 Last word on finite automata… –Scanning tokens in a compiler –How do we implement a “state” ? Chapter 2 introduces the 2 nd model of.
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 4.
Introduction to Parsing
Center for PersonKommunikation P.1 Background for NLP Questions brought up by N. Chomsky in the 1950’ies: –Can a natural language like English be described.
1 Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
11 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 7 School of Innovation, Design and Engineering Mälardalen University 2012.
Grammars A grammar is a 4-tuple G = (V, T, P, S) where 1)V is a set of nonterminal symbols (also called variables or syntactic categories) 2)T is a finite.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Computability Review homework. Video. Variations. Definitions. Enumerators. Hilbert's Problem. Algorithms. Summary Homework: Give formal definition of.
Lecture 16: Modeling Computation Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output.
Formal Languages and Grammars
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Chapter 4: Syntax analysis Syntax analysis is done by the parser. –Detects whether the program is written following the grammar rules and reports syntax.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
CSE 311 Foundations of Computing I Lecture 19 Recursive Definitions: Context-Free Grammars and Languages Spring
CMSC 330: Organization of Programming Languages Pushdown Automata Parsing.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
LING 581: Advanced Computational Linguistics Lecture Notes April 6th.
Topic 3: Automata Theory 1. OutlineOutline Finite state machine, Regular expressions, DFA, NDFA, and their equivalence, Grammars and Chomsky hierarchy.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesAlgebraic.
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
Course 1 Introduction to Formal Languages and Automata Theory (part 1)
Automata and Languages What do these have in common?
Natural Language Processing - Formal Language -
Formal Language Theory
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
Intro to Data Structures
Regular Expressions
Language translation Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Presentation transcript:

LING 581: Advanced Computational Linguistics Lecture Notes April 2nd

Word Smart for the GRE Non-programmers can take more time on this assignment… you can combine my sample breadth-first search Perl code, e.g. bfs3.perl, and try to compute connections between words and meanings and store them into a table. Then you want to pair them up according to some objective function – Modify bfs3.perl: 1.map (raw) words into word#pos#sense (code snippet was given) 2.call the search for each word and meaning, store length (and maybe path as well) into a table 3.write code to go through the table and output "best" matches If your programming skills aren't quite up to the task, you may submit the table (step 3) and do the best matches by hand

Answers Quiz 5: WordDefinition 1.arcaneoutdateda. 2.arduousmysteriousb. 3.arabesquehold one's attentionc. 4.asperityimpudentd. 5.asceticstrenuouse. 6.arrantcomplex designf. 7.artlessaustereg. 8.archaicharshnessh. 9.arrestnaturali. 1 b 2 e 3 f 4 h 5 g 6 d 7 i 8 a 9 c

Answers Quiz 8: WordDefinition 1.bellicoseinclinationa. 2.bentmisrepresentb. 3.blandishcarefreec. 4.bolsterbelligerentd. 5.boisterouspompouse. 6.blithesupportf. 7.beliefawng. 8.bedizenloudh. 9.bombasticadorni. 1 d 2 a 3 g 4 f 5 h 6 c 7 b 8 i 9 e

Answers Quiz 16: WordDefinition 1.discordantharsh denunciationa. 2.discomfitintended to teachb. 3.disabusetool used for shapingc. 4.dinshyd. 5.dilettantestray from the pointe. 6.dilatorycausing delayf. 7.digressamateurg. 8.diffidentloud noiseh. 9.dieundeceivei. 10.didacticfrustratej. 11.diatribeconflictingk. 1 k 2 j 3 i 4 h 5 g 6 f 7 e 8 d 9 c 10 b 11 a

Digression Generative capacity of (natural) language …

Chomsky Hierarchy Formal language theory [Chomsky, 1956] Finite state languages Context-free languages Context-sensitive languages Recursively enumerable (r.e.) languages

Chomsky Hierarchy grammar vs. machine characterization – A → aB, A → a – equivalent to a directed finite network of states and transitions Finite state languages 01 ab 3 cde ab > 2 fg ab S → aB B → bC C → cD D → dE E → eF F → fG G → g G → aH H → bC F → aI I → bC S → aB B → bC C → cD D → dE E → eF F → fG G → g G → aH H → bC F → aI I → bC Birdsong: Bengalese finch song [Berwick et al., 2011] Birdsong

Some useful notions Mathematical notion of a language as a set of strings L(Bengalese finch song) = {abcdefg, abcdeabcdefg, abcdefgabcdefg,.. } Discrete infinity – “A fsm is the simplest type of grammar which, with a finite amount of apparatus, can generate an infinite number of sentences.” 01 ab 3 cde ab > 2 fg ab Birdsong: Bengalese finch song [Berwick et al., 2011]

Discussion Finite state machine simply encodes precedence relations between elements of the string The (regular) grammar characterization adds in (possibly unintended) hierarchical relations between elements 01 ab 3 cde ab > 2 fg ab Birdsong: Bengalese finch song [Berwick et al., 2011] S → aB B → bC C → cD D → dE E → eF F → fG G → g G → aH H → bC F → aI I → bC S → aB B → bC C → cD D → dE E → eF F → fG G → g G → aH H → bC F → aI I → bC

Chomsky Hierarchy grammar vs. machine characterization – A → aB, A → a – equivalent to a directed finite network of states and transitions Finite state languages Birdsong English is not a finite state language [(9) pg.21, Chomsky, 1955] (11) (i) If S1, then S2 *If S1, or S2 (ii) Either S3, or S4 *Either S3, then S4 Context-free languages if-S-then-S either-S-or-S if-S-then-S either-S-or-S Context-free rules: S → if S, then S S → either S, or S or a pushdown automaton (= fsm + stack) “there are processes of sentence formation that fsm are intrinsically unable to handle.” [pg23, Chomsky, 1955]

Discussion (contd.) Grammatical construction – If.., then – Either.., or – “A grammatical construction is a syntactic template that is paired with conventionalized semantic and pragmatic content” [Wikipedia] In some modern linguistic theories, constructions have little or no distinguished theoretical status

Chomsky Hierarchy Finite state languages Birdsong Context-free languages if-S-then-S either-S-or-S if-S-then-S either-S-or-S English is not a context-free language [Higginbotham, 1984] – the woman such that she left is here Construction: relative clause + extra dependencies the woman such that (the man such that) she (gave this to him) left is here the woman such that (the man such that the man such that) she (gave this to him gave him to this) left is here

Discussion (contd.) – “if a grammar does not have recursive devices (e.g. loops in fsm) it will be prohibitively complex. If it does have recursive devices of some sort, it will produced infinitely many sentences.” [pg24, Chomsky, 1995] Suppose human language is generated by some form of a recursive device: – human language admits infinitely many sentences – sentences can be arbitrarily long in principle (practical limitations on utterance length, working memory etc.) Commonsense notion of grammaticality becomes a bit fuzzy

Chomsky Hierarchy (Fine Grained) Crossing dependencies (found in Dutch and Swiss-German) Finite state languages Context-free languages Mildly context-sensitive languages Birdsong Crossing dependencies (figures taken from [Kallmeyer, 2005]) Tree-adjoining Grammar (TAG) [Joshi] Linear Indexed Grammar [Gazdar] Combinatory Categorial Grammar [Steedman] if-S-then-S either-S-or-S if-S-then-S either-S-or-S

Indexed grammars Mildly context-sensitive languages (linear indexed grammars) Finite state languages Context-free languages if-S-then-S either-S-or-S Context-sensitive languages Chomsky Hierarchy (Fine Grained) Crossing dependencies Birdsong Computational advantage: polynomial time parsable

Primate language Northern muriquis Group studied extensively since 1982 Data collected – 212 sequential exchanges vocalizations, emitted by several members: – 10 adult males (n=80), – 1 sub adult male (n=1), – 17 adult females (n=122), and – 2 sub adult females (n=3) – sequential exchange = vocalization of an individual and the response of different group members – Muriqui vocalizations have a quite long duration allowing to analyze them as sequences of different elements that are repeated or varied over time – It is possible to identify subparts in vocalizations that we designate by the term ‘segmental’ units

Primate language Sample utterance t p t p t p p t p p p t p p p p G t

Indexed grammars Mildly context-sensitive languages (linear indexed grammars) Finite state languages Context-free languages if-S-then-S either-S-or-S Crossing dependencies Birdsong string containing an arithmetic progression Primate language Sequence: – tp tpp.. tpp..p Gt (monotonically increasing # p's) Arithmetic progression sequences

Primate language Sequence: – tp tpp.. tpp..p Gt (arithmetic progression) Indexed grammar [Aho, 1967] – equivalent to nested stack automaton – S[..] →K[p..] Gt – K[..] → tP[..] K[p..] – K[..] → tP[..] – P[p..] → pP[..] – P[] → [] Example derivation: S[] => K[p] Gt => tP[p] K[pp] Gt => tp K[pp] Gt => tp tP[pp] K[ppp] Gt => tp tpp K[ppp] Gt => tp tpp tP[ppp] K[pppp] Gt => tp tpp tppp tP[pppp] Gt => tp tpp tppp tpppp Gt Example derivation: S[] => K[p] Gt => tP[p] K[pp] Gt => tp K[pp] Gt => tp tP[pp] K[ppp] Gt => tp tpp K[ppp] Gt => tp tpp tP[ppp] K[pppp] Gt => tp tpp tppp tP[pppp] Gt => tp tpp tppp tpppp Gt Each non- terminal has individual stack copy

Primate language Sequence: – tp tpp.. tpp..p Gt (arithmetic progression) Rely on a crucial distinction between Indexed grammars (IG) and the strictly smaller class of Linear indexed grammars (LIG) – at most one nonterminal in each production be specified as receiving the stack, whereas in a normal indexed grammar, all nonterminals receive copies of the stack [Vijay-Shanker and Weir, 1994] demonstrated that LIG, CCG, TAG are all (weakly) equivalent formalisms = “Mildly Context- Sensitive Languages” Intuition: indexed grammar with binary branching 1 st nonterminal generates k p’s, and 2 nd nonterminal recursively generates sequences involving k+1 p’s Intuition: indexed grammar with binary branching 1 st nonterminal generates k p’s, and 2 nd nonterminal recursively generates sequences involving k+1 p’s

Indexed grammars Mildly context-sensitive languages (linear indexed grammars) Finite state languages Context-free languages if-S-then-S either-S-or-S Context-sensitive languages Chomsky Hierarchy (Fine Grained) Crossing dependencies Birdsong Computational dis- advantage: not polynomial time parsable Arithmetic progression sequences

Discussion (contd.) Possible objection – did I pick out a hard subset of an easy language? Finite state language “const- ruction” for example, a subset of a finite state language is not necessarily a finite state language

Discussion (contd.) Data what counts as a “construction” here?

Discussion (contd.) Weak generative capacity: – rely on surface string patterning only S[..] →K[p..] Gt K[..] → tP[..] K[p..] K[..] → tP[..] P[p..] → pP[..] P[] → [] S[..] →K[p..] Gt K[..] → tP[..] K[p..] K[..] → tP[..] P[p..] → pP[..] P[] → [] non-terminal and terminal symbols No intuition about the “constituents” of muriqui language

Finite state languages Context-free languages Mildly context-sensitive languages (linear indexed grammars) Indexed grammars if-S-then-S either-S-or-S Context-sensitive languages Human Languages