Title: Computational Semantics http:www'coli'unisb'declprojectsmilcaesslli
1Computational Semanticshttp//www.coli.uni-sb.de/
cl/projects/milca/esslli/
- Day 5 Inference
- Aljoscha Burchardt,
- Alexander Koller,
- Stephan Walter,
- Universität des Saarlandes,
- Saarbrücken, Germany
- ESSLLI 2004, Nancy, France
2Where are we by now?
So far
John loves Mary.
Sentence
Linguistic Analysis
Why???
Why meaning?
Why logic?
Formula
love(john, mary)
3Motivations
- Why meaning?
- The big question in the background of semantics
How do linguistic expressions relate to the
world? - The need for inference in a broad sense is
omnipresent in linguistic processing Getting
some piece of information out of another. This
process is meaning based. - Why logic?
- Using logic helps us in answering both problems
at once.
4Meaning based linguistic Inferences
Peter loves Mary and she doesn't love him. No one
is happy if he isn't loved by the one he loves. ?
Peter is not happy
- Answering questions
- A "Is Peter happy" B
-
- Discourse
- There is my car. The roof is red.
- gt The roof of this particular car.
- Pragmatics
- A Shall we watch Athens?, B Oh, I hate
Sports - Answer is "no."
- ...
"No"
5Logical Inferences
- Argumentation Classical field gt Answering
questions - Every human is mortal, Socrates is a human
- gt Socrates is mortal.
- ?x.human(x) -gt mortal(x), human(soc)
mortal(soc) - Discourse, Pragmatics, ... Inference problems
during processing - logical relations between readings (equivalence,
implication, contradiction) - ?y?x.love(x,y) ? ?x?y.love(x,y)
- ?x?y.love(x,y) ? ?y?x.love(x,y)
- discourse maxims utterance consistent?
informative? - "lexical" inference "Brussels lowers taxes"
- presuppositions
6Next
- How do linguistic expressions relate to the
world? - Building logical representations is a step
towards a scientific theory of this relation! - They're a way of replacing something we don't
understand by something we understand (at least
better). - Why? Because we have a formal way of saying what
they mean Models.
7The big question of semantics
John loves Mary and Peter doesn't.
Semantic construction
love(john,mary) ??love(peter,mary)
???
"Understanding language"
Logics
man(john), man(peter), woman(mary),
love(john,mary)
???
Cognition / Ontology
???
?? ?
8Plan for Today
- What's the advantage of FOL-formulae?
- Interpretations and models
- Doing things with semantic representations
- Logical Inference and Proof Theory
- A calculus
- Automated Theorem Proving (first steps)
- An implementation of propositional tableaux
- A sample application
9FOL-semantics
- What does a FO-formula mean?
- It may be true or false (that's all)
- Whether it is true or false is calculated given a
model. - So A formula is true or false in a model.
- But what is a model?
10Models
A model can be thought of as a set of basic facts
that describe a part of the world. E.g., talking
about John, Mary, Peter, love, man and woman
- John loves Mary.
- John is a man.
- Mary doesn't love John.
- Peter is a man.
- Mary isn't a man.
- Mary is a woman.
- In this listing
- Who is there?
- Which properties do (or don't) they have?
11Formally
- This intuition is formalized as follows
- A model is an ordered pair of a set and a
Function - M (D, F)
The interpretation function Which properties do
these things have? (and more)
The domain What is there.
12Example model
- D John, Mary, Peter
- F (John, John),
- (Mary, Mary),
- (Peter, Peter)
- (man, John, Peter),
- (woman, Mary),
- (love, (John, Mary))
-
13Truth in a model
- g Assignment function, assigning values from D
to variables
14Models as Sets of Formulae
- For our purposes, models are simply sets of
literals (i.e. positive or negative atomic
formulae). - Set contains all literals that are true in the
model. - Our example
- man(john), man(peter), woman(mary),
love(john,mary),?love(mary,john), - Truth of atomic formulae without variables
- R(t1,,tn) ? M
15From theory to practice
- Models define the semantics of logical languages
- and are an interesting concept for relating
language and the world. - But they're also of practical importance
- They're the key to a formalization of inference.
- Now some further important logical notions.
16Inference and Entailment
- Valid inference Truth of premises guarantees
truth of conclusion. - Entailment Talking about all models.
- Concept directly captures syllogistic reasoning.
P, Q, R
For all M, g such that
we have
and
and
17Validity
- A related notion Truth of a formula in all
models Validity - A iff for all M,g
- Validity formalizes the notion of tautology,
e.g. - Sylvester is either a cat or not.
- cat(s) v ? cat(s)
- Relation to entailment via the deduction theorem
- A B iff A?B
18Where are we now?
- Why meaning? ?
- Why logic? ?
- Relation to the world Models ?
- Inferences Entailment and validity ?
- How to compute with these notions?
19How to work with all models?
- Entailment and validity are both defined with
respect to all models. - Problem There are infinitely many models.
- How can we work with these notions then?
- Idea Tell whether a formula is valid or not just
by looking at it! - The answer A calculus.
20Calculi
- Calculi are rule-based systems for manipulating
formulae according to their structure. - Some of the resulting configurations are called
proofs. - Formulas with proofs are called theorems.
- A good calculus produces a proof iff its input
formula is valid.
21"Good" Calculi
- Good Calculi are
- Sound Only valid formulae get a proof.
- Complete All valid formulae get a proof.
- In other words All and only theorems are valid.
- -
- To achieve this, one has to give the right rules.
Let's try
22Tableaux The intuition I
- Truth conditions tell us what would have to hold
in a model for a given formula, e.g. - A and B hold in all models for A ? B
- For A ? B, there are two kinds of models Those
for A and those for B. -
- If we go on decomposing a formulas that way, we
end up with sets of literals - ? models
- Example smoke(john) ? (? love(mary,john) ? ?
love(john,mary)) - ? smoke(john), ?love(john, mary)
- ? smoke(john), ?love(mary, john)
23Tableaux The intuition II
- We know If a formula is valid, it's always true.
- I.e. No model makes it false.
- Making formulae false
- (smoke(john) ? walk(john))F
- ? ?smoke(john), ?walk(john)
- (smoke(john) ? ?smoke(john)) F
- ? smoke(john), ?smoke(john)
"sign"
?
?
24Tableaux
- If we want to know whether a formula is valid, we
systematically try to find a model that would
make it false - hoping that we find none.
- That is, all attempts should lead to
contradictions. - Next A look at
-
(
)F
?((p?q) ?(?p??q))
25(No Transcript)
26(No Transcript)
27(No Transcript)
28(No Transcript)
29(No Transcript)
30(No Transcript)
31A simple fragment
- Next The rules for a tableaux calculus for
predicate logic without variables and
quantifiers. - Actually propositional logic
- Advantage 1 Decidable
- Advantage 2 Rules are easy
- Disadvantage Boring and restricted
- More is possible but not here and now.
32Preprocessing
- Reduce the number of connectives by translating ?
and ? to ? and ?. - Use logical equivalences
- A ? B ? ? (?A ? ?B) De Morgan
- A ? B ? ? (A ? ?B)
33Tableaux Inference Rules
34 Mary loves Bill or John loves Mary'' John
loves Mary ???
35Summing up
- Using predicate logic as representation language
seemed to be a design decision on Monday. - Now we're happy we did it
- Models tell us when sentences are true.
- Models give us a concept of logical inference.
- This concept can be mechanized by calculi.
- After the break Calculi can be implemented in
provers. And provers are useful!
36More logics - Changing the language and/or the
semantics.
- Different phenomena, different logics
- Intensional logic (John seeks a unicorn)
- Temporal logics (tense)
- Dynamic logics (anaphora)
- Higher Order (quantifiers)
- Different tasks different tools
- Decidability and complexity
- From propositional over first order to higher
order - In between. E.g. Description logics.