1 / 13

LING 581: Advanced Computational Linguistics

LING 581: Advanced Computational Linguistics. Lecture Notes March 29th. Today’s Topics. Part 1 Homework (hopefully) demystified + Presentations Part 2 Semantic Annotation of Organism Morphological Descriptions l ast week’s presentation from Prof. Hong Cui propose projects

uyen
Download Presentation

LING 581: Advanced Computational Linguistics

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. LING 581: Advanced Computational Linguistics Lecture Notes March 29th

  2. Today’s Topics Part 1 • Homework (hopefully) demystified • + Presentations Part 2 • Semantic Annotation of Organism Morphological Descriptions • last week’s presentation from Prof. Hong Cui • propose projects • corpora and glossaries: • USB stick directory 581-12/ passed around ….

  3. Quantifiers • Example: [S [NP [Q every][N man]][VP [V likes][NP John]]] • WordExpression • every λP1.[λP2.[∀X (P1(X) -> P2(X))]] • man man • likes λY.[λX.[ X likes Y]] • John John

  4. Quantifiers: Homework • Example: [S [NP [Q every][N man]][VP [V likes][NP John]]] • WordExpression • every λP1.[λP2.[∀X (P1(X) -> P2(X))]] • man man • likes λY.[λX.[ X likes Y]] • John John • Semantics: ∀X (man(X) -> [ X likes John]) Part 1: Montague-style Implement a Prolog grammar that assembles the equivalent Prolog query for the above sentence • Semantics (Prolog): \+ (man(X), \+likes(X,john)) Present your grammar and working examples of situations for which the Prolog query evaluates to true/false \+ (baby(X), \+walks(X)) is Prolog for ∀X (baby(X) -> walks(X)) (from lecture 9)

  5. Quantifiers: Homework • One possible grammar: want to call likes(_G318,John) Solution: make variables the same and then do the call

  6. Quantifiers: Homework • Situation #1: Nice thing about the grammar is that the computed expression is a real program Thus truth values for the sentence can be determined for particular situations • Situation #2:

  7. Quantifiers: Homework • Situation #3:

  8. Quantifiers: Homework Part 2: Barwise-Cooper-style • Syntax: [S [NP [Q every][N man]][VP [V likes][NP John]]] • Semantics: {X: man(X)} ⊆ {X: likes(X,John)} • Prolog : setof(X,man(X),S1), setof(X,likes(X,john),S1), subset(S1,S2). Implement a Barwise-Cooper style grammar and test the Prolog query on relevant situations. • Prolog programming help • Prolog predicate names cannot be variables • P(X). is illegal, p(X). is okay • p(X), X = john. is okay • P(X), P = man. isn’t • P =man, PX =.. [P,X]. is okay. (PX=man(X))

  9. Quantifiers: Homework • Grammar (first attempt):

  10. Quantifiers: Homework • Recall: semantics of setof/3 vs. bagof/3. vs. findall/3. setof(X,call(man,X),Set) fails when the set is empty

  11. Quantifiers: Homework • Modify setof/3 to return empty set instead of failing, call new predicate setof1/3:

  12. Quantifiers: Homework

  13. Quantifiers: Homework Part 3: Coordination • Extend your two grammars to handle • Every man and every woman likes John Make up homework exercise! do Part 3 given what you now know about Parts 1 and 2

More Related