DOC PREVIEW
Johns Hopkins EN 600 465 - LECTURE 14 SEMATICS

This preview shows page 1-2-3-4-5-33-34-35-36-67-68-69-70-71 out of 71 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 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 71 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 71 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

600.465 - Intro to NLP - J. Eisner 1 Semantics From Syntax to Meaning!600.465 - Intro to NLP - J. Eisner 2 Programming Language Interpreter  What is meaning of 3+5*6?  First parse it into 3+(5*6) + 3 * 5 6 E E F E E E 3 F N 5 N 6 N * +600.465 - Intro to NLP - J. Eisner 3 Programming Language Interpreter  What is meaning of 3+5*6?  First parse it into 3+(5*6)  Now give a meaning to each node in the tree (bottom-up) + 3 * 5 6 E E F E E E 3 F N 5 N 6 N * + 3 5 6 30 33 3 5 6 30 33 add mult600.465 - Intro to NLP - J. Eisner 4 Interpreting in an Environment  How about 3+5*x?  Same thing: the meaning of x is found from the environment (it’s 6)  Analogies in language? + 3 * 5 x 3 5 6 30 33 E E F E E E 3 F N 5 N 6 N * + 3 5 6 30 33 add mult600.465 - Intro to NLP - J. Eisner 5 Compiling  How about 3+5*x?  Don’t know x at compile time  “Meaning” at a node is a piece of code, not a number E E F E E E 3 F N 5 N x N * + 3 5 x mult(5,x) add(3,mult(5,x)) add mult 5*(x+1)-2 is a different expression that produces equivalent code (can be converted to the previous code by optimization) Analogies in language?600.465 - Intro to NLP - J. Eisner 6 What Counts as Understanding? some notions  Be able to translate (a compiler is a translator …)  Good definition? Depends on target language.  English to English? bah humbug!  English to French? reasonable  English to Chinese? requires deeper understanding  English to logic? deepest - the definition we’ll use!  all humans are mortal = x [human(x) mortal(x)]  Assume we have logic-manipulating rules that then tell us how to act, draw conclusions, answer questions …600.465 - Intro to NLP - J. Eisner 7 What Counts as Understanding? some notions  We understand if we can respond appropriately  ok for commands, questions (these demand response)  “Computer, warp speed 5”  “throw axe at dwarf”  “put all of my blocks in the red box”  imperative programming languages  database queries and other questions  We understand a statement if we can determine its truth  If you can easily determine whether it’s true, why did anyone bother telling it to you?  Comparable notion for understanding NP is to identify what it refers to. Useful, but what if it’s out of sight?600.465 - Intro to NLP - J. Eisner 8 What Counts as Understanding? some notions  We understand statement if we know how to determine its truth (in principle!)  Compile it into a procedure for checking truth against the world  “All owls in outer space are bachelors” for every object if x is a owl if location(x)  outerspace if x is not a bachelor return false return true  What if you don’t have an flying robot? (Write the code anyway)  How do you identify owls and bachelors? (Assume library calls)  What if space is infinite, so the procedure doesn’t halt? Same problem for “All prime integers …” (You won’t actually run it) meaning600.465 - Intro to NLP - J. Eisner 9 What Counts as Understanding? some notions  We understand statement if we know how one could (in principle) determine its truth  Compile it into a procedure that checks truth against the world  Better: Compile it into a mathematical formula  x owl(x) ^ outerspace(x)  bachelor(x)  Now you don’t have to worry about running it  Either true or false in the world: a mathematical question!  Statement claims that the world is such that this statement is true.  Auden (1956): “A sentence uttered makes a world appear Where all things happen as it says they do.”  But does this help? Can you check math against the real world?  What are the x’s that x ranges over? Which ones make owl(x) true?  Model the world by an infinite collection of facts and entities  Wittgenstein (1921): “The world is all that is the case. The world is the totality of facts, not of things.”600.465 - Intro to NLP - J. Eisner 10 What Counts as Understanding? some notions  We understand statement if we know how one could (in principle) determine its truth  Compile it into a procedure that checks truth against the world  Better: Compile it into a mathematical formula  x owl(x) ^ outerspace(x)  bachelor(x)  Equivalently, be able to derive all logical consequences  What else is true in every world where this statement is true?  Necessary conditions – let us draw other conclusions from sentence  And what is false in every world where this sentence is false  Sufficient conditions – let us conclude the sentence from other facts  “Recognizing textual entailment” is an NLP task ( competitions!)  John ate pizza. Can you conclude that John opened his mouth?  Knowing consequences lets you answer questions (in principle):  Easy: John ate pizza. What was eaten by John?  Hard: White’s first move is P-Q4. Can Black checkmate?600.465 - Intro to NLP - J. Eisner 11 Lecture Plan  Today:  First, intro to -calculus and logical notation  Let’s look at some sentences and phrases  What logical representations would be reasonable?  Tomorrow:  How can we build those representations?  Another course (AI):  How can we reason with those representations?600.465 - Intro to NLP - J. Eisner 12 Logic: Some Preliminaries Three major kinds of objects 1. Booleans  Roughly, the semantic values of sentences 2. Entities  Values of NPs, e.g., objects like this slide  Maybe also other types of entities, like times 3. Functions of various types  A function returning a boolean is called a “predicate” – e.g., frog(x), green(x)  Functions might return other functions!  Function might take other functions as arguments!600.465 - Intro to NLP - J. Eisner 13 Logic: Lambda Terms  Lambda terms:  A way of writing “anonymous functions”  No function header or function name  But defines the key thing: behavior of the function  Just as we can talk about 3 without naming it “x”  Let square = p p*p  Equivalent to int square(p) { return p*p; }  But we can talk about p p*p without naming it  Format of a lambda term:  variable expression600.465 - Intro to NLP - J. Eisner 14 Logic: Lambda Terms  Lambda terms:  Let square = p p*p  Then square(3) = (p


View Full Document

Johns Hopkins EN 600 465 - LECTURE 14 SEMATICS

Download LECTURE 14 SEMATICS
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 LECTURE 14 SEMATICS 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 LECTURE 14 SEMATICS 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?