LECTURE 2 CONTEXT FREE GRAMMARS CONTENTS



Σχετικά έγγραφα
Development of a CFPSG. Coverage of linguistic phenomena such as agreement and word order

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

derivation of the Laplacian from rectangular to spherical coordinates

2 Composition. Invertible Mappings

Homework 3 Solutions

Section 8.3 Trigonometric Equations

The Simply Typed Lambda Calculus

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Example Sheet 3 Solutions

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

The challenges of non-stable predicates

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Μηχανική Μάθηση Hypothesis Testing

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Other Test Constructions: Likelihood Ratio & Bayes Tests

Statistical Inference I Locally most powerful tests

Συντακτικές λειτουργίες

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Chap. 6 Pushdown Automata

C.S. 430 Assignment 6, Sample Solutions

Approximation of distance between locations on earth given by latitude and longitude

Syntax Analysis Part IV

(C) 2010 Pearson Education, Inc. All rights reserved.

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Partial Trace and Partial Transpose

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Every set of first-order formulas is equivalent to an independent set

EE512: Error Control Coding

Section 7.6 Double and Half Angle Formulas

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Concrete Mathematics Exercises from 30 September 2016

Advanced Subsidiary Unit 1: Understanding and Written Response

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

TMA4115 Matematikk 3

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Potential Dividers. 46 minutes. 46 marks. Page 1 of 11

Λέξεις, φράσεις και προτάσεις

14 Lesson 2: The Omega Verb - Present Tense

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Finite Field Problems: Solutions

Matrices and Determinants

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Section 9.2 Polar Equations and Graphs

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

On a four-dimensional hyperbolic manifold with finite volume

2. The Symbolic Approach: Knowledge representation and formal languages

Chapter 29. Adjectival Participle

Galatia SIL Keyboard Information

Math 6 SL Probability Distributions Practice Test Mark Scheme

Areas and Lengths in Polar Coordinates

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

ST5224: Advanced Statistical Theory II

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Οι αδελφοί Montgolfier: Ψηφιακή αφήγηση The Montgolfier Βrothers Digital Story (προτείνεται να διδαχθεί στο Unit 4, Lesson 3, Αγγλικά Στ Δημοτικού)

Chapter 2 * * * * * * * Introduction to Verbs * * * * * * *

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Solutions to Exercise Sheet 5

EU-Profiler: User Profiles in the 2009 European Elections

Δημιουργία Λογαριασμού Διαχείρισης Business Telephony Create a Management Account for Business Telephony

Areas and Lengths in Polar Coordinates

Uniform Convergence of Fourier Series Michael Taylor

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Instruction Execution Times

Top down vs. bottom up parsing. Top down vs. bottom up parsing

[1] P Q. Fig. 3.1

Strain gauge and rosettes

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

Problem Set 3: Solutions

VBA ΣΤΟ WORD. 1. Συχνά, όταν ήθελα να δώσω ένα φυλλάδιο εργασίας με ασκήσεις στους μαθητές έκανα το εξής: Version ΗΜΙΤΕΛΗΣ!!!!

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Notes on the Open Economy

Block Ciphers Modes. Ramki Thurimella

ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ Α. Διαβάστε τις ειδήσεις και εν συνεχεία σημειώστε. Οπτική γωνία είδησης 1:.

4.6 Autoregressive Moving Average Model ARMA(1,1)

