Informatics 2A: Language Complexity and the. Inf2A: Chomsky Hierarchy

Similar documents
Grammars & Parsing, Part 1:

Syntax Parsing 1. Grammars and parsing 2. Top-down and bottom-up parsing 3. Chart parsers 4. Bottom-up chart parsing 5. The Earley Algorithm

CS 598 Natural Language Processing

ENGBG1 ENGBL1 Campus Linguistics. Meeting 2. Chapter 7 (Morphology) and chapter 9 (Syntax) Pia Sundqvist

Natural Language Processing. George Konidaris

Language properties and Grammar of Parallel and Series Parallel Languages

A General Class of Noncontext Free Grammars Generating Context Free Languages

Proof Theory for Syntacticians

Erkki Mäkinen State change languages as homomorphic images of Szilard languages

COMPUTATIONAL COMPLEXITY OF LEFT-ASSOCIATIVE GRAMMAR

Basic Parsing with Context-Free Grammars. Some slides adapted from Julia Hirschberg and Dan Jurafsky 1

A Minimalist Approach to Code-Switching. In the field of linguistics, the topic of bilingualism is a broad one. There are many

Psychology and Language

The History of Language Teaching

1/20 idea. We ll spend an extra hour on 1/21. based on assigned readings. so you ll be ready to discuss them in class

Introduction to HPSG. Introduction. Historical Overview. The HPSG architecture. Signature. Linguistic Objects. Descriptions.

A Grammar for Battle Management Language

RANKING AND UNRANKING LEFT SZILARD LANGUAGES. Erkki Mäkinen DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A ER E P S I M S

NAME: East Carolina University PSYC Developmental Psychology Dr. Eppler & Dr. Ironsmith

An Introduction to the Minimalist Program

Approaches to control phenomena handout Obligatory control and morphological case: Icelandic and Basque

Prediction of Maximal Projection for Semantic Role Labeling

A Pumpkin Grows. Written by Linda D. Bullock and illustrated by Debby Fisher

Multiple case assignment and the English pseudo-passive *

Control and Boundedness

Derivational: Inflectional: In a fit of rage the soldiers attacked them both that week, but lost the fight.

Morphotactics as Tier-Based Strictly Local Dependencies

Context Free Grammars. Many slides from Michael Collins

Constraining X-Bar: Theta Theory

IN THIS UNIT YOU LEARN HOW TO: SPEAKING 1 Work in pairs. Discuss the questions. 2 Work with a new partner. Discuss the questions.

How to Use Vocabulary Maps to Deliver Explicit Vocabulary Instruction: A Guide for Teachers

Parsing of part-of-speech tagged Assamese Texts

Chapter 4: Valence & Agreement CSLI Publications

Underlying and Surface Grammatical Relations in Greek consider

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

Construction Grammar. University of Jena.

Abstractions and the Brain

Dependency, licensing and the nature of grammatical relations *

CAN PICTORIAL REPRESENTATIONS SUPPORT PROPORTIONAL REASONING? THE CASE OF A MIXING PAINT PROBLEM

Genevieve L. Hartman, Ph.D.

The Strong Minimalist Thesis and Bounded Optimality

Correspondence between the DRDP (2015) and the California Preschool Learning Foundations. Foundations (PLF) in Language and Literacy

Pseudo-Passives as Adjectival Passives

Minimalism is the name of the predominant approach in generative linguistics today. It was first

Intra-talker Variation: Audience Design Factors Affecting Lexical Selections

Compositional Semantics

CLASSIFICATION OF PROGRAM Critical Elements Analysis 1. High Priority Items Phonemic Awareness Instruction

Reading Grammar Section and Lesson Writing Chapter and Lesson Identify a purpose for reading W1-LO; W2- LO; W3- LO; W4- LO; W5-

CELTA. Syllabus and Assessment Guidelines. Third Edition. University of Cambridge ESOL Examinations 1 Hills Road Cambridge CB1 2EU United Kingdom

"f TOPIC =T COMP COMP... OBJ

Stacks Teacher notes. Activity description. Suitability. Time. AMP resources. Equipment. Key mathematical language. Key processes

Developing Grammar in Context

Concept Acquisition Without Representation William Dylan Sabo

Using dialogue context to improve parsing performance in dialogue systems

AQUA: An Ontology-Driven Question Answering System

2014 Free Spirit Publishing. All rights reserved.

The presence of interpretable but ungrammatical sentences corresponds to mismatches between interpretive and productive parsing.

Basic Syntax. Doug Arnold We review some basic grammatical ideas and terminology, and look at some common constructions in English.

Occupational Therapy and Increasing independence

