Title: CAS LX 502
1CAS LX 502
- 8b. Formal semantics
- A fragment of English
2Infinite use, finite means
- A fundamental property of language is its
recursive naturewe can create unboundedly many
new sentences, and understand what they mean. - Infinite use of finite means, one of the main
reasons to suppose that our knowledge of language
is systematic, that language is not a collection
of habits and analogy, but must be described by a
grammar.
3Infinite use, finite means
- In the domain of syntax, the task is primarily to
describe/explain why some arrangements of words
count as sentences of English, others dont, and
more broadly, how this system relates to those
underlying other languages, and how this system
can arise.
4Syntax
- The generally accepted view of syntax breaks
sentences down into hierarchical parts. There are
nouns, there are verbs, there are units made of
verbs and nouns. New sentences can be created by
mixing and matching these components together. - S Pat AuxP will VP eat NP the sandwich
- S The students AuxP have VP risen PP in
protest
5Semantics
- Were not here to study syntax, were here to
study semantics, but were going to delve a bit
into both. - The syntactic system that defines what are good
sentences of English provides hierarchical
structures, but we know not only what sequences
of words might be classified as English but we
know what those sequences of words mean. - Just as there must be a grammar that defines what
sequences of words are English, there must also
be a grammar that tells us how the meanings of
the parts contribute to the meaning of the whole.
6F1
- To that end, we are going to create a
mini-grammar of English, a fragment. This
grammar will provide both the syntactic structure
of a small number of English sentences and the
rules by which we can understand their meaning.
By doing this, we can start to understand what is
involved in the grammar of semantics more
generally.
7F1
- Rewrite rules (the syntax)
S ? N VP N ? Pavarotti, Loren, Bond
S ? S conj S Vi ? is boring, is hungry, is cute
S ? neg S Vt ? likes
VP ? Vt N Conj ? and, or
VP ? Vi Neg ? it is not the case that
8Using the syntax of F1
- We start with S (we are building a sentence).
S
9Using the syntax of F1
- We start with S (we are building a sentence).
- Several different rules can apply. We can either
rewrite S as N VP, or as S conj S, or as neg S.
Lets pick N VP.
S
VP
N
10Using the syntax of F1
- We start with S (we are building a sentence).
- Several different rules can apply. We can either
rewrite S as N VP, or as S conj S, or as neg S.
Lets pick N VP. - Now, N can be rewritten as Pavarotti, Loren, or
Bond.
S
VP
N
Bond
11Using the syntax of F1
- We start with S (we are building a sentence).
- Several different rules can apply. We can either
rewrite S as N VP, or as S conj S, or as neg S.
Lets pick N VP. - Now, N can be rewritten as Pavarotti, Loren, or
Bond. - And VP can be rewritten either as Vt N or Vi.
S
VP
N
Bond
Vi
12Using the syntax of F1
- We start with S (we are building a sentence).
- Several different rules can apply. We can either
rewrite S as N VP, or as S conj S, or as neg S.
Lets pick N VP. - Now, N can be rewritten as Pavarotti, Loren, or
Bond. - And VP can be rewritten either as Vt N or Vi.
- And Vi can be rewritten as is boring, is hungry,
or is cute.
S
VP
N
Bond
Vi
is hungry
13Using the syntax of F1
- With this little grammar, we can already create
an unbounded number of sentences. - It is not the case that Bond is boring or Loren
is hungry.
14Using the syntax of F1
- It is not the case that Bond is boring or Loren
is hungry.
S
Neg
S
S
S
Conj
It is notthe case that
N
N
VP
VP
or
Bond
Vi
Loren
Vi
is boring
is hungry
15Using the syntax of F1
- It is not the case that Bond is boring or Loren
is hungry.
S
S
S
Conj
N
S
VP
or
Neg
N
VP
Loren
Vi
It is notthe case that
Bond
Vi
is hungry
is boring
16Compositionality
- A fundamental assumption about how it is that we
can know what novel sentences mean is that
meaning is compositional. - The meaning of the whole is derived from the
meaning of the parts and how the parts are
arranged. - The syntax gives us the parts and how they are
arranged, now we must approach the question of
how the meaning is assigned to the parts and from
there to the whole.
17Enter M
- Here, we turn to M, the evaluation function.
- We already talked about the first steps
- MltU,Fgt
- PavarottiM F(Pavarotti) Pavarotti
- LorenM F(Loren) Loren
- BondM F(Bond) Bond
- is boringM F(is boring) Loren, Pavarotti
- is hungryM F(is hungry) Bond, Pavarotti
- is cuteM F(is cute) Loren, Bond
18 M
S
- We can write the denotation of the terminal nodes
using those rules.
VP
N
Bond
Vi
BondM F(Bond) Bond
is hungry
is hungryM F(is hungry) Bond, Pavarotti
19 M
S
- We can write the denotation of the terminal nodes
using those rules. - And, on the principle of compositionality, we can
assume the that nodes above share the same
denotation (where there is no combination
involved)
VP
N
Bond
Vi
BondM F(Bond) Bond
is hungry
is hungryM F(is hungry) Bond, Pavarotti
20 M
S
- Now, to determine the meaning of the S as a
whole, we want to combine the denotation of N and
VP such that the S is true just in case (here),
Bond is hungry. - That is, true just in case NM is in the set
VPM.
VP
N
Bond
Vi
BondM F(Bond) Bond
is hungry
is hungryM F(is hungry) Bond, Pavarotti
21 M
S
- We can define a semantic rule for interpretation
that says just that - S N VPM true iffNM ? VPM,otherwise
false.
VP
N
Bond
Vi
BondM F(Bond) Bond
is hungry
is hungryM F(is hungry) Bond, Pavarotti
22 M
S
- Thus, we end up with an interpretation of this
sentence that goes like this - SM true iffF(Bond) ? F(is hungry), otherwise
false. - Given this particular model, that boils down to
- SM true iff Bond ? Bond, Pavarotti,
otherwise false. - (True in this situation)
VP
N
Bond
Vi
BondM F(Bond) Bond
is hungry
is hungryM F(is hungry) Bond, Pavarotti
23A semantic rule for every structural rule
- Our goal is to design a semantics for F1 that can
provide an interpretation (truth conditions) for
any structure that the syntax can provide. - So, we also need rules for structures like S conj
S, neg S, Vt N.
24Neg S
- As for Neg S, we want it to be false whenever S
is true, and true whenever S is false. - Neg SM false if SM true, true if SM
false. - However, this is not quite enoughwe want to have
an interpretation for every node in the tree.
This gives us an interpretation of S Neg S, but
what is the interpretation of Neg?
25Neg
- What Neg does is takes the truth value of the S
it is next to and reverses it. - It is a functionit takes the truth value of the
S it is next to as an argument, and returns a
truth value (the opposite one). - it is not the case thatM true ?
false false ? true
26Neg S
- S Neg It is not the case that S Pavarotti is
boring. - NegM It is not the case thatM true ?
false false ? true - SM true iff NM ? VPM, otherwise false
true iff PavarottiM ? ViM, otherwise false
true iff PavarottiM ? is boringM, otherwise
false F(Pavarotti) ? F(is boring), otherwise
false
27Neg S
- S Neg It is not the case that S Pavarotti is
boring. - And, so S Neg SM NegM ( SM ).
- Resulting in
- SM false if F(Pavarotti) ? F(is
boring),otherwise true.
28And
- For dealing with and and or, we also want to
define a function. We want S1 and S2 to be true
when S1 is true and S2 is true, and false under
any other circumstance. - S S1 Conj S2M ConjM ( lt S1M, S2M gt )
- andM lt true, true gt ? true lt true, false
gt ? false lt false, true gt ? false lt false,
false gt ? false
29Or
- For dealing with and and or, we also want to
define a function. We want S1 or S2 to be false
when S1 is false and S2 is false , and true under
any other circumstance. - S S1 Conj S2M ConjM ( lt S1M, S2M gt )
- orM lt true, true gt ? true lt true, false
gt ? true lt false, true gt ? true lt false,
false gt ? false
30Revisiting verbs
- Earlier, we defined a meaning for is boring by
explicitly listing the set of boring individuals.
This relies on a specific model/situation. We
want to be more general than that, so that our
interpretation rules work in any model. - is boringM x x is boring in M
- is boringM x ? U x ? F(is boring)
31Generalizing
- We also do not yet have a general statement of
how to evaluate S N VPM. - VP Vi is boringM x x is boring in M
- S N VPM true iff NM ? VPM, otherwise
false
32Transitive verbs
- The one piece of the model that we have not
addressed yet are transitive verbs, like likes. - S ? N VP
- VP ? Vt N
- Vt ? likes
- We want to be able to evaluate S N VPM the same
way whether VP is built from a transitive verb or
an intransitive verb. That is, we want VPM to
be a predicate, a set of individuals.
33Transitive verbs
- Essentially, we want likes BondM to be a set of
those individuals that like Bond in M. - However, we need a definition for likesM (we
already have one for BondM). It should be
something that creates a set of individuals that
depends on the individual next to it in the
structure. A function again.
34Transitive verbs
- Like and, likes relates two things, although
likes relates two individuals, and and relates
two sentences. - So, we build a two-place predicate, in the same
way - likesM ltx,ygt x likes y in M
- For example, if P likes L, L likes B and thats
all the liking in this situation, then likesM
ltP,Lgt, ltL,Bgt
35Transitive verbs
- And then, we define a rule that will interpret
the VP in a sentence with a transitive verb - VP Vt NM x lt x, NM gt ? VtM
- So if NM Bond, then VP Vt NM is the set
containing those individuals who like Bond in M.
36S ? N VP S N VPM true iff NM ? VPM, otherwise false
S ? S Conj S S S1 Conj S2M ConjM ( lt S1M, S2M gt )
S ? Neg S S Neg SM NegM ( SM ).
VP ? Vt N VP Vt NM x lt x, NM gt ? VtM
VP ? Vi
N ? Pavarotti, PavarottiM F(Pavarotti)
Vi ? is boring, is boringM x x is boring in M
Vt ? likes likesM ltx,ygt x likes y in M
Conj ? and, andM ltlttrue,truegt,truegt, lttrue,falsegt,falsegt,
Neg ? it is not the case that iintctM lttrue,falsegt, ltfalse,truegt
37What we have
- We have created a little fragment describing a
(very small) subset of English, generating
structural descriptions of syntactically valid
sentences and providing the means to determine
the truth conditions of these sentences. - We did this by formulating a set of syntactic
rewrite rules, each accompanied by a semantic
rule of interpretation, such that every syntactic
step can be interpreted compositionally.
38One step more general
- Looking over the rules that we have, we can
actually go a step further in generalizing our
semantic rules (helpful as we expand our
fragments coverage). - There are basically two kinds of rules we have
Those that combine meanings of adjacent (sister)
nodes in the syntactic structure, and those that
define intrinsic (non-compositional) meanings.
39Semantic type
- The entire semantics that we are creating here
depends on two types of things, individuals and
truth values. - We can label individuals as being of type e
(traditional, think entity), and truth values
as being of type t. - In these terms, names like Bond are of type ltegt,
and sentences like Bond is hungry are of type lttgt.
40Characteristic functions
- For predicates like is hungry, we have considered
these to be sets of individuals (e.g., those that
are hungry in the model). - We can look at those same individuals in a
slightly different way, using the characteristic
function of the set. - A characteristic function is a function that,
given an argument, will return true iff the
argument was a member of the set, and false
otherwise. The same information content as the
set.
41Predicates as functions
- So, without losing information, we can view
predicates from the perspective of their
characteristic functions and define is hungry to
instead be a function that, given an individual,
will return true if the individual is hungry in
the model. - is hungryM x ? true if x is hungry in M x
? false otherwise
42Semantic type
- Predicates like is hungry can then be said to
have semantic type lte,tgt. That is, a function
from individuals to truth values. - Similarly, it is not the case that can be taken
to be of type ltt,tgt, a function from truth values
to truth values.
43Transitive verbs
- For transitive verbs, what we want is a relation
between two individuals, resulting in a truth
value. The way we have it set up now, a verb like
likes will combine with the object to form a
simpler predicate like likes Bond, at which point
it acts just like is boring. - So, here, we want likes to take an argument of
type ltegt and return a predicate of type lte,tgt.
So, we define it as a function of type lte,lte,tgtgt.
44Transitive verbs
- That is, we can define likesM as something like
this - likesM x ? f where f is a function from
individuals to truth values and f(y) true iff y
likes x in M, otherwise false. - That is, likesM is a function from individuals
to functions (from individuals to truth values)
semantic type lte,lte,tgtgt.
45Why were doing this
- Once we have defined things in terms of semantic
type, and in terms of functions and arguments, we
can collapse a number of our semantic
interpretation rules into more general rules. - Functional applicationa bM aM (bM ) or
bM (aM), whichever is defined. - Pass upb aM aM
46?