Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 1 LTI Grammars and Lexicons Grammar Writing Lecture.

Slides:



Advertisements
Similar presentations
LING 388: Language and Computers Sandiway Fong Lecture 23.
Advertisements

ILLUSTRATING INTEGERS
CAS LX 522 Syntax I Week 3b. Constituents.
Objective: Students will be able to write and solve two- step equations with one variable!
Syntax 4 (Japanese) Ling400. Japanese (today’s plan) SOV language (but word-order is free other than the V)SOV language (but word-order is free other.
Sub-constituents of NP in English September 12, 2007.
FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
Week 3b. Merge, feature checking CAS LX 522 Syntax I.
Grammar Engineering: Set-valued Attributes Various Kinds of Constraints Case Restrictions on Arguments Miriam Butt (University of Konstanz) and Martin.
Computational Intelligence 696i Language Lecture 4 Sandiway Fong.
Syntax LING October 11, 2006 Joshua Tauberer.
Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 1 LTI Grammars and Lexicons Grammar Writing Lecture.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Outline of English Syntax.
1.4 – Solving Absolute Value Equations. Absolute Value.
Past Perfect. Application (Why?) We use the past perfect to show: two actions that happened in the past, the first action was complete before the second.
x + 5 = 20 x+5 20 (-5) x + 5 = 20 x 20 (-5) x + 5 = 20.
Solving a System of Equations using Multiplication
E QUATIONS & INEQUALITIES Properties. W HAT ARE EQUATIONS ? Equations are mathematical sentences that state two expressions are equal. Example: 2x – 5.
 Solving inequalities follows the same procedures as solving equations.  There are a few special things to consider with inequalities: ◦ We need to.
1 LIN 1310B Introduction to Linguistics Prof: Nikolay Slavkov TA: Qinghua Tang CLASS 14, Feb 27, 2007.
Japanese Verb Forms (location in sentence) The Plain and Polite Verb Forms The Stem Form and the Polite Suffix The Present and Past Verb Forms Affirmative.
Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 1 LTI Grammars and Lexicons Grammar Writing Grammars.
Notes on Pinker ch.7 Grammar, parsing, meaning. What is a grammar? A grammar is a code or function that is a database specifying what kind of sounds correspond.
Solving Inequalities. What are Inequations? Statements showing inequalities One quantity or expression is not equal to another.
03.03 SKM & PP 1 Slope SKM & PP 2 Definition: Slope The slope of the line containing points P 1 (x 1, y 1 ) and P 2 (x 2, y 2 ) is given by The.
November 2011CLINT-LN CFG1 Computational Linguistics Introduction Context Free Grammars.
Inequalities Symbols and line graphs. Symbols  < is less than  > is greater than  < is less than or equal to  > is greater than or equal to points.
4.1.1 – Solving Inequalities. All equations we have solved are considered problems of equality – Involves some kind of equal sign On the other hand, we.
LING 388: Language and Computers Sandiway Fong Lecture 21.
Syntax VI November 29, Announcements! The time and place of the final exam will be: Craigie Hall C 105 Wednesday, December 15th 8-10 am Also note:
Copyright © 2014, 2010, and 2006 Pearson Education, Inc. Chapter 4 Polynomials.
November 9, Lexicon (An Interacting Subsystem in UG) Part-I Rajat Kumar Mohanty IIT Bombay.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Fall 2005-Lecture 3.
Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 1 LTI Grammars and Lexicons Grammar Writing Lecture.
Addition Multiplication Subtraction Division. 1.If the signs are the same, add the numbers and keep the same sign = = If the.
2.5 – Solving Absolute Value Equations. Absolute Value.
End of the beginning Let’s wrap up some details and be sure we are all on the same page Good way to make friends and be popular.
Example Example 2 - Extraneous Solution.
CSE 311 Foundations of Computing I Lecture 19 Recursive Definitions: Context-Free Grammars and Languages Spring
Math – Translating Word Sentences to Equations 1.
TOP TIPS FOR MFL SUCCESS… This might all sound obvious, but you would be surprised how many people just read through their textbook when they revise! To.
CSE 311 Foundations of Computing I Lecture 20 Context-Free Grammars and Languages Autumn 2012 CSE
NUMBER SENTENCES 6.7.
Solving Inequalities   Trichotomey Property- For any two real numbers, a and b, exactly one of the following statements is true: a b.  Set-Builder.
Solving Inequalities Using Multiplication and Division Chapter 4 Section 3.
Linguistics 1 Syntax Week 2 Lectures 3 & 4.
Solving Equations involving Fractions
Week 3b. Merge, feature checking
Basic Parsing with Context Free Grammars Chapter 13
Formal Language Theory
2.2 Writing Equations.
Variables on Both Sides with Equations
Syntax.
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
Lecture 3: Introduction to Syntax (Cont’)
Solving One-Step Equations
CSE322 LEFT & RIGHT LINEAR REGULAR GRAMMAR
توكيد الذات.
Language Variations: Japanese and English
Lecture 7: Introduction to Parsing (Syntax Analysis)
EQ: How do I solve an equation in one variable?
Syntax of Japanese Ling200.
a + 2 = 6 What does this represent? 2 a
CSCI N207 Data Analysis Using Spreadsheet
Multiplying and Dividing Rational Expressions
Ling200 Prof. Toshi Ogihara Spring 2006
Unit 5 Lesson 1 Objective:
Equations Chapter 7.1.
COMPILER CONSTRUCTION
Presentation transcript:

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 1 LTI Grammars and Lexicons Grammar Writing Lecture Grammars and Lexicons Teruko Mitamura

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 2 LTI Grammars and Lexicons Schedule: November 28 Q/A on Grammar Writing Project Q/A sessions by TA Equations Finish Japanese Grammar exercise (jpn.gra) Start a new grammar

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 3 LTI Grammars and Lexicons *UNDEFINED* and *DEFINED* The word *UNDEFINED* and *DEFINED* can be used on the right hand side of an equation. *UNDEFINED* makes sure that the left hand side of the equation has no value. *DEFINED* makes sure that the left hand side of the equation has a value. ((x1 negation) = *UNDEFINED*)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 4 LTI Grammars and Lexicons Assigning Multiple Values Multiple values can be assigned to a feature. Use the grater-than sign (>) in place of the equal sign. If the following rule applies recursively, the pp- adjunct function will have several different values at the same time: ( ( ) ((x0 = x1) ((x0 pp-adjunct) > x2))) ; This rule should come last. Multiple rule is sensitive to rule ordering

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 5 LTI Grammars and Lexicons Grammar Exercise (Japanese Grammar) Free word-order language SOV language Case markers determine grammatical relations (ga, wo, ni, de, etc) Grammar file: jpn.gra Test files: jpn-test1.lisp /afs/cs/project/cmt-55/lti/Lab/Modules/GNL-721/2007/

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 6 LTI Grammars and Lexicons Japanese Lexicon nichiyoubi (Sunday) nyuuyooku (New York) hoomuran (home run) itta (went) utta (hit-past) Hideki, Ichiro (person’s name) ga (NOM case) wo (ACC case) ni (Time-on) ni (Loc-to) e (Loc-to) de (Loc-at)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 7 LTI Grammars and Lexicons Japanese Examples Nichiyoubi ni Hideki ga Nyuuyook e itta. Sunday on Hideki NOM New York to go PAST “Hideki went to New York on Sunday.” Nichiyoubi ni Nyuuyooku e Hideki ga itta. Hideki ga nichiyoubi ni Nyuuyooku e itta. Hideki ga Nyuuyooku e nichiyoubi ni itta. Nyuuyooku e Hideki ga nichiyoubi ni itta. Nyuuyooku e nichiyoubi ni Hideki ga itta.

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 8 LTI Grammars and Lexicons Japanese Examples (2) Hideki ga Nyuuyooku e itta Nyuuyooku e Hideki ga itta Nichiyoubi ni Nyuuyooku e itta Nyuuyooku e nichiyoubi ni itta Hideki ga nichiyoubi ni itta Nichiyoubi ni Hideki ga itta Hideki ga itta Nyuuyooku e itta Nichiyoubi ni itta

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 9 LTI Grammars and Lexicons Japanese Example Nichiyoubi ni Ichiro ga hoomuran wo utta. Sunday on Ichiro NOM home run ACC hit-PAST “Ichiro hit a home run on Sunday.”

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 10 LTI Grammars and Lexicons Ungrammatical Sentences You can’t have two nominatives or accusatives in a sentence. (jpn-test1.lisp) *Hideki ga nichiyoubi ga itta *Hideki ga Hideki ga itta *Hideki ga hoomuran ga utta *Hideki wo hoomuran wo utta

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 11 LTI Grammars and Lexicons Japanese Grammar Use of recursive rules ( ( ) ( ( )

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 12 LTI Grammars and Lexicons Recursive Rules S NP S N P N P V Hideki ga Nyuuyooku e itta

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 13 LTI Grammars and Lexicons Japanese Grammar (2) “ni” is ambiguous in Japanese Time-on, Loc-to Nichiyoubi ni itta (went on Sunday) Nyuuyooku ni itta (went to New York) “ni” and “e” can be used for Loc-to Nyuuyooku ni/e itta (went to New York)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 14 LTI Grammars and Lexicons Japanese grammar exercise Grammar file: /afs/cs/project/cmt-55/lti/Lab/Modules/GNL721/2007/jpn.gra Test file: jpn-test1.lisp

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 15 LTI Grammars and Lexicons Japanese Grammar (2) “ni” is ambiguous in Japanese Time-on, Loc-to Nichiyoubi ni itta (went on Sunday) Nyuuyooku ni itta (went to New York) “ni” and “e” can be used for Loc-to Nyuuyooku ni/e itta (went to New York)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 16 LTI Grammars and Lexicons Japanese Grammar (3) “de” is Loc-in/Loc-at with action verbs Nyuuyooku de tabeta (ate in New York) CMU de tabeta (ate at CMU) Nyuuyooku de hoomuran wo utta (hit hoomuran in New York)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 17 LTI Grammars and Lexicons Ungrammatical Sentences (2) “itta (went)” doesn’t take Loc-at/in “de” *Nyuuyooku de itta (*went in/at New York) “tabeta (ate)” doesn’t take Loc-to “ni/e” *Nyuuyooku ni/e tabeta (*ate to New York) Time expression doesn’t take Loc-at, Loc-to *Nichiyoubi de/e itta (*went at/to Sunday) *Nichiyoubi de/e utta (*hit at/to Sunday) *Nichiyoubi de/e tabeta (*ate at/to Sunday)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 18 LTI Grammars and Lexicons Ungrammatical Sentences (3) Wrong case marker (jpn-test2.lisp) Nyuuyooku ni/e itta (Loc-to) *Nyuuyooku de itta (Loc-at) Nyuuyooku de tabeta (Loc-at) *Nyuuyooku ni/e tabeta (Loc-to) Nichiyoubi ni itta/tabeta (Time-on) *Nichiyoubi de itta/tabeta (Loc-at) *Nichiyoubi e itta/tabeta (Loc-to)

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 19 LTI Grammars and Lexicons Japanese grammar exercise Grammar file: /afs/cs/project/cmt-55/lti/Lab/Modules/GNL721/2007/jpn.gra Test file: jpn-test2.lisp Work on test2 and test-fail2 Run test1 to see if it is still working

Carnegie Mellon School of Computer Science Copyright © 2007, Carnegie Mellon. All Rights Reserved. 20 LTI Grammars and Lexicons Questions?