From the finite to the transfinite: Λµ-terms and streams

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Assalamu `alaikum wr. wb.

Πώς μπορεί κανείς να έχει έναν διερμηνέα κατά την επίσκεψή του στον Οικογενειακό του Γιατρό στο Ίσλινγκτον Getting an interpreter when you visit your

Formal Semantics. 1 Type Logic

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Numerical Analysis FMN011

( y) Partial Differential Equations

ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ ΣΕ ΕΙΔΙΚΑ ΘΕΜΑΤΑ ΔΙΕΘΝΩΝ ΣΧΕΣΕΩΝ & ΟΙΚΟΝΟΜΙΑΣ

the total number of electrons passing through the lamp.

Lecture 2. Soundness and completeness of propositional logic

Math221: HW# 1 solutions

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ

Modbus basic setup notes for IO-Link AL1xxx Master Block

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016

Second Order Partial Differential Equations

Transcript:

LECTURE 2 CONTEXT FREE GRAMMARS CONTENTS 1. Developing a grammar fragment...1 2. A formalism that is too strong and too weak at the same time...3 3. References...4 1. Developing a grammar fragment The Greek data το παιδί παίζει τα παιδιά τρώνε το παιδί παίζει στον κήπο τα παιδιά παίζουν στον κήπο με τα λουλούδια το παιδί τρώει τη τυρόπιττα τα παιδιά τρώνε τα μήλα Introduce terminal symbols (part of speech) N: παιδί, παιδιά, κήπο, λουλούδια, τυρόπιττα, μήλα V: παίζει, τρώνε, παίζουν, τρώει Det: το, τα, τη P: με, σε Exercise 1: Indicate the prhase diagnostics (Lecture 1) used to identify the groups of terminal symbols in the Greek data above Det + Noun (Det N) Preposition + Det + Noun (P Det N) Det + Noun + Preposition + Det + Noun (Det N P Det N) The non terminal symbol vocabulary The string Det N is far too frequent. On the basis of the work done with Lecture 1, we can consider it a phrase and use a non terminal symbol in its place. So. (1) ΝΡ Det N (2) ΡΡ P Det N and by (1) (3) NP Det N P Det N and by (1) and (2) NP NP PP 1

The grammar for the Greek data above NP Det N (PP) Note: Brackets indicate optionality. In fact, the rule NP Det N (PP) is a shorthand of two rules: NP Det N PP NP Det N Exercise 2: Here is an alternative grammar for the same data. You are invited to argue in favor or against it. NP (Det) NP NP N (PP) Exercise 3: (3) NP Det N (4) NP NP (PP) Assume that we have a parser, that is, a program that matches rules with linguistic data and assigns non terminal symbols to language strings. Assume that our parser is a top down one, that is, it reads the rules in the order it finds them and tries to match them with the data. If a rule fails it takes the next one with the same left hand symbol. If all such rules fail, parsing fails. With the grammar of Exercise 2, such a parser would take the initial symbol S and would expand it to NP first and then to VP. The non terminal symbol that has to be expanded is now NP. If NP succeeds, the parser will try to expand VP. If no expansion of NP or VP is successful, the parser fails. But other things may happen: assume that our parser deals with the string το παιδί παίζει. It starts with the initial symbol S and expands it to NP and VP. Then, NP is the 2

non terminal symbol that has to be expanded. Rather than using the NP rules of Exercise 2, our hypothetical parser uses the rules (3) and (4) above. First, it takes rule (3) and finds that it has to look for a terminal symbol Det. It looks up the string and sees that το is a Det. (3) succeeds and then it looks for a N. It finds παιδί which is a N. (3) succeeds once more and assigns the category NP to the string. Assume however that (4) was the first rule. The parser would have to look for the nonterminal NP and would go back to the rule table and would pick the same rule (4) and that would go on for ever. This is a case of left recursion. The parser would never get out of this loop. By giving the sequence (3),(4) in this order left recursion does not occur with the examples given. Assume however that the examples contained the following string: Τα παιδιά τρώνε μήλα. Make the necessary changes to the rules of Exercise 3 in order to ensure that left recursion will not occur with this set of examples. 2. A formalism that is too strong and too weak at the same time We were given a set of data and we developed a grammar that recognizes them, that is, it can assign the correct non terminal labels to the strings. However, this is not all. Ideally, we would like our grammar to recognize the correct strings and reject the incorrect ones. Unfortunately this does not happen. In fact, our grammar leaves out correct data and recognizes incorrect ones. Consider the following data: το παιδί παίζουν το παιδιά τρώνε το παιδί παίζει στην κήπο τρώνε μήλα τα παιδιά τρώνε τα παιδιά (τα) μήλα τρώνε τα μήλα η τυρόπιττα τρώει το παιδί A typology of problems Agreement in number and gender το παιδί παίζουν (subject verb agreement) το παιδιά τρώνε (determiner noun agreement) το παιδί παίζει στην κήπο (gender agreement) Word order τρώνε μήλα τα παιδιά (subject follows VP) 3

τρώνε τα παιδιά (τα) μήλα (the flat Greek VP) PRO drop language τρώνε τα μήλα (no need for an explicit subject) Word order could be treated with a modification of the rules of our grammar. Same goes with PRO drop. S (NP) VP (NP) S V NP NP NP (Det) N (PP) Exercise 4: Discuss the rules with the initial symbol S. What kind of problems do we face with examples like τρώνε μήλα τα παιδιά τρώνε τα παιδιά τα μήλα τρώνε τα παιδιά Exercise 5: For each sentence below specify the agreement constraints as an add on on the corresponding CF grammar rule. Use a Prolog like notation for this purpose as shown in the example. Explain when agreement information should be specified for the left hand symbol of the rule το παιδιά τρώνε (determiner noun agreement) VP V NP Det N Number X Number X Number X Gender Y Gender Y Gender Y Case Z Case Z Case Z το παιδί παίζουν (subject verb agreement) το παιδί παίζει στην κήπο (gender agreement) 3. References Δήμητρα Θεοφανοπούλου Κοντού. 1989. Μετασχηματιστική Σύνταξη. Από την θεωρία στην πράξη. Αθήνα: Εκδόσεις Καρδαμίτσα 4

Dalrymple, Mary. 2002. Syntax and Semantics 34: Lexical Functional Grammar. Academic Press 5