LNGT0101 Introduction to Linguistics

Mercer County Schools

Tracy Dudek & Jenifer Russell Trinity Services, Inc. *Copyright 2008, Mark L. Sundberg

BANGLA TO ENGLISH TEXT CONVERSION USING OPENNLP TOOLS

Are You Ready? Simplify Fractions

A Version Space Approach to Learning Context-free Grammars

Analysis: Evaluation: Knowledge: Comprehension: Synthesis: Application:

Teaching ideas. AS and A-level English Language Spark their imaginations this year

Listening and Speaking Skills of English Language of Adolescents of Government and Private Schools

Part I. Figuring out how English works

Lower and Upper Secondary

Derivational and Inflectional Morphemes in Pak-Pak Language

Program Matrix - Reading English 6-12 (DOE Code 398) University of Florida. Reading

11/29/2010. Statistical Parsing. Statistical Parsing. Simple PCFG for ATIS English. Syntactic Disambiguation

Chunk Parsing for Base Noun Phrases using Regular Expressions. Let s first let the variable s0 be the sentence tree of the first sentence.

Loughton School s curriculum evening. 28 th February 2017

An Interactive Intelligent Language Tutor Over The Internet

Language Acquisition Chart

Improved Effects of Word-Retrieval Treatments Subsequent to Addition of the Orthographic Form

Children s Acquisition of Syntax: Simple Models are Too Simple

On the Polynomial Degree of Minterm-Cyclic Functions

Linking the Common European Framework of Reference and the Michigan English Language Assessment Battery Technical Report

Florida Reading Endorsement Alignment Matrix Competency 1

Ch VI- SENTENCE PATTERNS.

Aspectual Classes of Verb Phrases

PRODUCT PLATFORM DESIGN: A GRAPH GRAMMAR APPROACH

LEXICAL COHESION ANALYSIS OF THE ARTICLE WHAT IS A GOOD RESEARCH PROJECT? BY BRIAN PALTRIDGE A JOURNAL ARTICLE

GERM 3040 GERMAN GRAMMAR AND COMPOSITION SPRING 2017

Classify: by elimination Road signs

Replies to Greco and Turner

Detecting English-French Cognates Using Orthographic Edit Distance

Lecture 10: Reinforcement Learning

Ontological spine, localization and multilingual access

Individual Component Checklist L I S T E N I N G. for use with ONE task ENGLISH VERSION

Lecture 1: Basic Concepts of Machine Learning

LING 329 : MORPHOLOGY

Maximizing Learning Through Course Alignment and Experience with Different Types of Knowledge

Similar Triangles. Developed by: M. Fahy, J. O Keeffe, J. Cooper

Hindi Aspectual Verb Complexes

Inleiding Taalkunde. Docent: Paola Monachesi. Blok 4, 2001/ Syntax 2. 2 Phrases and constituent structure 2. 3 A minigrammar of Italian 3

Argument structure and theta roles

Transcription:

Informatics 2A: Language Complexity and the Chomsky Hierarchy September 28, 2010

Starter 1 Is there a finite state machine that recognises all those strings s from the alphabet {a, b} where the difference between the number of as and number of bs is less than k for some constant k? True or False?

Starter 2 Is there a finite state machine that recognises all those strings s from the alphabet {a, b} where the difference between the number of as and number of bs is less than k for some constant k in every prefix of s? A prefix of any string s is a string p such that there is a string q such that s = pq. Note that it is possible that q = ε. True or False?

Readings and Labs J&M[2nd.Ed] ch. 15 (pp. 1 4) Kozen: Lecture 21

Languages: Collection and Generation A formal language is the possibly infinite set of strings over a finite set of symbols (called a vocabulary or lexicon). Such strings are also called sentences of the language. Where do the sentences come from? from a (finite) list useful, but not very interesting (maybe more interesting when we have collections of really large samples of speech or text). from a grammar abstract characterisation of the strings belonging to a language. Grammars are a generative mechanism, they give rules for generating potentially infinite collection of finite strings.

Different kinds of Language Programming language: Programmers are given an explicit grammar for the syntactically valid strings of the language that they must adhere to. Human language: Children hear/see sentences of a language (their mother tongue or other languages used at home or in their community) and are sometimes (but not always!) corrected if a string they generate isn t in the language. Without being given an explicit grammar, how do children learn a grammar(s) for the infinite number of sentences that belong to the language(s) they speak and understand?

