semantics and pragmatics of nlp
play

Semantics and Pragmatics of NLP Lascarides & Klein Lambda - PowerPoint PPT Presentation

SPNLP: Lambda Terms, Quantifiers, Satisfaction Semantics and Pragmatics of NLP Lascarides & Klein Lambda Terms, Quantifiers, Satisfaction Outline Typed Lambda Calculus Alex Lascarides & Ewan Klein First Order Logic Truth and


  1. SPNLP: Lambda Terms, Quantifiers, Satisfaction Semantics and Pragmatics of NLP Lascarides & Klein Lambda Terms, Quantifiers, Satisfaction Outline Typed Lambda Calculus Alex Lascarides & Ewan Klein First Order Logic Truth and School of Informatics Satisfaction University of Edinburgh 10 January 2008

  2. SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & Typed Lambda Calculus 1 Klein Outline Typed Lambda 2 First Order Logic Calculus First Order Logic Truth and Satisfaction Truth and Satisfaction 3

  3. Transitive Verbs as Functions SPNLP: Lambda Terms, Quantifiers, We looked at replacing n -ary relations with functions. How Satisfaction does this work with transitive verbs? Lascarides & Klein Outline Version 1: chase of type < IND , IND > → BOOL Typed Version 2: chase of type IND → ( IND → BOOL ) Lambda Calculus First Order Advantages of Version 2 (called a curryed function ): Logic Truth and Satisfaction Makes the syntax more uniform. Fits better with compositional semantics (discussed later)

  4. Transitive Verbs as Functions SPNLP: Lambda Terms, Quantifiers, We looked at replacing n -ary relations with functions. How Satisfaction does this work with transitive verbs? Lascarides & Klein Outline Version 1: chase of type < IND , IND > → BOOL Typed Version 2: chase of type IND → ( IND → BOOL ) Lambda Calculus First Order Advantages of Version 2 (called a curryed function ): Logic Truth and Satisfaction Makes the syntax more uniform. Fits better with compositional semantics (discussed later)

  5. Transitive Verbs as Functions SPNLP: Lambda Terms, Quantifiers, We looked at replacing n -ary relations with functions. How Satisfaction does this work with transitive verbs? Lascarides & Klein Outline Version 1: chase of type < IND , IND > → BOOL Typed Version 2: chase of type IND → ( IND → BOOL ) Lambda Calculus First Order Advantages of Version 2 (called a curryed function ): Logic Truth and Satisfaction Makes the syntax more uniform. Fits better with compositional semantics (discussed later)

  6. Transitive Verbs as Functions SPNLP: Lambda Terms, Quantifiers, We looked at replacing n -ary relations with functions. How Satisfaction does this work with transitive verbs? Lascarides & Klein Outline Version 1: chase of type < IND , IND > → BOOL Typed Version 2: chase of type IND → ( IND → BOOL ) Lambda Calculus First Order Advantages of Version 2 (called a curryed function ): Logic Truth and Satisfaction Makes the syntax more uniform. Fits better with compositional semantics (discussed later)

  7. Transitive Verbs as Functions SPNLP: Lambda Terms, Quantifiers, We looked at replacing n -ary relations with functions. How Satisfaction does this work with transitive verbs? Lascarides & Klein Outline Version 1: chase of type < IND , IND > → BOOL Typed Version 2: chase of type IND → ( IND → BOOL ) Lambda Calculus First Order Advantages of Version 2 (called a curryed function ): Logic Truth and Satisfaction Makes the syntax more uniform. Fits better with compositional semantics (discussed later)

  8. Lambda SPNLP: Lambda Terms, Lambdas talk about missing information, and where it is. Quantifiers, Satisfaction The λ binds a variable. Lascarides & Klein The positions of a λ -bound variable in the formula mark Outline where information is ‘missing’. Typed Lambda Replacing these variables with values fills in the Calculus missing information. First Order Logic Example: Truth and Satisfaction λ x . ( man x ) λ -abstract ( λ x . ( man x ) john ) application ( man john ) β -reduction/function application.

  9. Types SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & Klein IND and BOOL are basic types. If σ, τ are types, then so is ( σ → τ ) . Brackets are Outline Typed omitted if no ambiguity. Lambda Calculus For types τ , we have variables Var ( τ ), constants First Order Con ( τ ). Logic Truth and Since we are doing first order logic, we will later restrict Satisfaction variables to Var ( IND ), but allow constants of any type.

  10. Types SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & Klein IND and BOOL are basic types. If σ, τ are types, then so is ( σ → τ ) . Brackets are Outline Typed omitted if no ambiguity. Lambda Calculus For types τ , we have variables Var ( τ ), constants First Order Con ( τ ). Logic Truth and Since we are doing first order logic, we will later restrict Satisfaction variables to Var ( IND ), but allow constants of any type.

  11. Types SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & Klein IND and BOOL are basic types. If σ, τ are types, then so is ( σ → τ ) . Brackets are Outline Typed omitted if no ambiguity. Lambda Calculus For types τ , we have variables Var ( τ ), constants First Order Con ( τ ). Logic Truth and Since we are doing first order logic, we will later restrict Satisfaction variables to Var ( IND ), but allow constants of any type.

  12. Types SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & Klein IND and BOOL are basic types. If σ, τ are types, then so is ( σ → τ ) . Brackets are Outline Typed omitted if no ambiguity. Lambda Calculus For types τ , we have variables Var ( τ ), constants First Order Con ( τ ). Logic Truth and Since we are doing first order logic, we will later restrict Satisfaction variables to Var ( IND ), but allow constants of any type.

  13. Terms in Typed Lambda Calculus SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & We define terms Term ( τ ) of type τ : Klein Var ( τ ) ⊆ Term ( τ ). Outline Typed Con ( τ ) ⊆ Term ( τ ). Lambda Calculus If α ∈ Term ( σ → τ ) and β ∈ Term ( σ ) then First Order Logic ( α β ) ∈ Term ( τ ) (function application). Truth and If x ∈ Var ( σ ) and α ∈ Term ( ρ ) , then λ x .α ∈ Term ( τ ) , Satisfaction where τ = ( σ → ρ )

  14. Terms in Typed Lambda Calculus SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & We define terms Term ( τ ) of type τ : Klein Var ( τ ) ⊆ Term ( τ ). Outline Typed Con ( τ ) ⊆ Term ( τ ). Lambda Calculus If α ∈ Term ( σ → τ ) and β ∈ Term ( σ ) then First Order Logic ( α β ) ∈ Term ( τ ) (function application). Truth and If x ∈ Var ( σ ) and α ∈ Term ( ρ ) , then λ x .α ∈ Term ( τ ) , Satisfaction where τ = ( σ → ρ )

  15. Terms in Typed Lambda Calculus SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & We define terms Term ( τ ) of type τ : Klein Var ( τ ) ⊆ Term ( τ ). Outline Typed Con ( τ ) ⊆ Term ( τ ). Lambda Calculus If α ∈ Term ( σ → τ ) and β ∈ Term ( σ ) then First Order Logic ( α β ) ∈ Term ( τ ) (function application). Truth and If x ∈ Var ( σ ) and α ∈ Term ( ρ ) , then λ x .α ∈ Term ( τ ) , Satisfaction where τ = ( σ → ρ )

  16. Terms in Typed Lambda Calculus SPNLP: Lambda Terms, Quantifiers, Satisfaction Lascarides & We define terms Term ( τ ) of type τ : Klein Var ( τ ) ⊆ Term ( τ ). Outline Typed Con ( τ ) ⊆ Term ( τ ). Lambda Calculus If α ∈ Term ( σ → τ ) and β ∈ Term ( σ ) then First Order Logic ( α β ) ∈ Term ( τ ) (function application). Truth and If x ∈ Var ( σ ) and α ∈ Term ( ρ ) , then λ x .α ∈ Term ( τ ) , Satisfaction where τ = ( σ → ρ )

  17. Extending to a First Order Language SPNLP: Lambda Terms, Quantifiers, 1 Variables i.e., Var ( IND ): x , y , z , . . . , x 0 , x 1 , x 2 , . . . Satisfaction Lascarides & 2 Boolean connectives: Klein ¬ BOOL → BOOL (negation) Outline ∧ BOOL → ( BOOL → BOOL ) (and) Typed ∨ BOOL → ( BOOL → BOOL ) (or) Lambda Calculus → BOOL → ( BOOL → BOOL ) (if. . . then) First Order Logic 3 Quantifiers: ∀ (all) Truth and ∃ (some) Satisfaction 4 Equality: = τ → ( τ → BOOL ) 5 Punctuation: brackets and period

  18. Quantifier Syntax SPNLP: Lambda Terms, If φ ∈ Term ( BOOL ), and x ∈ Var ( IND ), then ∀ x .φ and Quantifiers, Satisfaction ∃ x .φ ∈ Term ( BOOL ). Lascarides & Klein x ∈ Var ( IND ) is called an individual variable. Outline Typed Syntactic conventions: Lambda Calculus First Order Instead of writing ((= α ) β ) , (( ∧ φ ) ψ ) , etc., we write Logic (= α = β ) , ( φ ∧ ψ ) , etc. Truth and Satisfaction Instead of writing e.g., ((chase fido) john), we sometimes write (chase fido john). NB this is equivalent to chase(john, fido) on a relational approach.

  19. Quantifier Syntax SPNLP: Lambda Terms, If φ ∈ Term ( BOOL ), and x ∈ Var ( IND ), then ∀ x .φ and Quantifiers, Satisfaction ∃ x .φ ∈ Term ( BOOL ). Lascarides & Klein x ∈ Var ( IND ) is called an individual variable. Outline Typed Syntactic conventions: Lambda Calculus First Order Instead of writing ((= α ) β ) , (( ∧ φ ) ψ ) , etc., we write Logic (= α = β ) , ( φ ∧ ψ ) , etc. Truth and Satisfaction Instead of writing e.g., ((chase fido) john), we sometimes write (chase fido john). NB this is equivalent to chase(john, fido) on a relational approach.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend