Unformatted text preview:

SemanticsProgramming Language InterpreterSlide 3Interpreting in an EnvironmentCompilingWhat Counts as Understanding? some notionsSlide 7Slide 8Slide 9Slide 10Lecture PlanLogic: Some PreliminariesLogic: Lambda TermsSlide 14Lambda calculus vs. AP calculusLogic: Multiple ArgumentsSlide 17Grounding outSlide 19Logic: Interesting ConstantsLogic: Connectives & QuantifiersSlide 22Model TheoryRandom Variables: What is “variable” in “p(variable=value)”?A reasonable representation?Slide 26Use a QuantifierTense(Simplify Notation)Event PropertiesQuantifier OrderSlide 32Slide 33Slide 34Intensional ArgumentsSlide 36Possible WorldsPossible Worlds: More usesSlide 39Slide 40ControlNouns and Their ModifiersSlide 43Slide 44AdverbsSpeech ActsSlide 47Compositional SemanticsSlide 49Slide 50Slide 51Slide 52Slide 53Slide 54PowerPoint PresentationSlide 56Slide 57Slide 58Slide 59Slide 60Slide 61Slide 62Slide 63Slide 64Slide 65Slide 66In Summary: From the WordsOther Fun Semantic Stuff: A Few Much-Studied MiscellanyPragmaticsUncertainty about the WorldSlide 71600.465 - Intro to NLP - J. Eisner 1SemanticsFrom Syntax to Meaning!600.465 - Intro to NLP - J. Eisner 2Programming Language InterpreterWhat is meaning of 3+5*6?First parse it into 3+(5*6)+3*56EEFEEE3FN5N6N*+600.465 - Intro to NLP - J. Eisner 3Programming Language InterpreterWhat is meaning of 3+5*6?First parse it into 3+(5*6)Now give a meaning toeach node in the tree(bottom-up)+3*56EEFEEE3FN5N6N*+35 6303335 63033addmult600.465 - Intro to NLP - J. Eisner 4Interpreting in an EnvironmentHow about 3+5*x?Same thing: the meaningof x is found from theenvironment (it’s 6)Analogies in language?+3*5x35 63033EEFEEE3FN5N6N*+35 63033addmult600.465 - Intro to NLP - J. Eisner 5CompilingHow about 3+5*x?Don’t know x at compile time“Meaning” at a nodeis a piece of code, not a numberEEFEEE3FN5NxN*+35 xmult(5,x)add(3,mult(5,x))addmult5*(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 6What 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 7What 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 8What 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 falsereturn 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 9What 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 10What 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 11Lecture 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 12Logic: Some PreliminariesThree major kinds of objects1. Booleans Roughly, the semantic values of sentences2. Entities Values of NPs, e.g., objects like this slideMaybe also other types of entities, like times3. Functions of various types A function returning a boolean is called a “predicate” – e.g.,


View Full Document

Johns Hopkins EN 600 465 - Semantics

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?