Structure and Meaning Small red androids sleep quietly. Colorless green ideas sleep furiously. Sleep green furiously ideas colorless. Mary persuaded John to wash himself with lavender soap. Mary persuaded John to wash herself with lavender soap. Mary persuaded John to wash her with lavender soap. Mary promised John to wash herself with lavender soap. Mary promised John to wash himself with lavender soap. Mary promised John to wash him with lavender soap. Characterising child language acquisition is one goal of Linguistics. Characterising language learnability (grammar induction) is one goal of Informatics.

Natural and Formal Languages More broadly, the goals of Linguistics are to characterise: individual languages: figuring out and specifying their sound systems, grammars, and semantics; how children learn language and what allows them to do so; the social systems of language use; how individual languages change over time, and how new languages arise. Work on formal languages in Informatics contributes to achieving these goals through clear computational methods of characterising the complexity of languages; clear computational methods for processing languages; clear computational theories of language learnability.

Questions We heard from Lecture 2 that grammars differ in their complexity. What is complex about a complex grammar? How does adding a data structure to an automaton allow its corresponding grammar to be more complex? How does removing limits on how the store on an automaton is accessed allow its corresponding grammar to be more complex? Is there any relationship between language complexity and how hard a language is to learn? Chomsky s desire to find a simple and revealing grammar that generates exactly the sentences of English led him to the discovery that some models of language were more powerful than others. [Noam Chomsky, Three Models for the Description of Language, IRE Transactions on Information Theory 2 (1956), pp. 113 124.]

Noam Chomsky Credited with the creation of the theory of generative grammar Significant contributions to the field of theoretical linguistics Sparked the cognitive revolution in psychology through his review of B.F. Skinner s Verbal Behavior Credited with the establishment of the Chomsky-Schutzenberger hierarchy, a classification of formal languages in terms of their generative power

Three Models for the Description of Language Linguistic theory attempts to explain the ability of a speaker to produce and understand new sentences, and to reject as ungrammatical other new sequences, on the basis of his limited linguistic experience. [Chomsky 1956, p. 113] The adequacy of a linguistic theory can be tested by looking at a grammar for a language constructed according to the theory and seeing if it makes predictions that accord with what s found in a large corpus of sentences of that language. What about what is not found in a large corpus of sentences? Chomsky s paper explores the sort of linguistic theory that is required as a basis for an English grammar what will describe the set of English sentences in an interesting and satisfying manner.

Three Models for the Description of Language For that description to be interesting and satisfying, Chomsky felt that a grammar had to be finite revealing, in allowing strings to be associated with meaning (semantics) in a systematic way The three models he considered were: 1. Grammars based on Finite-state Markov processes [Shannon & Weaver 1947, The Mathematical Theory of Communication] regular grammars 2. Phrase structure grammars reflecting pedagogical ideas of sentence diagramming 3. Transformational grammars

Dependency and Complexity Much of Chomsky s argument in 3MDL is based on the notion of dependency: Suppose s =a 1 a 2... a n is a sentence of language L. We say that S has an i-j dependency if when symbol a i is replaced with symbol b i, the string is no longer a sentence of L and when symbol a j is then replaced by some new symbol b j, the resulting string is a sentence of L. We ve already seen such a dependency in English: Mary persuaded John to wash himself with lavender soap. John Sue himself herself Mary persuaded Sue to wash herself with lavender soap.

Dependencies don t need to be binary R.D. Laing took this to extremes in Knots his play on sanity in everyday language. There must be something the matter with him because he would not be acting as he does unless there was therefore he is acting as he is because there is something the matter with him

Dependency Sets If we restrict ourselves to binary dependencies, then for any sentence s we can construct a dependency set D = {(i 1, j 1 ),... (i k, j k )} where each pair is a dependency in S. For example: If Mary has persuaded John to wash himself with lavender soap, then he is clean. (dep set size = 4) Sentences in the language generated by a regular grammar can have dependencies. Consider the regular language described by a regular expression: L 0 = (b + (ab c)) I.e. where every a is eventually followed by a c and only bs may intervene

An example: L 0 bbbabbcbbbabcbbbb L 0 is a typical sentence in the language. {(4, 7), (11, 13)} is the dependency set for the sentence. If we use the convention that we colour the pair of symbols in the dependency set the same colour and we can reuse colours for parts of the string after the later symbol in the dependency pair has appeared. How many colours do we need to colour the symbols in sentences in L 0? bbbabbcbbbabcbbbb uses just one colour.

Limits to Dependencies The number of colours we need to colour the dependency set of a sentence gives us a measure of the amount that has to be remembered about earlier symbols to get the dependencies right. If we need k colours then we need to remember k symbols at most at any one time. For any regular language R there must exist a constant k R such that the dependency set for any sentence in the language can be coloured with at most k R colours. What do you make of this claim?

