predicate logic torbjörn lager department of linguistics stockholm university

12
Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

Upload: leroy-jernigan

Post on 14-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

Predicate Logic

Torbjörn LagerDepartment of LinguisticsStockholm University

Page 2: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 2

Why Logic in NLP?

Account for ambiguity "Every man loves a woman"

Allow evaluation (in e.g. a database) Allow logical inference

Every man who whistles is happy John is a man John whistles Therefore: John is happy

Page 3: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 3

A Semantic Puzzle

What's wrong with the following argument: "Nothing is better than a long and prosperous life. A ham sandwich is better than nothing. Therefore: A ham sandwich is better than a long and

prosperous life."

Page 4: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 4

Translation Natural Language <-> Predicate Logic

John laughed <-> laughed'(j)

Nobody laughed <-> x[laughed'(x)]

Page 5: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 5

Translate

Kalle sover Kalle är en katt Alla sover Någon sover Varje katt sover Någon katt sover Ingen sover Ingen katt sover Alla gillar någon

Page 6: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 6

An Important Tradition

We use language to talk about the world

Semantics is something that relates sentences (or utterances) of language and the outside world

There are other ideas about meaning, but in this tradition we don't believe in them!

Language

The outside world

Page 7: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 7

Model Theoretic Semantics

We don't know what the world is really like, so let's talk about a model of the world instead

Such a model does (usually) consists of individuals, sets of individuals, functions and relations. i.e the sort of things set theory talks about

Truth becomes truth relative to a model

Language

Model

The outside world

Page 8: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 8

An Example Model

A simple model M: Domain:

{Socrates, Aristotle, Plato, Mozart, Beethoven, Tolstoy} Interpretation:

F(s) = Socrates F(m) = Mozart F(a) = Aristotle F(b) = Beethoven F(p) = Plato F(t) = Tolstoy F(H) = {Socrates, Aristotle, Plato} F(M) = {Socrates, Aristotle, Plato, Mozart, Beethoven, Tolstoy} F(L) = {<Socrates,Socrates>, <Socrates,Aristotle>,

<Mozart,Beethoven>, <Beethoven,Mozart>, <Tolstoy,Plato>, <Plato,Mozart>, <Aristotle,Tolstoy>}

Page 9: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 9

Page 10: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 10

Page 11: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 11

Page 12: Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 12

A Semantic Puzzle

What's wrong with the following argument: "Nothing is better than a long and prosperous life. A ham sandwich is better than nothing. Therefore, a ham sandwich is better than a long and prosperous life."