320 likes | 440 Views
Representation and Inference for Natural Language. Seminar in computational semantics – Fall 2007. Introduction. Two key questions How can we automate the process of associating semantic representations with expressions of natural language?
E N D
Representation and Inference for Natural Language Seminar in computational semantics – Fall 2007
Introduction • Two key questions • How can we automate the process of associating semantic representations with expressions of natural language? • How can we use logical representations of natural language expressions to automate the process of drawing inferences?
Introduction • Two key questions • How can we automate the process of associating semantic representations with expressions of natural language? • How can we use logical representations of natural language expressions to automate the process of drawing inferences?
Introduction • Two key questions • How can we automate the process of associating semantic representations with expressions of natural language? • How can we use logical representations of natural language expressions to automate the process of drawing inferences?
Introduction • Two key questions • How can we automate the process of associating semantic representations with expressions of natural language? • How can we use logical representations of natural language expressions to automate the process of drawing inferences? Computational semantics
Introduction • Representation • First-order logic in the tradition of Montague “There is no essential difference between the semantics of natural languages and formal languages.”
Introduction • Inference – the process of making implicit information explicit • Querying task • Consistency checking task • Informativity checking task
Introduction • Prerequisites • Semantics (Heim and Kratzer, 1998) • Prolog (http://www.learnprolognow.org) • Other stuff • ACL Special Interest Group on Computational Semantics (SIGSEM) • International Workshop on Computational Semantics (IWCS) • Inference in Computational Semantics (ICoS)
Chapter 1: first-order logic • Outline • First-order logic • Three inference tasks • A first-order model checker • First-order logic and natural language
First-order logic • Vocabulary { (LOVE, 2), (CUSTOMER, 1), (ROBBER, 1), (MIA, 0), (VINCENT, 0), (HONEY-BUNNY, 0), (YOLANDA, 0), } • Tells us what things we can talk about and how we can talk about them
First-order logic • Model • Combination of a domain D and an interpretation function F
First-order logic • First-order languages • Term t : constant or variable • Atomic formula: • Well-formed formulas (wffs): • All atomic formulas are wffs • If and are wffs, then so are • If is a wff and x is a variable, then both and are wffs • Nothing else is a wff
First-order logic • Example formulas
First-order logic • Free versus bound variables Free variable Bound variable Bound variable
First-order logic • Free versus bound variables • Inductive definition • Variables in atomic formulas are free • If any variable in or is free, then that same variable is free in • If x is free in , then that occurrence is free in formulas and for all distinct from • All other variables are bound
First-order logic • If a formula contains no free variables, it is called a sentence • Given a sentence and a model for some vocabulary, determine if the sentence is true in the model
First-order logic • Assignment functions • Let M=(D,F) be a model • g is an assignment function of values to variables D = {d1, d2, d3, …} g(x1) = d1 g(x2) = d2 … g(xn) = d34 • g’ is an xi -variant of g if, for all j != i, g’(xj)=g(xj) • g and g’ are said to be assignment functions in M
First-order logic • Assignment functions • Recall: • Each term must have an interpretation w.r.t. a model M and assignment function g
First-order logic • The satisfaction definition • Let be a formula, M=(D,F) be a model, and g be an assignment in M. Then M,g is defined as:
First-order logic • Finally! A sentence is true in a model M iff: There exists an assignment g in M such that • That is, for all possible assignments of values to variables, the sentence is entailed by the model • If a sentence is true in a model M we write
First-order logic • Satisfaction example 1 (without variables): M = (D,F) D = {marsellus, mia} F(MARSELLUS) = marsellus F(MIA) = mia F(LOVES) = {(marsellus, mia)} Sentence to test: LOVES(MARSELLUS, MIA)
First-order logic Satisfaction example 1 (without variables): • M = (D,F) LOVES(MARSELLUS, MIA)? • D = {marsellus, mia} • F(MARSELLUS) = marsellus • F(MIA) = mia • F(LOVES) = {(marsellus, mia)}
First-order logic Satisfaction example 1 (without variables): • M = (D,F) LOVES(MARSELLUS, MIA)? • D = {marsellus, mia} • F(MARSELLUS) = marsellus • F(MIA) = mia • F(LOVES) = {(marsellus, mia)}
First-order logic • Satisfaction example 2 (with variables): M = (D,F) D = {vincent, mia} F(VINCENT) = vincent F(MIA) = mia F(LOVES) = {(vincent, mia)} Sentence to test: “Plain” English: do all possible assignment functions g in M results in ?
First-order logic • Satisfaction example 2 (with variables): M = (D,F) D = {vincent, mia} F(VINCENT) = vincent F(MIA) = mia F(LOVES) = {(vincent, mia)}
First-order logic • Satisfaction example 2 (with variables): M = (D,F) D = {vincent, mia} F(VINCENT) = vincent F(MIA) = mia F(LOVES) = {(vincent, mia)} Two possible g functions: g1(x) = vincent, g2(x) = mia For g1: g1’ (x) = mia (valid x-variant of g)
First-order logic • Satisfaction example 2 (with variables): M = (D,F) D = {vincent, mia} F(VINCENT) = vincent F(MIA) = mia F(LOVES) = {(vincent, mia)} Two possible g functions: g1(x) = vincent, g2(x) = mia For g2: g2’ (x) = g2(x) (valid x-variant of g)
Three inference tasks • Query checking • Given a model M and a first-order formula , is satisfied in M • This task is performed by a model checker
Three inference tasks • Consistency checking • Compare: • Mia is happy. • Mia is happy. Mia is not happy. • Given a first-order formula , is consistent (satisfiable) or inconsistent (unsatisfiable) • Computationally undecidable, necessitating a proof-theoretic approach instead of a model-theoretic approach
Three inference tasks • Informativity checking • Given a new formula and existing formulas , is informative ( ) or not ( )
First-order model checker • Prolog example
First-order logic and NL • Inference • Availability of tools • Incorporation of background knowledge • Representation • What about time? Probability?