Introduction to Computational Linguistics Today Semantics Meaning Representation Meaning Representation Week 8, Lecture 2 November 28, 2002, ICL Week 8, Lecture 2 1 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 2 November 27, 2002 Semantics Meaning Representations So far, we ve concentrated on tokens, POS, and syntax. What about semantics? One standard approach focuses on the systematic creation of MEANING REPRESENTATIONS representations that link linguistic forms to knowledge of the world. We assume that the meaning of linguistic utterances can be captured in formal structures. What can serve as a meaning representation? Anything that serves the core practical purposes of a program that is doing semantic processing. Answering questions Determining truth Making inferences..., ICL Week 8, Lecture 2 3 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 4 November 27, 2002
has the same meaning as What is Meaning? Computational Semantics Trying to pin down what meaning is can be very hard. Easier to think about the following: Semantic Equivalence: Inference: follows from/can be inferred from Two important strands of work: logic-based representation (formal rules of syntax, semantics, and inference) notion of TRUTH-CONDITIONS frame-based representations, ICL Week 8, Lecture 2 5 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 6 November 27, 2002 Frame-based Representations Frame Example Derives from AI work on knowledge representation Animal Involve classes (or frames), slots and possibly axioms eats Food Classes correspond to concepts in the domain of discourse animate True Slots describe properties or attributes of classes. Classes are arranged in a taxonomic (inheritance hierarchy) Herbivore Carnivore If is a subclass of, then every instance of is also an instance of eats Plant eats Animal An ontology consists of classes, slots and axioms A Knowledge Base is an ontology together with individual instances of classes with specific values for slots Giraffe eats Leaf, ICL Week 8, Lecture 2 7 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 8 November 27, 2002
is true if and only if and Inference: Sample Meaning Representations Ontologies and Semantic Web ginny Instance(, eats acacia-leaf1029 Giraffe(ginny) Leaf(acacia-leaf1029) Giraffe ) eats Leaf eat(ginny, acacia-leaf1029) Semantic Web proposition: Web-accessible resources should be understandable by artificial agents. Shared ontologies provide a shared conceptual vocabulary for such agents. Dublin Core example: dc:creator = ek:author The term Creator in the Dublin Core namespace is equivalent to the term Author in the Ewan Klein namespace. W3C s Resource Description Framework (RDF) for semantic metadata is essentially a frame-based representation., ICL Week 8, Lecture 2 9 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 10 November 27, 2002 Truth-conditional Semantics Verifying against a KB (Tarski, Davidson) 1. In which rivers do salmon live? Knowing the meaning of a sentence is knowing the conditions under which is true or false. Semantic Equivalence: is true (i.e., are both true, or and are both false) 2. river [live(salmon, )] VERIFIABILITY: The system s ability to compare the state of affairs described by a representation to the state of affairs in some world as modelled by a set of facts in its knowledge base. is true whenever is true live(salmon, mersey) live(salmon, tyne) live(salmon, humber)..., ICL Week 8, Lecture 2 11 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 12 November 27, 2002
Simplifying Assumptions for Computational Semantics Focus on literal meaning conventional meanings of words (e.g., ignore metaphor, metonymy) ignore context (e.g., anaphoric and deictic expressions) Semantic Analysis SEMANTIC ANALYSIS is the process of taking in some linguistic form and producing a meaning representation for it. Many ways of doing this, ranging from completely ad hoc domain-specific methods to more theoretically founded but not necessarily tractable methods. Most methods rely in some way on a prior or concurrent syntactic analysis (parse). A compositional rule-to-rule approach is attractive, ICL Week 8, Lecture 2 13 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 14 November 27, 2002 Compositional Semantics Issues At the core of most methods is the PRINCIPLE OF COMPOSITIONALITY (Frege s Principle): The meaning of the complex construction is a function of the meaning of the parts. What are the parts? Standardly, syntactic constituents. Ambiguity I saw her duck. I m looking for a handsome Norwegian. Addressed to our mobile robot: Visit every room and take a photograph. Drink beer or drink green tea and be happy. Vagueness This heap of sand is small. [Now add a grain of sand, and loop back], ICL Week 8, Lecture 2 15 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 16 November 27, 2002
1st order quantification [sister-of( Canonical Form Canonical Form: Pros and Cons Standardized representation of meaning for (potentially) multiple utterances. Dictates that Inputs that mean the same thing have the same representation. Does Kalpna have vegetarian dishes? Do they have vegetarian food at Kalpna? Are vegetarian dishes served at Kalpna? Does Kalpna serve vegetarian fare? Alternatives: Advantages: simplifies reasoning tasks compactness of representation: don t need to write inference rules for all the different paraphrases of the same meaning Disadvantage: complicates task of semantic analysis four different semantic representations, or store all possible meaning representations in KB, ICL Week 8, Lecture 2 17 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 18 November 27, 2002 More on Canonical Form Logics and Notation Fortunately, there are some systematic meaning relationships among word senses and among grammatical constructions that can be exploited to make semantic analysis tractable. propositional happy clap-hands either you re not happy or you clap your hands relations sister-of(ann, bill) Ann is the sister of Bill Example:, bill)] Someone is sister of Bill Kalpna serves vegetarian food. Vegetarian dishes are served by Kalpna 2nd order quantification ann bill Everything that is true of Ann is true of Bill food and dishes have at least one shared sense, so same meaning representation can be assigned to phrases containing them. knowledge of the relationship between active and passive sentence constructions allows us to assign same semantic roles to Kalpna (server) and vegetarian food/dishes (thing being served) in either construction, ICL Week 8, Lecture 2 19 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 20 November 27, 2002
VegetarianFood Truth Table Meaning Representations P Q P P Q P Q P Q False False True False False True False True True False True True True False False False True False True True False True True True J&K: use FIRST ORDER PREDICATE CALCULUS (FOPC/FOL) as meaning representation. Has several desirable properties: Supports the determination of truth. Supports the answering of questions (via variables). Supports automated inference. increasing efficiency of First order theorem provers, ICL Week 8, Lecture 2 21 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 22 November 27, 2002 Formula AtomicFormula Formula Connective Formula Meaning Structure of Language Quantifier Variable Formula Formula Formula Choice of FOPC has some linguistic motivation. Human languages: AtomicFormula Predicate Term display a basic predicate-argument structure Term Constant Variable Function Term Connective Quantifier Constant Variable Predicate Function A xy Serves LocationO f Near make use of variables (e.g., indefinites) make use of quantifers (e.g., every, some) display a partially compositional semantics Maharani CuisineO f, ICL Week 8, Lecture 2 23 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 24 November 27, 2002
Predicate Argument Structure A Possible Meaning Representation There are words and constituents that protypically act like predicates, and words Syntax: and constituents that act like arguments. Predicate-like elements: NP give NP give NP NP to NP NP Vs, VPs, prepositions, adjectives, some nouns. Semantics: Argument-like elements: give nouns, Noms, NPs, etc Example: John gave Mary a book. [give(john, mary, ) book( )], ICL Week 8, Lecture 2 25 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 26 November 27, 2002 Another Look at our Meaning Representation Problems What about: John gave Mary a book for Susan. give(john, mary, book, susan) John gave Mary a book for Susan on Wednesday. give(john, mary, book, susan, wednesday) John gave Mary a book for Susan on Wednesday in class. give(john, mary, book, susan, wednesday, in-class) Except for the suggestive names of predicates and arguments, there is nothing that indicates the obvious logical relations among them Assumes that the predicate representing the meaning of a verb has the same number of arguments as the syntactic complements and modifiers that are in construction with the verb. Makes it hard to: determine the correct number of roles for any given event represent facts about the roles associated with an event ensure that all and only the correct inferences can be derived from the representation of an event, ICL Week 8, Lecture 2 27 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 28 November 27, 2002
Davidsonian Meaning Representation Advantages John gave Mary a book. agent john patient theme mary book agent, patient, theme are called THEMATIC ROLES. Alternatives: ARG1, ARG2, ARG3,... giver, givee, given E.g., Can have variable number of arguments associated with event; as many roles and fillers can be glued on as appear in the input. Reifies events so that they can be quantified and related to other events and objects via sets of defined relations. Can see logical connections between closely related examples without the need for meaning postulates. John gives Mary a book John gives a book, ICL Week 8, Lecture 2 29 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 30 November 27, 2002 Predicates Other Stuff You can think of the verb give as contributing the predicate together with the number and roles of the arguments: I,e., give means... patient theme agent The NPs in the sentence provide the values for the variables introduced by the named arguments to the V. Reading J& K Chapter 14 Emailing your Assignment 2 to me and James: Note that its jamesc@cogsci.ed.ac.uk, not james@cogsci.ed.ac.uk or jamesc@inf.ed.ac.uk Next class: Building semantic representions Start on lexical semantics (if there s time) What about the lecture we missed? Monday 9th?, ICL Week 8, Lecture 2 31 November 27, 2002 Ewan Klein, ICL Week 8, Lecture 2 32 November 27, 2002