This preview shows page 1-2-3-4-5-39-40-41-42-43-44-78-79-80-81-82 out of 82 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 82 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

6.863J Natural Language ProcessingLecture 13: Semantics IIRobert C. [email protected]/9.611J Lecture 13 Sp03The Menu Bar• Administrivia:• Schedule alert: Lab 3 due today• Lab 4: posted; due April 9 • Agenda: • Semantics: the model-theoretic, composition-based view of meaning; example system• Noun phrase interpretation and quantification• Details of quantification, semantic representation & evaluation• Lexical semantics: the meanings of words• Tense and time6.863J/9.611J Lecture 13 Sp03Example of what we might do: text understanding via q-answeringathena>(top-level)Shall I clear the database? (y or n) ysem-interpret>John saw Mary in the parkOK.sem-interpret>Where did John see MaryIN THE PARK.sem-interpret>John gave Fido to MaryOK.sem-interpret>Who gave John FidoI DON'T KNOWsem-interpret>Who gave Mary FidoJOHNsem-interpret >John saw FidoOK.sem-interpret>Who did John seeFIDO AND MARY6.863J/9.611J Lecture 13 Sp03How: recover meaning from structureS or IPNP VPVNPJohnateice-cream= λy.ate (y, ice-cream)VP(NP)= ate(john , icecream)ice-creamjohnλxλy.ate(y, x)6.863J/9.611J Lecture 13 Sp03“Logical” semantic interpretation• Four basic principles1. Rule-to-Rule semantic interpretation [aka “syntax-directed translation”]: pair syntax, semantic rules. (GPSG: pair each cf rule w/ semantic ‘action’; as in compiler theory – due to Knuth, 1968)2. Compositionality: Meaning of a phrase is a function of the meaning of its parts and nothing more e.g., meaning of S→NP VP is f(M(NP)• M(VP)) (analog of ‘context-freeness’for semantics – local)3. Truth conditional meaning: meaning of S equated with conditions that make it true4. Model theoretic semantics: correlation betw. Language & world via set theory & mappings6.863J/9.611J Lecture 13 Sp03Model theoretic semanticsMore specifically, a model1. Consists of a set D (the domain) and2. A set of variables, V;3. A function F (the interpretation function)4. F assigns to each individual constant a member of D;5. Assigns to each one-place predicate (arity 1) a subset of D; to each 2-place predicate (eg, eat) a subset of D x D, etc.• Our lambda calculus version merely makes use of lambda functions to serve as these functions6.863J/9.611J Lecture 13 Sp03In this picture• The meaning of a sentence is the composition of a function VP* on an argument NP*• The lexical entries are λ forms• Simple nouns are just constants• Verbs are λ forms indicating their argument structure• Verb phrases return λ functions as their results (in fact – higher order)6.863J/9.611J Lecture 13 Sp03Example• John ate ice-cream• Top level process-sentence routine used,with the (eventually constructed)interpretation of the S (built from below):(lambda (s)(process-sentence s)‘(ATE :AGENT JOHN :PATIENT ICE-CREAM:TENSE PAST))• process-sentence actually does the job of retrieving fact from db, adding fact to db, carrying out an inference, carrying out a robot interface, etc.6.863J/9.611J Lecture 13 Sp03Event structure representation• Essentially ‘verb frames’• Needs multiple arity predicate-argument structures, semantic labeling of arguments from predicates, and semantic constraints on the fillers of the arguments• Existing system in lab has just 3 sorts of ‘process sentence’ dispatches:• Assert• Retrieve yes-no• Retrieve wh question6.863J/9.611J Lecture 13 Sp03Wh questions• Part of process-sentence• Wh form is placed by semantics in template as, eg, ?which or ?who• This will then correspond to the “for which x, x a person” typed lambda calculus form we wanted – explicitly in a procedural way• Procedure prompts a search through db for matching sets of items that can align w/ the template6.863J/9.611J Lecture 13 Sp03How: to recover meaning from structureSNP VPVNPJohnateice-creamλx.x, x=Johnλx.x, x=ice-creamλxλy ate(y,x)** *John==ice-cream*= V*(NP*)=λxλy ate(y,x).ic= λy ate(y, ic)6.863J/9.611J Lecture 13 Sp03HowSNP VPVNPJohnateice-creamλx.x, x=Johnλx.x, x=ice-creamλxλy ate(y,x)** *John==ice-cream*=λy ate(y, ic)ate(John, ic)*= VP*(NP*)=λy ate(y, ic).John=ate(John, ic)6.863J/9.611J Lecture 13 Sp03How• Application of the lambda form associated with the VP to the lambda form given by the argument NP• Words just return ‘themselves’ as values (from lexicon)• Given parse tree, then by working bottom up as shown next, we get to the logical form ate(John, ice-cream)• This predicate can then be evaluated against a database – this is model interpretation- to return a value, or t/f, etc.6.863J/9.611J Lecture 13 Sp03Code – sample rules(root ==> s) (lambda (s)(PROCESS-SENTENCE s))(s ==> np vp) (lambda (np vp)(funcall vp np)))(vp ==> v+args) (lambda (v+args)(lambda (subj)(funcall v+args subj))))(v+args ==> v2 np)(lambda (v2 np)(lambda (subj)(funcall v2 subj np))))(v kiss) (lambda (agent beneficiary affcted-obj))(np-pro ==> name) #'identity)Syntactic ruleSemantic ruleVerb arguments6.863J/9.611J Lecture 13 Sp03The semantic interpreter procedure(lambda (s) (process-sentence s)(ate :agent John :patient ice-cream :tense past)SNPNP-proJohn(lambda(x) x)*lexical-semantics*JohnVP(lambda (np vp)(funcall vp np)JohnName(lambda(x) x)V+argsV2+tns NPJohnRoot(lambda (subj) (funcall v2+tns subj))*lexical-semantics*NPNP-proNameice-creamice-cream*lexical-semantics*(lambda (agent patient)(ate :agent agent :patient patient :tense past))ate(lambda(v2+tns np)(lambda (subj)(funcall v2+tns subj np))ice-cream6.863J/9.611J Lecture 13 Sp03How does this work?• Top level lambda says to call procedure named VP (whose value will be determined “from below”, ie, S-I of VP) by using the arg NP (again whose meaning will be provided “from below)• In other words, to find the meaning of S, we call the procedure VP using as an argument the subject NP• These two values will be supplied by the (recursive) semantic interpretation of the NP and VP nodes.• At the very bottom, individual words must also contain some paired ‘semantic’ value• This is almost enough to do the code for the whole example!6.863J/9.611J Lecture 13 Sp03Code – sample rulesadd-rule-semantics '(root ==> s)'(lambda (s)(PROCESS-SENTENCE s)))(add-rule-semantics '(s ==> np vp)#'(lambda (np vp)(funcall vp np)))(add-rule-semantics '(vp ==> v+args)#'(lambda (v+args)#'(lambda (subj)(funcall v+args subj))))(add-rule-semantics '(v+args ==> v2 np)#'(lambda (v2 np)#'(lambda (subj)(funcall v2 subj np)))) (add-rule-sem '(np-pro ==>


View Full Document

MIT 6 863J - Semantics

Documents in this Course
N-grams

N-grams

42 pages

Semantics

Semantics

75 pages

Semantics

Semantics

64 pages

Load more
Download Semantics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Semantics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Semantics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?