Grammatical Formalisms Postgraduate course «Technoglossia» Stella Markantonatou Athens, October 2012 LECTURE 2 Development of a CFPSG. Coverage of linguistic phenomena such as agreement and word order CONTENTS 1. 2. 3. Developing a grammar fragment.............................................................................. 1 A formalism that is too strong and too weak at the same time ............................... 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 phrase 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) PP P NP (3) NP Det N P Det N and by (1) and (2) NP NP PP 1 Grammatical Formalisms Postgraduate course «Technoglossia» Stella Markantonatou Athens, October 2012 The grammar for the Greek data above S NP VP NP Det N (PP) VP V (NP) (PP) (PP) PP P NP 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 ”Shorthand” here means that the rule NP Det N (PP) compiles out to the rules NP Det N PP, NP Det N so that eventually the grammar contains these two independent rules. ”()” simply save time for the grammar writer. Exercise 2. XLFG: https://signes.bordeaux.inria.fr/xlfg5/index.php Tutorial1. Develop your first Greek toy grammar. Use the rules above and five to ten lexical entries. Here you go! Exercise 3: Here is an alternative grammar for the same data. You are invited to argue in favor or against it. S NP VP NP (Det) NP NP N (PP) VP V (NP) (PP) (PP) PP P NP 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 will take the initial symbol S and will expand it to NP first and then to VP. The non-terminal symbol 2 Grammatical Formalisms Postgraduate course «Technoglossia» Stella Markantonatou Athens, October 2012 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. 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 non-terminal symbol that has to be expanded. So, it takes the first rule with NP as an initial symbol. This requires a Det which the parser finds and goes to the next symbol. This is the non-terminal NP. The parser looks up the rules again to find a rule with an NP as an initial symbol. It takes the first rule with NP as an initial symbol. Actually, this procedure will go on for ever. This is a case of left recursion. The parser will never get out of this loop. Assume however that you have to parse the following string: Τα παιδιά τρώνε μήλa με ζάχαρη. 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 rejects 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) τρώνε τα παιδιά (τα) μήλα (the “flat” Greek VP) 3 Grammatical Formalisms Postgraduate course «Technoglossia» Stella Markantonatou Athens, October 2012 PRO drop language τρώνε τα μήλα (no need for an explicit subject) Word order could be treated with a modification of the rules of our grammar. Same holds about PRO drop. Consider, however, whether the rule marked with a (*) satisfies constituency criteria and the impact that his situation has on your grammar. S (NP) VP NP (Det) N (PP) *VP V (NP) (ΝP) (PP) PP P NP Exercise 4. XLFG: https://signes.bordeaux.inria.fr/xlfg5/index.php Expand your grammar to deal with word order problems. Your new grammar should be able to parse the following phrases: τρώνε τα παιδιά μήλα τρώνε μήλα με ζάχαρη στην αυλή Exercise 5: For each sentence below specify the agreement constraints as an add-on on the corresponding CF rule. Use a Prolog-like notation for this purpose as shown in the example. Then highlight which part of the constraints is violated. Explain why agreement information should be specified for the left-hand symbol of the NP rule. το παιδιά τρώνε (determiner –noun agreement) Det NP Number Gender Case X Y Z Number Gender Case N X Y Z Number Gender Case X Y Z το παιδί παίζουν (subject-verb agreement) το παιδί παίζει στην κήπο (gender agreement) 3. References Δήμητρα Θεοφανοπούλου-Κοντού. 1989. Μετασχηματιστική Σύνταξη. Από την θεωρία στην πράξη. Αθήνα: Εκδόσεις Καρδαμίτσα Dalrymple, Mary. 2002. Syntax and Semantics 34: Lexical Functional Grammar. Academic Press 4