# Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University.

## Presentation on theme: "Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University."— Presentation transcript:

Predicate Logic Torbjörn Lager Department of Linguistics Stockholm University

NLP1 - Torbjörn Lager 2 Why Logic in NLP? zAccount for ambiguity y"Every man loves a woman" zAllow evaluation (in e.g. a database) zAllow logical inference yEvery man who whistles is happy yJohn is a man yJohn whistles yTherefore: John is happy

NLP1 - Torbjörn Lager 3 A Semantic Puzzle zWhat's wrong with the following argument: y"Nothing is better than a long and prosperous life. yA ham sandwich is better than nothing. yTherefore: A ham sandwich is better than a long and prosperous life."

NLP1 - Torbjörn Lager 4 Translation Natural Language Predicate Logic  John laughed laughed'(j)  Nobody laughed  x[laughed'(x)]

NLP1 - Torbjörn Lager 5 Translate zKalle sover zKalle är en katt zAlla sover zNågon sover zVarje katt sover zNågon katt sover zIngen sover zIngen katt sover zAlla gillar någon

NLP1 - Torbjörn Lager 6 An Important Tradition zWe use language to talk about the world zSemantics is something that relates sentences (or utterances) of language and the outside world zThere are other ideas about meaning, but in this tradition we don't believe in them! Language The outside world

NLP1 - Torbjörn Lager 7 Model Theoretic Semantics zWe don't know what the world is really like, so let's talk about a model of the world instead zSuch a model does (usually) consists of individuals, sets of individuals, functions and relations. i.e the sort of things set theory talks about zTruth becomes truth relative to a model Language Model The outside world

NLP1 - Torbjörn Lager 8 An Example Model zA simple model M: yDomain: x{Socrates, Aristotle, Plato, Mozart, Beethoven, Tolstoy} yInterpretation: xF(s) = SocratesF(m) = Mozart xF(a) = AristotleF(b) = Beethoven xF(p) = PlatoF(t) = Tolstoy xF(H) = {Socrates, Aristotle, Plato} xF(M) = {Socrates, Aristotle, Plato, Mozart, Beethoven, Tolstoy} xF(L) = {,,,,,, }

NLP1 - Torbjörn Lager 9

10

NLP1 - Torbjörn Lager 11

NLP1 - Torbjörn Lager 12 A Semantic Puzzle zWhat'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."

Similar presentations