1 / 28

Grammar Writing Lecture 6

Grammar Writing Lecture 6. 11-721 Grammars and Lexicons. Teruko Mitamura teruko@cs.cmu.edu www.cs.cmu.edu/~teruko. Schedule: November 26. Review of Bird2.gra Feedback on the 1 st assignment Project Grading Criteria Submit Grammar exercise (mlb.gra/results)

stuart
Télécharger la présentation

Grammar Writing Lecture 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Grammar WritingLecture 6 11-721 Grammars and Lexicons Teruko Mitamura teruko@cs.cmu.edu www.cs.cmu.edu/~teruko LTI Grammars and Lexicons

  2. Schedule: November 26 • Review of Bird2.gra • Feedback on the 1st assignment • Project Grading Criteria • Submit Grammar exercise (mlb.gra/results) • Start Grammar exercise (Japanese grammar) LTI Grammars and Lexicons

  3. Review: Bird 2 Grammar • Goal: To learn more on unification • Much better than bird.gra • Fine to have semantic features in f-structure • Some Problems: • Not scalable semantic features • ((x0 semclass) = Morris) • (meower -) for “bird” • Incomplete f-structures • Ambiguous f-structures LTI Grammars and Lexicons

  4. Feedback on the 1st assignment Planning • Make sure to estimate the time for each step (or each type) and the total time • No schedule was presented • No duration was presented • More time for testing and debugging may be needed • No additional types were presented Design • Subj-verb agreement with “be” verb and a regular verb • Test sentences must contain full sentences, not just pronoun and “be” verb. • Test sentences should contain all the pronouns. LTI Grammars and Lexicons

  5. Feedback on the 1st assignment (2) • Intransitive/Transitive/Ditransitive with PP • Make sure that sentences contain PP. • PP attachment may be ambiguous. Grammar should be able to handle both noun attachment and verb attachment. • Conjunction with PP and NP should be in an object position, not in a subject position • If you choose Passive • Should contain “by” phrase. • If you choose Sentences with the modified nominal construction. • Test sentences must contain full sentences, not just NP. LTI Grammars and Lexicons

  6. Feedback on the 1st assignment (3) • If you choose Sentences with the Noun-Noun compounds, test sentences must contain full sentences. • Optional notation doesn’t work with the parser NP -> (DET) N • A quotation mark <N’> doesn’t work inside Lisp. • Not enough test sentences • No statement of testing purposes, reasons for pass/failure LTI Grammars and Lexicons

  7. Feedback on the 1st assignment (4) • No feature structures • No attribute-value pair • You don’t need to write attribute-value pairs for each sentence type • Test sentences were too short • Some worked more than it was required for the 1st assignment • Overall Comment • Follow the steps of the process of grammar writing (see the slides or handouts) • If you have questions, please ask LTI Grammars and Lexicons

  8. Pseudo-Unification • Ordering of test and action equation • Right and left hand side of equation • Split f-structure LTI Grammars and Lexicons

  9. Grammar Writing Project Grading Criteria There are 5 parts, giving a letter grade separately See the introduction slides for references 1. Plan/Design 2. Grammar 3. Test Suites 4. Results 5. Issues/Discussions LTI Grammars and Lexicons

  10. 1. Plan/Design • Clear statement of goals, tasks, time estimates and actual time spent • Set of structures covered • Trees for each type of construction • Grammatical functions used • Feature structures used (attribute values) • See the grammar exercise cover page LTI Grammars and Lexicons

  11. 2. Grammar • Grammar writing principles followed: • Generality • Extensibility • Simplicity • Selectivity • Quality of grammar: easy to understand • Well-organized • Well-documented, etc. LTI Grammars and Lexicons

  12. 3. Test Suites • Enough sentences to test each type of construction • Include both grammatical and ungrammatical sentences • Clear statement of testing purposes, reasons for pass/failure LTI Grammars and Lexicons

  13. 3. Test Suites (2) Examples • Full sentences that contain “be” verb Test for person agreement. *I are a student Test for number agreement. *She is teachers Test for case agreement. *Me is a teacher Test for missing determiner *She is teacher LTI Grammars and Lexicons

  14. 4. Results • Grammatical sentences – all parsed • Ungrammatical sentences – all failed • Well-formed f-structures • No NILs in the f-structures • No missing f-structures, elements • No unnecessary redundancy • No unnecessary feature structures • No conflicting information in the f-structures • No unnecessary ambiguity LTI Grammars and Lexicons

  15. 5. Issues/Discussions (What you learned) • Any interesting findings • Grammar design issues (decisions and results) • Grammar writing principles vs. actual implementation issues • Time estimate vs. Actual time spent • Problems and Reasons • E.g. Ambiguity: reasons for more than one parse • E.g. Any limitations that you encountered • Platform, parser, grammar limitations • Other issues/discussions/future extension LTI Grammars and Lexicons

  16. Files to submit • Plan and Grammar Design • Test Suite • Grammar File - Specify the location of the grammar file • Test Results: two separate files • Grammatical sentences (parsed) • Ungrammatical sentences (failed) • No trace in the results files. Set to (dmode 0) • Issues/Discussions • If you use English grammar references, list them. LTI Grammars and Lexicons

  17. Project Due • December 7 (Friday) at 3pm • Late submission will be down-graded • Cari will collect the project (hard copy). • Don’t send the files by email. • Work alone. LTI Grammars and Lexicons

  18. 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/ LTI Grammars and Lexicons

  19. 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) LTI Grammars and Lexicons

  20. 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 niNyuuyooku eHideki ga itta. Hideki ganichiyoubi niNyuuyooku e itta. Hideki gaNyuuyooku enichiyoubi ni itta. Nyuuyooku eHideki ganichiyoubi ni itta. Nyuuyooku enichiyoubi niHideki ga itta. LTI Grammars and Lexicons

  21. Japanese Examples (2) Hideki gaNyuuyooku e itta Nyuuyooku eHideki ga itta Nichiyoubi niNyuuyooku e itta Nyuuyooku enichiyoubi ni itta Hideki ganichiyoubi ni itta Nichiyoubi niHideki ga itta Hideki ga itta Nyuuyooku e itta Nichiyoubi ni itta LTI Grammars and Lexicons

  22. 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.” LTI Grammars and Lexicons

  23. 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 LTI Grammars and Lexicons

  24. Japanese Grammar • Use of recursive rules (<S> < == > (<NP> <S>) (<S> < == > (<V>) LTI Grammars and Lexicons

  25. Recursive Rules S NP S NP S N P N P V Hideki gaNyuuyooku e itta LTI Grammars and Lexicons

  26. 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) LTI Grammars and Lexicons

  27. Japanese grammar exercise • Grammar file: /afs/cs/project/cmt-55/lti/Lab/Modules/GNL721/2007/jpn.gra • Test file: jpn-test1.lisp LTI Grammars and Lexicons

  28. Questions? LTI Grammars and Lexicons

More Related