Example 1 L 1 consists of all (and only) sentences over {a, b} containing n as followed by n bs: e.g., ab, aabb, aaabbb,.... Suggest a dependency set for aaaaaabbbbbb. How many colours does it take to colour the dependencies? How many colours does it take to colour the dependencies for a n b n? Is this a good example? What would you need to add to improve it?

Example 2 L 2 consists of all (and only) sentences over {a, b} containing a string of as and bs followed by its reverse {αα R α {a, b} }: e.g., aa, bb, abba, baab, abaabbaaabbbbbbaaabbaaba,.... What is the dependency set for aaaaaaaa? How many colours are required to colour this dependency set? How many colours does it take to colour the dependency set for a 2n?

Example 3 L 3 consists of all (and only) sentences over {a, b} containing a string of as and bs followed by the same string over again, {αα α {a, b} }: e.g. aa, bb, abab, baba, abbabb, abaaba,.... What is the dependency set for aaaaaaaa? How many colours does it take to colour the dependencies? How many colours does it take to colour the dependency set for a 2n?

Questions For any string of length 2k in L2, what is its dependency set? For any string of length 2k in L3, what is its dependency set? Is the dependency set unique for strings in L1? strings in L2? strings in L3? For each of the languages L1, L2 and L3 what is the minimum and maximum size of the dependency set for any string of length 2k? Give an example language in which some sentences have more than one dependency set. Can you devise a language which is regular (i.e. recognisable by a FSM) and whose dependency set needs more than one colour?

The simplest languages ones that can be described by a regular grammar need at most a finite number of colours to colour any dpendency set in the language. They are at the lowest rung of the Chomsky Hierarchy. regular grammars Are all languages with arbitrarily many dependencies equally complex?

Phrase Structure Grammars Phrase structure grammars provide a way of analysing sentences very much like some of us were taught to do: the man took the book NP verb NP VP Sentence This is called an Immediate Constituent Analysis. It shows a sentence made of a noun phrase (NP) followed by a verb phrase (VP).... a verb phrase made of a verb folllowed by an NP. How is phrase structure specified?

A phrase structure grammar consists of a finite vocabulary V a finite set Σ of initial strings over V a finite set of rules of the form X Y where 1. X and Y are strings over V 2. Y is formed from X by replacing one symbol of X with a string over V 3. Neither the replaced symbol nor the replacing string is empty (ɛ).

Context-free Phrase Structure Grammars Rules of the simplest PS Grammars contain only a single symbol on their left-hand side e.g., Σ: {S} S NP VP VP verb NP NP the man NP the book verb took These are called Context-free PSGs or, for short, Context-free Grammars (CFGs).

Derivations in CFGs The sequence of strings over V produced by a sequence of PS rule applications, starting from an initial string, is called a derivation: S NP VP NP verb NP NP verb the book NP took the book the man took the book

Dependency and PS Grammars Some dependencies that are beyond the capability of a regular grammar can be captured by a context-free grammar. Such dependencies are ones that can be generated locally. Recall L1: all (and only) sentences over {a, b} containing n a s followed by n b s. Here, the presence of a b on the right of the string depends on there being a comparable a on the left. Simple PSG for generating L1: V = {a, b, S} Σ = S PS rules: S asb S ab

Derivation Sample derivation: S asb aasbb aaasbbb aaaabbbb

Dependency and Complexity Revisited Are all dependencies local? Are there dependencies that cannot be capture in a CFG? context-free grammars regular grammars The dependency in L3 = {XX} where X is a string over {a, b} cannot be captured by a CFG, nor can the dependency in L4, consisting of all (and only) sentences over {a, b, c} containing a string of n a s, then n b s followed by n c s e.g., abc, aabbcc, aaabbbccc, etc.

Context-sensitive PSGs Phrase structure grammars with rules whose LHS contain >1 symbol are called context-sensitive phrase structure grammars or simply, context-sensitive grammars. Simple context-sensitive grammar for generating L4: V = {a, b, c, S, B} Σ = S PS rules: S abc asbc cb Bc bb bb

Sample Derivation Sample derivation: S asbc aasbcbc aaabcbcbc aaabbccbc aaabbccbc aaabbcbcc aaabbbccc aaabbbccc Context on the LHS allows for more dependencies and hence more complexity. context-sensitive grammars context-free grammars regular grammars

Top of the Chomsky Hierarchy Arbitrary re-write systems that can take account of any amount of context on the LHS and re-write any number of symbols, called Type 0 grammars. Type 0 grammars context-sensitive grammars context-free grammars regular grammars This is what is normally called the Chomsky hierarchy.