I think this stuff is the most interesting thing you can possibly study.
COMPUTATIONAL REPRESENTATIONS OF MEANING Allan Ramsay Dept of Computation UMIST, PO Box 88, Manchester M60 1QD, UK
[email protected]
My feedback forms usually say that students also think it’s quite interesting.
http://www.co.umist.ac.uk/staff/allan
But they always say that I don’t make it applied enough. So I’m going to give you programs, which I expect you to play with. You can’t complain about lack of application unless you’ve played with the programs.
1
2
APPLICATIONS So it’s interesting. But does it matter?
• General issues
Natural language databases: ‘John and Mary got divorced’ ` ‘John and Mary used to be married’? Machine translation: find out what the English means, generate the corresponding French. NL interfaces. Especially spoken interfaces: ‘Where’s the nearest cheap hotel that does a good vegetarian meal?’
– Compositionality, syntax, ambiguity, robustness – Quantification and reference
• Lexical decomposition, meaning postulates, lexical relations
• Time, tense and aspect
I’m going to work towards
• NL database queries (first step in dialogue systems)
• Sentences and utterances
• open-ended question answering
Allan Ramsay,
-3-
APPLICATIONS
Allan Ramsay,
-4-
APPLICATIONS
General issues
What’s it all about?
Why are we interested in speech and language anyway?
• What’s it all about anyway?
Because people use them to communicate ideas.
• Where does semantics fit? So if you want a computer system to do anything with language, you must be expecting it do something with ideas.
• Sources of evidence Semantics = the way that language encodes ideas
Allan Ramsay,
-5-
General issues
Allan Ramsay,
-6-
What’s it all about?
How does language work?
The only reason we’re interested in speech (or text) is because spoken (written) utterances convey ideas.
Structural choices – lexical choices, syntactic organisation, phonology, . . .
The only reason for doing any of the structural analysis is because the structural choices have semantic consequences.
The ‘ideas’ that those choices denote
What somebody who accepted those ideas might reasonably believe Figure 1:
Allan Ramsay,
We may get the structural analysis wrong, or it may not have a unique solution. The goal of semantics is not to help you get the structural analysis right.
The pipeline view of language
-7-
How does language work?
Allan Ramsay,
-8-
How does language work?
Evidence
Where can you get the data from?
How can you tell whether a semantic theory is right?
• Consequences, contradictions
• In your head?
• Distinctions
• In conversation with your mates? With other linguists?
• Ambiguities
• In corpora?
Allan Ramsay,
-9-
Evidence
Allan Ramsay,
-10-
Evidence
Computational ⊂ formal?
Computational semantics: a treatment of semantics that a computer might do something with.
So a computational treatment of semantics must be about constructing and manipulating formal entities, which presumably somehow embody the ‘meaning’ of what has been said.
What can computers do things with? Formal (structured) entities. Is it easy to construct these things? So a computational treatment of semantics must be about constructing and manipulating formal entities, which presumably somehow embody the ‘meaning’ of what has been said.
Is it easy to manipulate them?
So computational ⊆ formal.
Computational 6= formal.
Allan Ramsay,
-11-
Computational ⊂ formal?
Allan Ramsay,
-12-
Computational ⊂ formal?
Complexity A formal language which is less expressive than natural language will be inadequate. You can’t use propositional logic, for instance, because natural language allows you to say ‘All students are lazy’ and ‘Some lecturers are clever.’ But as formal languages get more expressive, they get more intractable. Attribute:value pairs linear Database languages Propositional logic NP-complete Description logic Predicate logic Recursively enumerable Modal logic Default logic Recursive Property theory Set theory Incomplete Intensional logic
Allan Ramsay,
-13-
What shall we do about it?
• Panic: use some language whose complexity results are reassuring, at the cost of missing out some of the content of what’s been said. Still, NP-complete is usually taken to be pretty hopeless, so we can’t even use propositional logic.
• Don’t panic: after all, arithmetic is incomplete, but that doesn’t stop us using computers to calculate our tax returns. The logic may be intractable, but that doesn’t mean that people set each other intractable problems when using it.
Complexity
Allan Ramsay,
-14-
Complexity
CHECKPOINT
• Tasks for which we need a meaning representation
I would rather see what happens when I try to get it right, and then compromise when I find I haven’t got a suitable inference engine, than give up without even trying.
• The trade-off between expressivity and complexity
• Problems of evidence and justification
Allan Ramsay,
-15-
Complexity
Allan Ramsay,
-16-
Complexity
Compositionality
Compositional=modular
‘The meaning of the whole is a function of the meaning of the parts and their mode of combination’ [Dowty et al., 1981]
The theory will be elegant if it is compositional?
In other words, a particular set of words, configured in a particular way, always makes the same contribution, though what you do with that contribution in a given context is up to you.
The theory will be modular if it is compositional!
Allan Ramsay,
-17-
Compositionality
Allan Ramsay,
Compositional=modular
-18-
Compositionality & ambiguity
Compositionality & robustness
The only real problem with wanting a compositional theory of semantics is that you can’t have one.
If the theory is to be compositional then you need to know what the parts are and how they combine.
• What contribution does ‘bank’ make to ‘I keep my money tied up at the bank’ and ‘I keep my boat tied up at the bank.’
In other words, you need a syntactic analysis.
But lots of language, especially speech, doesn’t obey the rules of proper language like what it is supposed to look like.
• What contribution does ‘with a telescope’ make in the multiple readings of ‘I saw the man in the park with a telescope’ ?
• How come ‘John is looking for a unicorn’ is ambiguous? Is there a lexical ambiguity? Is there a structural ambiguity?
Allan Ramsay,
-19-
Compositionality & ambiguity
Solution (i): relax the rules that constrain specific configurations (agreement failures, case marking failures, missing arguments, . . . )
Solution (ii): write extra extra-grammatical rules which explain how to put the fragments you have found together.
Allan Ramsay,
-20-
Compositionality & robustness
Soft parsing
Solution (i): relax the rules that constrain specific configurations (agreement failures, case marking failures, missing arguments, . . . )
This is a standard trick. Instead of saying that the determiner and the noun must agree in number, gender and person you say that they should agree in number, gender and person. Instead of saying that the verb ‘eat’ must take an agent and an object you say that it should take an agent and an object.
Allan Ramsay,
-21-
Soft parsing
Then as you parse, keep track of the number of places where such constraints have been violated and choose the one with the fewest violations, or the one with the least significant violations (so an agreement failure + a case marking failure might be less significant that two agreement failures. Or more significant.)
This is about robust parsing, not about robust semantics.
Allan Ramsay,
Soft parsing
-22-
Shallow parsing
Semantic representations What should the end result of semantic analysis be?
Solution (ii): write extra extra-grammatical rules which explain how to put the fragments you have found together.
This is another standard trick. You don’t try to parse the whole thing properly. Instead you find fairly reliable bits (e.g. NPs) and you have some program that inspects the pieces that you have found and uses them to fill in some skeleton semantic representation. This program is a grammar for ungrammatical sentences – an extra-grammatical grammar.
This is about robust parsing, not about robust semantics. But we may need a funny grammar. Either way, this is a course about semantics, not robust parsing. I shall construct a (rather odd) grammar and assume that we can somehow apply to our input texts.
Allan Ramsay,
-23-
Shallow parsing
• A structure?
• A paraphrase? (what’s a paraphrase?)
Something that supports reasoning about entailments.
Allan Ramsay,
-24-
Semantic representations
CHECKPOINT
Toy example (1a)
Here’s where I get to inflict my preferred grammatical framework on you (not that this is a syntax course, but compositionality says that we have to start with the structure):
• Compositionality: what it means, why it matters
Define a ‘signature’ – specification of what features you are going to use:
• Logical forms: relationship to the original utterance, role in reasoning about entailment
% known features: you must extend this before you use a new feature features([cat=_, args=_, dir=_, start=_, end=_, text=_, meaning=_]).
Allan Ramsay,
-25-
Semantic representations
Allan Ramsay,
-26-
Toy example (1a)
Define a set of ‘types’ – commonly occurring groups of feature:value pairs: np(X) :cat@X = np, args@X = [].
And describe your lexicon:
verb(X) :cat@X = s.
% The lexicon
saturated(X) :args@X = [].
word(john, X) :np(X), meaning@X = john.
verb(X, transitive(NP2, NP1)) :verb(X), args@X = [NP1, NP2], np(NP1), dir@NP1 = right, np(NP2), dir@NP2 = left.
Allan Ramsay,
word(mary, X) :np(X), meaning@X = mary. word(loves, X) :verb(X, transitive(A1, A2)), meaning@X = loves(meaning@A1, meaning@A2).
-27-
Toy example (1a)
Allan Ramsay,
-28-
Toy example (1a)
There were no rules in this grammar: won’t remain true for long, but the basic rules are Easy for simple examples. Doesn’t scale up well, incomplete constituents are hard to handle. Used by [Pollard and Sag, 1988, 1994, Fenstad et al., 1987].
X0 ==> X1, Y :cat@X0 -- cat@X1, args@X0 -- ARGS, args@X1 -- [Y | ARGS], dir@Y -- right.
All programs are in http://www.co.umist.ac.uk/~allan/CT322/PROGRAMS: do
X0 ==> Y, X1:cat@X0 -- cat@X1, args@X0 -- ARGS, args@X1 -- [Y | ARGS], dir@Y -- left.
| ?- [useful, features, toy1a, chart]. | ?- chart([john, loves, mary], P), meaning@P = X. ... X = loves(john,mary)
(pure categorial grammar: semanticists love it, but it doesn’t actually work as a grammar)
Allan Ramsay,
-29-
Toy example (1a)
Allan Ramsay,
-30-
Toy example (1a)
Toy example (1b)
The same, but with events [Davidson, 1967, 1980] and thematic roles. All I’ve done for toy1b.pl is to change the definition of ‘love’. As before, but explicitly mentions events. We will return to events and thematic roles at some length below. The big question is: what led me to decide that the first argument should be referred to as the agent and the second as the object, and what follows from these decisions?
word(loves, X) :verb(X, transitive(A1, A2)), meaning@X = exists(L, love(L) & agent(L, meaning@A1) & object(L, meaning@A2)). | ?- chart([john, loves, mary], A). A = exists(X,love(X)&agent(X,john)&object(X,mary)) ?
Allan Ramsay,
-31-
Toy example (1b)
Allan Ramsay,
-32-
Toy example (1b)
CHECKPOINT
λ-calculus This way of building up meanings by unification is easy but very limiting: using the ‘λ-calculus’ is much more flexible.
• Add pronouns to toy1b.pl
I must have some idea what I think the representation of a given sentence should be. Who knows where I got it, or whether it’s right, but I must at least know what I think or I can’t do anything.
(1) He loves her.
So for instance I might think that the correct representation of
• Add intransitive, ditransitive and sentential complement verbs.
(5) John loves Mary is love(john, mary).
(2) John sleeps. (intransitive) (3) John gives Mary it. (ditransitive) (4) John knows Mary loves him. (sentential complement)
In which case I probably think that the correct representation of (6) Peter loves Mary is love(peter, mary)
Allan Ramsay,
Toy example (1b)
-33-
OK, so what do these representations have in common and how do they differ?
They have in common a bit that looks like love(X, mary), and they differ in that one mentions john and the other mentions peter.
What do the sentences have in common and how do they differ?
(5) has ‘John’ as its subject and ‘loves Mary’ as its VP, and (6) has ‘Peter’ as its subject and the same VP.
Allan Ramsay,
-35-
λ-calculus
Allan Ramsay,
-34-
λ-calculus
So I’m quite tempted by a (standard rewrite) rule like the following: s(S) ==> [np(NP), vp(VP)] :S is obtained by using NP to fill in the blank in VP
What about the VP itself? If ‘loves Mary’ means love(X,mary) then presumably ‘loves Susan’ means love(X,susan). Again what they have in common is the bit about loving and where they differ is in who is being loved, so we could assume that ‘loves’ means love(X, Y) and that ‘Mary’ and ‘Susan’ just mean mary and susan.
Allan Ramsay,
-36-
λ-calculus
Write it as lambda(Y, lambda(X, love(X, Y))) to fix the order in which they get filled in. Then we have the crucial rule:
So this time I want vp(VP) ==> [verb(V), np(NP)] :VP is obtained by using NP to fill in the blank in V
(written in mathematical notation as λX(P ).T , and sometimes written in Prolog as X~P:T).
But V is love(X, Y), which has two blanks in it. Which one do I want to fill in first?
TB – the ‘Tarski biconditional’ will get us into trouble later, but for now we just accept it. Dead easy to implement. Dead hard to do by hand: which you have to do when you’re developing a system.
Allan Ramsay,
lambda(X, P):T = PT/X
λ-calculus
-37-
Allan Ramsay,
(TB)
-38-
λ-calculus
Montague-style NPs
The next few developments are all in the file PROGRAMS/ct322.
word(john, X) :np(X), meaning@X = lambda(U, U:john). word(mary, X) :np(X), meaning@X = lambda(V, V:mary). word(loves, X) :verb(X, transitive(A1, A2)), meaning@X = exists(L, love(L) & meaning@A1:lambda(P, agent(L, P)) & meaning@A2:lambda(Q, object(L, Q))).
Allan Ramsay,
-39-
Montague-style NPs
| ?- ?- chart([john, loves, mary], P), meaning@P=X. ... meaning=exists(_9443, love(_9443) &lambda(_24629,_24629:john) :lambda(_9429,agent(_9443,_9429)) &lambda(_2395,_2395:mary) :lambda(_9420,object(_9443,_9420)))
Allan Ramsay,
-40-
Montague-style NPs
Horrible: but exists(X, love(X) &lambda(Z,agent(X,Z)):john) &lambda(U,U:mary):lambda(V,object(X,V)))
exists(X, love(X) &lambda(Y,Y:john):lambda(Z,agent(X,Z)) &lambda(U,U:mary):lambda(V,object(X,V)))
exists(X, love(X) &agent(X,john) &lambda(U,U:mary):lambda(V,object(X,V)))
exists(X, love(X) &lambda(Y,Y:john):lambda(Z,agent(X,Z)) &lambda(U,U:mary):lambda(V,object(X,V)))
exists(X, love(X) &agent(X,john) &lambda(U,U:mary):lambda(V,object(X,V)))
exists(X, love(X) &lambda(Z,agent(X,Z)):john) &lambda(U,U:mary):lambda(V,object(X,V)))
Allan Ramsay,
-41-
Montague-style NPs
exists(X, love(X) &agent(X,john) &lambda(V,object(X,V)):mary)
-42-
Montague-style NPs
The λ-calculus allows us to pick out the common parts of a range of propositions: what do ‘John loves Mary’, ‘Peter loved Mary’, ‘Arthur lovesd Mary’ have in common? They say that someone loves Mary, or that someone satisfies the property of loving Mary.
exists(X, love(X) &agent(X,john) &lambda(V,object(X,V)):mary)
So λX (X loves Mary) is a property. Some things satisfy it, some don’t. λX (Mary loves X ) is the property of being loved by Mary.
exists(X, love(X) &agent(X,john) &object(X,mary)) Harder to work with, but more flexible and each constituent has a welldefined interpretation. Introduced by Montague (see [Dowty et al., 1981]), used, with variations, by lots of people (e.g. [van Eijck and Alshawi, 1992, van Genabith and Crouch, 1997, Gazdar et al., 1985, Groenendijk and Stokhof, 1984, Kamp and Reyle, 1993, Keller, 1987, Krifka, 1993]) Allan Ramsay,
Allan Ramsay,
-43-
Montague-style NPs
And so on and so on. λ-abstraction lets us define abstractions, properties, partial-states-of-affairs, situation types, . . .
Allan Ramsay,
-44-
Montague-style NPs
Quantification and reference
There’s a very tight relation between a property and the set of things that satisfy it, and people sometimes get sloppy and say they’re the same thing. OK so long as you remember that you’re being sloppy.
Utterances introduce things into the context; they make claims about all or most of the things that you know about; and they refer to things. (7) A man died. (8) All professors are clever. (9) The old man lives in London.
Or is it? lambda(X, rational(X) & biped(X)) = lambda(Y, human(Y))? lambda(X, unicorn(X)) = lambda(Y, gryphon(Y))? lambda(X, prime(X) & even(X)) = lambda(Y, Y=2)? If you can’t cope with this, you’re not going to get anywhere: what things do we know of, what things are we talking about?
Allan Ramsay,
-45-
Montague-style NPs
Ordinary logic is OK for dealing with (7), (8).
exists(X, man(X) & exists(Y, event(Y, die) & exp(Y, X)))
Quantification and reference
word(woman, X) :noun(X), meaning@X = lambda(Y, woman(Y)).
or (restricted quantifier version) exists(X :: {man(X)}, exists(Y :: {event(Y, die)}, exp(Y, X)))
word(a, X) :det(X, lambda(P, lambda(Q, exists(R :: {P:R}, Q:R)))).
or
∃X(man(X) ∧ ∃Y (event(Y, die) ∧ exp(Y, X)))
word(every, X) :det(X, lambda(P, lambda(Q, forall(R :: {P:R}, Q:R)))).
(8) All professors are clever.
word(the, X) :det(X, lambda(P, lambda(Q, Q:ref(P)))).
forall(X :: {professor(X)}, clever(X))
-47-
-46-
det(X, Q) :cat@X = np, args@X = [N], noun(N), meaning@X = Q:meaning@N.
(7) A man died.
Allan Ramsay,
Allan Ramsay,
Quantification and reference
Allan Ramsay,
-48-
Quantification and reference
chart([every, man, loves, mary], P), meaning@P = Q, reduce(Q, R), pretty(Q), nl, pretty(R). exists(_4011, love(_4011) | ?- chart([a, man], P), meaning@P = Q, reduce(Q, R), pretty(Q), pretty(R). &lambda(_3994, lambda(_3991, lambda(_3540, forall(::(_3985, {_3994:_3985}), _3991:_3985))) lambda(_3537, exists(::(_3531, {_3540:_3531}), _3537:_3531))) :lambda(_3974, man(_3974)) :lambda(_3520, man(_3520)) :lambda(_3969, agent(_4011, _3969)) &lambda(_3960, _3960:mary) lambda(_3537, exists(::(_3531, :lambda(_3954, object(_4011, _3954))) {man(_3531)}), _3537:_3531)) exists(_4011, love(_4011) &forall(::(_3985, {man(_3985)}), agent(_4011, _3985)) &object(_4011, mary))
Allan Ramsay,
-49-
Quantification and reference
The full derivation is as follows (use reduce1 rather than reduce to get it to print out each step):
Quantification and reference
exists(A, love(A) &forall(C::{man(C)}, lambda(E,agent(A,E)):C) &lambda(F, F:mary) :lambda(G, object(A, G)))
exists(A, love(A) &forall(C::{man(C)}, agent(A, C)) &lambda(G,object(A,G)):mary)
exists(A, love(A) &lambda(B, forall(C::{man(C)}, B:C)) :lambda(E, agent(A, E)) &lambda(F, F:mary) :lambda(G, object(A, G))) -51-
-50-
exists(A, love(A) &forall(C::{man(C)}, agent(A, C)) &lambda(F, F:mary) :lambda(G, object(A, G)))
exists(A, love(A) &lambda(B, forall(C::{lambda(D,man(D)):C}, B:C)) :lambda(E, agent(A, E)) &lambda(F, F:mary) :lambda(G, object(A, G)))
Allan Ramsay,
Allan Ramsay,
exists(A, love(A) &forall(C::{man(C)}, agent(A, C)) &object(A, mary)) Quantification and reference
Allan Ramsay,
-52-
Quantification and reference
CHECKPOINT
• Compositionality: what is it, why do I want it, why can’t I have it, why the λ-calculus may help
• λ-calculus: – as a notion: abstracting the common elements of a set of propositions, defining a set – as a mechanism: β -reduction (why β : no idea)
Questions & Answers
Question-answering covers a range of activities: if you could ask the machine questions in English and get answers back in English, you’d have something very useful.
(especially if you could hook it up to a speech recogniser and synthesiser)
• Rule-less (categorial) grammar So what do we need to do in order to manage this?
• Montague’s treatment of determiners. This is fairy hard (!), but crucial
Allan Ramsay,
-53-
Quantification and reference
Allan Ramsay,
-54-
Questions & Answers
Syntax: English questions are marked in three ways – • Auxiliary-inversion: First stab at it:
• Give an account of the syntax of questions. Obvious that we need to do it: quite hard to actually do.
(10) a. He is looking for his keys. b. Is he looking for his keys? (11) a. He has been looking for them for ages. b. Has he been looking for them for long? (12) a. John loves Mary. b. Does John love Mary? (note that the original didn’t include the auxiliary)
• Sentence initial WH-word (13) Who loves Mary? (14) Who wants what for breakfast? (15) Which fool did that? (16) What did he give you? (combination of Aux-inversion and leftshifting of the WH-word: leave till later)
• Use this to build an account of the semantics of questions.
• Use the interpreted question to retrieve an answer.
• Rising intonation/punctuation (17) John loves Mary? (18) You did what? (note that the WH-word is NOT left-shifted)
Allan Ramsay,
-55-
Questions & Answers
Allan Ramsay,
-56-
Questions & Answers
WH-marking Aux-inversion: vp(X) :verb(X), args@X = [SUBJ0], SUBJ0\dir = SUBJ1\dir, subject@X = SUBJ1.
Some words (‘who’, ‘what’, ‘which’, ‘where’, ‘when’, ‘whether’, ‘whoever’, ‘how’) are special.
% They’re the same apart from their direction
Sentences containing them are special: questions, relative clauses, ‘headless relatives’. (19) Who stole my bike?
aux(X) :verb(X), args@X = [NP, VP], np(NP), % Is the NP to the right or the left? vp(VP), dir@VP = right, subject@X = NP, NP\start\end\dir = subject@VP\start\end\dir, meaning@X = meaning@VP.
(20) The person who stole my bike is going to regret it. (21) It was John who stole my bike. They have to appear at the start of the sentence, no matter where you expected to find them. (22) What did he steal? (= Did he steal what?) (23) Who did she want him to meet? (24) Who did she go there with? (25) Who wants what for breakfast? (not ‘who what wants for breakfast’)
Allan Ramsay,
-57-
Questions & Answers
Allan Ramsay,
-58-
Questions & Answers
• Phrases sometimes turn up in non-canonical positions: Sometimes this is obligatory, e.g. WH-phrases
• WH-words are marked. so are items that contain WH-words. We deal with this by ‘threading’ WH-marking through items, so that a word like ‘who’ adds a marker to the list that we already have.
Sometimes you do it for discourse reasons or to reduce ambiguity: (27) a. The pudding I really enjoyed. b. I believe with all my heart that she loves me.
word(who, X) :X np, whOut@X -- [wh | whIn@X],
Allan Ramsay,
(26) a. What did he eat? b. At what time did that happen?
Traditionally done by hallucinating an invisible (trace, slashed) item in the canonical position and then cancelling it when the real one turns up. I don’t like this: better to find the real one and note that it appeared out of position [Ramsay, 1999a].
-59-
Questions & Answers
Allan Ramsay,
-60-
Questions & Answers
Semantics:
• let the auxiliary do nothing for now (its real use is to carry temporal information, but we’re not dealing with that yet).
| ?- chart([who, loves, mary], P), reduce(meaning@P, R), pretty(R). ... R = exists( H,love( H)&agent( H, E)&object( H,mary)) ?
• let the WH-pronoun introduce a free-variable (basically a ‘hole’: I will want it to be a λ-abstraction, but I’m not quite ready for this).
I’d much rather have R = lambda( E, exists( H,love( H)&agent( H, E)&object( H,mary))) ?
word(who, X) :X np, whOut@X -- [wh | whIn@X], content@X -- lambda(P, P:_DUMMY).
Allan Ramsay,
-61-
but I can’t do that yet, so this will have to do.
Questions & Answers
Now that I can get the basic ‘propositional content’, I want to note in my semantics that this is a question.
Let the punctuation do that for me (handy because I don’t want to treat embedded clauses in exactly the same way) (28) a. Mary loves me. b. I doubt that Mary loves me.
Allan Ramsay,
-63-
Questions & Answers
Allan Ramsay,
-62-
Questions & Answers
% subject is left of main verb & is not WH-marked word(’.’, X) :cat@X -- utterance, args@X -- [S], s(S), dir@subject@S -- left, whIn@S -- [], whOut@S -- [], content@X -- lambda(P, claim(P)). % subject is either right of verb or WH-marked: can’t check it until % we actually know see it, so delay the constraint until we’re ready word(’?’, X) :cat@X -- utterance, args@X -- [S], s(S), whIn@S -- [], when(nonvar(whOut@S), (whOut@S=[] -> dir@subject@S = right; true)), content@X -- lambda(P, query(P)). Allan Ramsay,
-64-
Questions & Answers
% without the full stop: describes a situation
% simple yes/no (polar) question: is it true?
| ?- chart([john, loves, mary], P), showMeaning(P).
| ?- chart([does, john, love, mary, ?], P), showMeaning(P).
exists(A, love(A)&agent(A,john)&object(A,mary))
query(exists(A, love(A)&agent(A,john)&object(A,mary)))
% with the full stop: claims that this is true
% WH-question: free variable in object position -- showing % that it is true for B and reporting the value you found % constitutes an answer
| ?- chart([john, loves, mary, ’.’], P), showMeaning(P).
| ?- chart([who, does, john, love, ?], P), showMeaning(P).
claim(exists(A, love(A)&agent(A,john)&object(A,mary)))
query(exists(A, love(A)&agent(A,john)&object(A,B)))
Allan Ramsay,
-65-
Questions & Answers
Actions: what should I do if I realise that someone is claiming something, or asking a yesno question, or . . .
Allan Ramsay,
-66-
Questions & Answers
So if your utterance is a claim, I will remember it. If it’s a yesno question I will try to see whether it is provably true, or provably false. If it’s a WH-question I’ll try to find something that satisfies it.
First glance: I should believe their claim, I should try to answer their question
(second glance: I might think they’re lying, or mistaken: but these must depend on the normal interpretation being that I believe them. You couldn’t lie if there wasn’t some expectation that people normally tell the truth).
Allan Ramsay,
-67-
Questions & Answers
Return to this later, but we’ll need to do some inference to make it work, and I’m not ready for that yet.
Allan Ramsay,
-68-
Questions & Answers
CHECKPOINT
• Basic syntactic properties of questions (not the details of the lexical entries for auxiliaries and WH-pronouns)
• Semantics of an utterance is a wrapper round the propositional content of the sentence.
• Simple-minded response to an utterance requires you to take it at facevalue.
Modifiers
All we’ve had so far is simple sentences: we need adjectives, prepositional phrases, relative clauses. (29) The beautiful young princess with black hair saw the witch who had cursed her.
As ever, we have to do the syntax and then the semantics. For the syntax we have to extend our skeletal categorial rules: X1 = M(target=X0, result=X1), X0(dir=right)
• See [Pereira and Warren, 1980] for a fairly similar approach. It all gets more complicated
Allan Ramsay,
-69-
Questions & Answers
X1 = X0(dir=left), M(target=X0, result=X1)
Allan Ramsay,
-70-
Modifiers
But now that we have two ‘modes of combination’, we need to be a bit cleverer about how we do the semantics. The head word in the phrase contains ‘glue’ for sticking them together [Dalrymple et al., 1996]. An adjective is something which modifies a noun on its right to produce another noun. What do we actually want an adjective to do?
adj(X) :cat@X -- adj, X saturated, target@X noun, dir@target@X -- right, [args, head]@target@X -- [args, head]@result@X.
We’re a bit hemmed in: we’ve already decided that a noun depicts a property – that ‘man’ means lambda(X, man(X)), and that the commonest thing we do with nouns is make NPs with them.
But we know that an adjective+noun combination will appear in the same places as a noun, so it’s going to have to fit into the same kinds of places.
Allan Ramsay,
-71-
Modifiers
Allan Ramsay,
-72-
Modifiers
Work back from what we think we’d like: (30) John loves a beautiful princess.
exists(A, love(A) &exists(B :: {beautiful(B)&princess(B)}), object(A, B)) &agent(3, john))
adj(X) :cat@X -- adj, X saturated, target@X noun, dir@target@X -- right, [args, head]@target@X -- [args, head]@result@X, % what shall we use for adjGlue? glue@target@X -- adjGlue.
What does ‘beautiful’ contribute to this? lambda(P, beautiful(P)). What does the glue do? Combines lambda(P, beautiful(P)) and lambda(Q, princess(Q)) to produce lambda(R, beautiful(R) & princess(R)). What will do that for us?
Allan Ramsay,
-73-
Modifiers
Allan Ramsay,
-74-
Modifiers
Leave the glue as a ‘code’ in the semantics, and write a decoder
• Easiest way to do development (as you’re about to see ???) THIS ISN’T GOING TO WORK, BUT WE’LL HANG ON TO IT FOR NOW
• Saves space: codes are smaller than λ-expressions
• Lets you change your mind, provide different analyses for different reasons: ‘parameterised’ semantics [Konrad et al., 1996]
Allan Ramsay,
-75-
Modifiers
Allan Ramsay,
-76-
Modifiers
Prepositional modifiers
Do the syntax first: ‘a preposition looks for an NP to its right, and then combines with a noun to its left to make a noun’. Leave dummy glue to look after the semantics, and deasl with it later.
prep(X) :cat@X -- prep, % an NP to its right args@X -- [NP], NP np, dir@NP -- right, % don’t know what do to with the NP argument glue@NP -- ppArg, % a noun to its left dir@target@X -- left, target@X noun, [args, head]@target@X -- [args, head]@result@X, % don’t know what to do with the modified noun glue@target@X -- ppMod.
Allan Ramsay,
Allan Ramsay,
So adjectives combine with nouns to make things that have the same general kind of meanings as nouns.
But PPs also combine with nouns to make things that have the same general kind of meanings as nouns.
-77-
Prepositional modifiers
-78-
Prepositional modifiers
| ?- chart([a, man, with, a, beard, fancies, mary], P), showMeaning(P). So what does it mean? I know what I’d like, but it’s quite hard to get it to come out right. (31) A man with a beard fancies Mary.
exists(A, love(A) &exists(B ::{ppMod :ppArg:lambda(C,lambda(D,with(C,D))) :lambda(E, exists(F::{beard(F)}, E:F)) :lambda(G, man(G)) :B}, agent(A, B)) &object(A, mary))
| ?- chart([a, man, with, a, beard, fancies, mary], P), showMeaning(P). exists(A, love(A) & exists(B ::{man(B) & exists(F :: {beard(B, F)}, with(C,D))} agent(A, B)) & object(A, mary))
Allan Ramsay,
-79-
Prepositional modifiers
Allan Ramsay,
-80-
Prepositional modifiers
CHECKPOINT
Lexical semantics (I)
• Extension to the ‘principles of combination’
• Constraints on what adjectives and PPs must mean: because they produce things appear in the same kinds of contexts as nouns, their semantics must produce things that mean the same kinds of things as noun.
The formal paraphrases above preserve the logical organisation of the input sentence.
But we also need to know what the terms that appear in them mean.
• ‘Glue’ as a device for combining individual meanings. Compositionality said that the meaning of the whole was a function of the meanings of the parts and their mode of combination. Glue = the mode of combination. ¡¡¡¡ HELP !!!!
• Build the semantic interpretation with names of types of glue, and then decode them.
Allan Ramsay,
-81-
Prepositional modifiers
Is there some basic set of concepts that you can reduce everything else to? [Schank, 1972, Jackendoff, 1983].
Allan Ramsay,
-82-
Lexical semantics (I)
Garbage collect a dictionary: 1. Collect all the words that appear in the right hand side of some definition 2. Go through the dictionary and delete anything that wasn’t in this collection
Would it do you any good if there were?
3. If anything got deleted, go to (1)
Can you define words in terms of sets of attributes? [Katz and Fodor, 1963] More than half the dictionary will remain. Which suggests to me that there is no core set (only suggests: it might be possible but awkward to do all the definitions in terms of some core set). Can you define words in terms of each other?
Allan Ramsay,
-83-
Lexical semantics (I)
Allan Ramsay,
-84-
Lexical semantics (I)
Events & thematic roles
In the examples given earlier, some of the terms came directly from words in the text, so we can be fairly sure that nothing has been introduced or lost by using them. A fairly feeble, but probably tenable, position: you can specify relationships between words so long as you use a default logic [Cruse, 1986]. But some of them didn’t: in particular, roles like agent, object, recipient are not manifest in the text itself.
Presumably they mean something: otherwise why introduce them?
Let’s see some cases.
But if they do mean something, we’d better get them right.
Allan Ramsay,
-85-
Lexical semantics (I)
Allan Ramsay,
-86-
Events & thematic roles
Thematic roles: weak version Why should we care? ‘Transformations’ (32) He ate it/it was eaten. (33) I gave my mother a book/I gave a book to my mother.
The transitive verb ‘eat’ involves two entities, an eater and an eatee; the transitive verb ‘kill’ involves two entities, a killer and a killee; the intransitive verb ‘sleep’ involves one entity, a sleeper; . . .
Zeugma [Fillmore, 1968]
Advantages
(34) John is cooking
• Can’t be wrong.
(35) Mary is cooking.
• Supports the active/passive contrast, gives you a handle on zeugma.
(36) Dinner is cooking.
Disadvantages
(37) John and Mary are cooking.
• Doesn’t tell you anything.
(38) John and dinner are cooking.
See [Pollard and Sag, 1988].
They seem to carry independent information (39) The mome raths outgrabe. Allan Ramsay,
-87-
Events & thematic roles
Allan Ramsay,
-88-
Thematic roles: weak version
Lexical items look like word(fancies, X) :weakThematicRoles, % Flag to see which version we want to use verb(X, transitive(A1, A2)), glue@A1 -- theta(fancier), glue@A2 -- theta(fanciee), content@X -- lambda(E, fancy(E)).
?- chart([john, loves, mary, ’.’], P), showMeaning(P). claim(exists(A, like(A)&theta(A,likee,mary) &theta(A, liker, john)))
word(love, X) :weakThematicRoles, verb(X, transitive(_A1, _A2)), glue@A1 -- theta(lover), glue@A2 -- theta(lovee), content@X -- lambda(E, love(E)).
| ?- chart([john, loves, mary, ’.’], P), showMeaning(P). claim(exists(A, love(A)&theta(A,lovee,mary) &theta(A, lover, john)))
word(loves, X) :weakThematicRoles, verb(X, transitive(A1, A2)), glue@A1 -- theta(lover), glue@A2 -- theta(lovee), content@X -- lambda(E, love(E)).
Allan Ramsay,
love is a special case of like: fair enough. But then I also have to say that lover is a special case of liker, . . .
-89-
Thematic roles: weak version
Allan Ramsay,
-90-
Thematic roles: weak version
Thematic roles: strong version (42) She killed him. There’s a finite set of thematic roles. Each of these has a surface marker, though in some cases this marker is omitted.
(no obvious marker of either role) (43) He was killed by her. (the person who did it is marked by ‘by’)
In English, for instance, there is a set of prepositions which appear to mark manifestations of thematic roles in specified surface forms:
(44) The Romans destroyed the city.
(40) I gave my mother a book.
(46) The city’s destruction by the Romans . . .
(41) I gave a book to my mother.
(47) The Romans’ destruction of the city . . .
(45) The city was destroyed by Romans.
(the thing it was done to is marked by ‘of’) ‘my mother’ is fulfilling the role denoted by ‘to’ in each of these sentences – she is the to of (40) and (41). You can call this role the recipient if you want: it doesn’t actually buy you anything, but it doesn’t cost much either.
(48) I saw him fall. (49) I watched him fall. (50) I heard a bird singing. (51) I listened to a bird singing.
Allan Ramsay,
-91-
Thematic roles: strong version
Allan Ramsay,
-92-
Thematic roles: strong version
Once you’ve settled on your set of roles, how would you attach any significance to them?
Advantages
• You can attach quite a lot of semantic information to the role per se, rather than repeating it for every verb with a to. • Relates syntax and semantics nicely.
By saying what they entail. What else could there be? forall(E, forall(X :: {agent(E, X)}, animate(X) & intended(X, E)))
Disadvantages
• Doesn’t work. See [Dowty, 1989] (but not necessarily other work by Dowty: see [Dowty, 1991] for a detailed, and inconclusive, investigation).
Allan Ramsay,
-93-
Thematic roles: strong version
forall(E, forall(X :: {instrument(E, X)}, forall(Y :: {agent(E, Y)}, used(Y, X, E)))) ...
Allan Ramsay,
-94-
Thematic roles: strong version
CHECKPOINT
How do you know what roles a particular verb takes? What do you do if the involvement of a given player depends on what it is?
forall(E, forall(X :: {agent(E, X) & animate(X)}, intended(X, E)))
• They’re not clearly marked in the surface form, so there’s a lot of room for debate about how many there are and which verbs take which ones. There is some connection between prepositions (in English: casemarking in other languages) and thematic roles, but it’s not transparent.
forall(E, forall(X :: {agent(E, X)}, caused(X, E)))
• Once you’ve chosen them you have to axiomatise them. Which is pointless unless you’re then going to reason with your axioms. HOLD THAT THOUGHT.
And what do animate, caused, intended, ... mean?
Allan Ramsay,
-95-
• Thematic roles say something about the way that something or someone is involved in an event
Thematic roles: strong version
Allan Ramsay,
-96-
Thematic roles: strong version
Meaning postulates
I’ve started writing down relationships between terms. definitions:
These are not
I may need some very fancy logic for expressing the meaning of a word like ‘want’ . That doesn’t mean that everything I want needs a very fancy logic.
• they are not necessary and sufficient conditions for using the term: some are necessary, some are sufficient, some are neither (most are neither!). • what we have here is more like an encyclopædia than a dictionary. These things are explanations, not definitions.
Allan Ramsay,
-97-
Meaning postulates
We often need to assign entities to ‘natural kinds’: you can deal with natural kinds (and other predefined hierachies and type lattices) very efficiently, and we should take advantage of this when we can.
Allan Ramsay,
-98-
Meaning postulates
We now have two levels of analysis:
• the formal paraphrase, obtained (so far) compositionally (and hence almost for free) when we have parsed the sentence. • the meaning postulates, which describe the relationships between concepts. These will be exploited when we want to know what something entails. How much this costs will depend on how much you want to know.
Allan Ramsay,
-99-
Meaning postulates
This has some nice consequences in terms of modularity: the construction of a formal paraphrase is separated from reasoning about its consequences. So you can use different sets of meaning postulates, or different inference engines, with the same ‘linguistic meaning’.
Allan Ramsay,
-100-
Meaning postulates
Adjectives revisited | ?- chart([the, old, man, bought, a, nice, book, ’.’], P), showMeaning(P). claim(exists(A, buy(A) &exists(B::{book(B)&nice(B)},theta(A, object, B)) &theta(A, agent, ref(lambda(C, man(C)&old(C)))))) | ?- chart([the, nice, man, bought, an, old, book, ’.’], P), showMeaning(P). claim(exists(A, buy(A) &exists(B::{book(B)&old(B)}, theta(A, object, B)) &theta(A, agent, ref(lambda(C, man(C)&nice(C))))))
Allan Ramsay,
-101-
Adjectives revisited
Allan Ramsay,
-102-
Adjectives revisited
Can we produce meaning postulates which are flexible enough to cope with this? What do ‘nice’ and ‘old’ contribute here? forall(X :: {old(X)}, man(X) -> age(X) > 70 & book(X) -> age(X) > 90 & house(X) -> age(X) > 60 & star(X) -> age(X) > 600000000 & ...).
• ‘old man’ – man in his seventies ‘old book’ – book printed in the 19th century
• ‘nice man’ – man who is kind to children, doesn’t tell lies, looks after his infirm elderly relatives ‘nice book’ – book with a happy ending, one which makes you feel happy when you read it
forall(X :: {nice(X)}, man(X) -> kind_to_children(X) & ... & book(X) -> happy_ending(X) & ... & ...) Hard work, but if you want to get any mileage out of saying that something is a nice book you will have to say what nice books are like.
Allan Ramsay,
-103-
Adjectives revisited
Allan Ramsay,
-104-
Adjectives revisited
But it somehow misses the point: I can coherently talk about an old star without actually knowing anything about how old a typical star is. It gets worse. I’d like something more like
(52) He was waving an imitation gun.
forall(X :: {old(X)}, most(Y :: {type(X)=type(Y)}, age(X) > age(Y)))
(53) They sold him a fake Picasso. (54) JFK’s alleged murderer was himself assassinated.
I’ve introduced a default here: that doesn’t scare me – that was always going to have to happen. More worrying is the introduction of X’s type. The problem is that the type is not an intrinsic property of X; it’s part of the way it was described. – That’s a very small dog.
I don’t think that what he was waving was a gun; I’m sure that what they sold him wasn’t a Picasso; the speaker doubts that the person in question assassinated JFK.
– But it’s quite a large chihuahua.
Allan Ramsay,
-105-
Adjectives revisited
Allan Ramsay,
-106-
Adjectives revisited
So we can’t have an analysis of (52) like
| ?- chart([he, was, waving, an, imitation, gun, ’.’], P), showMeaning(P | ?- chart([he, was, waving, an, imitation, gun, ’.’], P), showMeaning(P). claim(exists(A, wave(A) &exists(B::{gun(B)&imitation(B)}, theta(A, object, B)) &theta(A, agent, ref(lambda(C, male(C)&salient(C))))))
::{imitation(B,lambda(C,gun(C)))}, theta(A, object, B)) &theta(A, agent, ref(lambda(D, male(D)&salient(D))))))
It’s not something which is a gun and is an imitation: it’s something which is an imitation of a gun – something which lacks some essential property of guns.
Allan Ramsay,
-107-
claim(exists(A, wave(A) &exists(B
Adjectives revisited
The thing that he was waving was something which was a fake when considered as a gun.
Allan Ramsay,
-108-
Adjectives revisited
1. Non-factive adjectives: forall(X, forall(P :: {fake(X, P)}, not(P:X) & artefact(X) & intended(creator(X), like(X, P))))
Hard work. Involves a move to intensional logic, with all its potential for complexity.
2. Non-intersective adjectives: forall(X, forall(P :: {old(X, P)}, (P.X) & most(Y :: {P:Y}, age(X) > age(Y)))))
But worth it: if I said to you ‘That’s a fake Picasso’ I would be shocked if you spend £25000000 on it.
3. Intersective adjectives (fairly rare): forall(X, forall(P :: {stolen(X, P)}, (P.X) & exists(Y, stole(Y, X)))) Allan Ramsay,
-109-
Adjectives revisited
Allan Ramsay,
-110-
CHECKPOINT
Adjectives revisited
Prepositional phrases revisited
• Adjectives generally give you a relationship between an entity and a property.
(55) The man in the park slept.
• Some adjectives comment on whether the property holds of the item. Trying to axiomatise things like this requires you to use a rather expressive logic.
Before we do anything else, we note that they both contain the phrase ‘in the park’ .
(56) He slept in the park.
Either this is the same phrase in both sentences, in which case it means the same thing.
• Once you’ve thought about what adjectives mean intuitively, you have to axiomatise your intuitions. Which is pointless unless you’re then going to reason with your axioms.
Allan Ramsay,
-111-
Adjectives revisited
Or it isn’t. Which just isn’t true.
Allan Ramsay,
-112-
Prepositional phrases revisited
But now, of course, we want the other reading:
(55) The man in the park slept.
‘in the park’ combines with ‘man’ to produce something which will combine with ‘the’ in the same way that ‘man’ itself did (just as with adjectives). We’ve already done this: | ?- chart([i, saw, a, man, in, a, park, ’.’], P), showMeaning(P).
claim(exists(A, see(A) &exists(B::{man(B)}, theta(A, object, B)) &exists(C::{park(C)}, in(A, C)) &theta(A, agent, ref(lambda(D, speaker(D))))))
The key observation here is that we have again tied our own hands behind our backs: 1. we decided what we thought nouns meant ages ago
claim(exists(A, see(A) &exists(B :: {man(B) &exists(C::{park(C)}, in(B, C))}, theta(A, object, B)) &theta(A, agent, ref(lambda(D, speaker(D))))))
Allan Ramsay,
-113-
Prepositional phrases revisited
2. but then a PP had to combine with a noun to produce something of basically the same kind 3. but the same PP also had to combine with a VP to produce something of the same kind as an ordinary VP 4. so an ordinary VP must be basically the same kind of thing as a noun
Allan Ramsay,
-114-
Prepositional phrases revisited
Ambiguity & underspecification
• Structural ambiguity (57) He saw a man in a park. (58) strawberry jam jar, glass jam jar OK, I’ve got a clean interpretation of both readings of ‘He saw a man in the park’ , just by parsing it and doing β -reduction.
• Lexical ambiguity (59) I keep my money tied up at the bank. (60) I keep my boat tied up at the bank.
• Scope ambiguity (61) Someone is mugged every 10 minutes in New York, and he’s getting pretty sick of it.
But of course that’s not what I want.
(62) John’s looking for a unicorn. Don’t tell them there aren’t any – he’ll go on looking for hours/It was in the castle gardens this morning, but it seems to have escaped.
Allan Ramsay,
-115-
Ambiguity & underspecification
Allan Ramsay,
-116-
Ambiguity & underspecification
Types & selection restrictions
They all matter.
Nonetheless, it is my job,
The speaker is almost never in any doubt which reading he or she has in mind (apart perhaps from puns).
One thing you could do:
It is not the job of semantics to sort it out. Semantics should reveal its presence, and do so in a way that makes it possible to sort it out or ignore it.
Allan Ramsay,
-117-
Ambiguity & underspecification
1. Assign every NP a position in a natural kind hierarchy. 2. Constrain the values particular arguments of verbs and PPs so that they only accept items of the specified kinds.
Allan Ramsay,
word(fired, X) :verb(X, transitive(A1, A2)), kind@A2 -- animate, % you can sack animate objects content@X -- lambda(E, sack(E)).
Advantages:
word(fired, X) :verb(X, transitive(A1, A2)), kind@A2 -- inanimate, % You can detonate inanimate objects content@X -- lambda(E, detonate(E)).
Disadvantages:
word(gun, X) :X noun, kind@X -- inanimate, % guns are inanimate content@X -- lambda(Y, gun(Y)). word(secretary, X) :X noun, kind@X -- animate, % secretaries are animate content@X -- lambda(Y, secretary(Y)). Allan Ramsay,
-119-
-118-
Types & selection restrictions
• It’s quick, neatly integrated into the parsing algoritm
• It’s too blunt: how can you use a set of features of this kind to spot that ‘I saw a man with telescope’ has two plausible readings but ‘I saw a man with a screwdriver’ doesn’t. Natural kind hierarchies aren’t rich enough. Natural kind lattices may be, and can be handled by unification (so dead quick, still easily integrated), description logics may be (but more expressive, so more time-consuming) • It’s too sharp: you ‘Don’t be silly – you can’t see a man with a screwdriver’ clearly does admit an instrumental reading of the PP. This is probably more important: these constraints must be applied softly.
Types & selection restrictions
Allan Ramsay,
-120-
Types & selection restrictions
Try a type lattice: % Strict partitions: X >> [A, B, C] says that if you are an A or a B or a C % then you are an X, and you cannot be an A and a B, or an A and a C, or ... % % Each term can appear on the left hand side of at most one strict partition living >> [animal, vegetable]. animal >> [mammal, insect, fish, bird]. mammal >> [human, donkey]. gender >> [male, female, neuter]. human >> [man, woman, child]. child >> [boy, girl]. bird >> [sparrow, eagle, pigeon]. relation >> [aunt, spouse, parent, grandparent, uncle, son, grandparent >> [grandfather, grandmother]. parent >> [father, mother]. sibling >> [brother, sister]. spouse >> [husband, wife].
Hierarchical relations: X >> [A, B, C] says that if you are an A or a B or a C then you are an X. There is no restriction on having a single item as the LHS of more than one such relation. You can have complements of classes on either LHS or RHS (e.g. the rule below that says that children are not adults).
human >>> [employee(X), actor(X)]. employee(_X) >>> [secretary, professor, lecturer, shopAssistant]. -adult >>> [child]. adult >>> [man, woman, employee]. male >>> [man, boy]. female >>> [woman, girl]. woman >>> [aunt, mother, grandmother, wife]. man >>> [father, uncle, grandfather, husband]. daughter, niece, sibling, nephew]. female >>> [sister, daughter, niece]. male >>> [brother, son, nephew]. human >>> [relation]. instrument(shoot) >>> [gun, cannon]. % xor(L) says that you can’t belong to more than one of the given classes. % You can include complements: xor is strictly speaking redundant, because % xor([A, B]) = (-A or -B) = (A => -B) = (B => -A)
actor(X) >> [agent(X), experiencer(X)]. experiencer(X) >> [owner(X)]. agent(X) >> [employer(X)]. object(X) >> [employee(X)]. Allan Ramsay,
% % % %
-121-
xor([instrument(_X), human]). Types & selection restrictions
Allan Ramsay,
-122-
Types & selection restrictions
Then use these in your lexical entries (note the weird notation!): word(fired, X) :verb(X, transitive(A1, A2)), glue@A1 -- theta(agent), glue@A2 -- theta(object), kind@A2 ~= ^human, content@X -- lambda(E, sack(E)).
How easy is this to scale up? Easier than using a simple hierarchy, but you do need a great deal of general knowledge before it’ll work properly.
word(fired, X) :verb(X, transitive(A1, A2)), glue@A1 -- theta(agent), glue@A2 -- theta(object), kind@A2 ~= ^instrument(shoot), content@X -- lambda(E, detonate(E)).
I’ve done it by insisting that it should be possible for the item in question to play the specified role. You could do it by insisting that you can prove that it is the right kind of thing, rather than proving that it’s not the wrong kind of thing. I think this would be even harder, and it would certainly be less flexible.
word(secretary, X) :X noun, kind@X -- ^secretary. word(gun, X) :X noun, kind@X -- ^instrument(shoot).
Allan Ramsay,
-123-
Types & selection restrictions
Allan Ramsay,
-124-
Types & selection restrictions
CHECKPOINT
Structural ambiguity
• Ambiguity is ubiquitous: surface form ‘underspecifies’ meaning
It is not the job of semantics to sort it out. Semantics should reveal its presence, and do so in a way that makes it possible to sort it out or ignore it.
• One apparently cheap way of dealing with it is to include ‘selection restrictions’. May be difficult to do this on a large scale.
Allan Ramsay,
Types & selection restrictions
-125-
Allan Ramsay,
-126-
Structural ambiguity
‘Skolemised’ form: introduce a new constant for every existentially quantified variable (‘Mr X says that you were waving an imitation gun.’)
(63) I saw a man in a park.
Proper logical forms: exists(A, see(A) & exists(B ::{man(B) & exists(C :: {park(C)}, in(B, C))}, object(A, B)) & agent(A, ref(lambda(D, speaker(D))))) exists(A, see(A) & exists(B :: {man(B)}, object(A, B)) & exists(C :: {park(C)}, in(A, C)) & agent(A, ref(lambda(D, speaker(D)))))
see(sk(0)) & man(sk(1)) & park(sk(2)) & in(sk(1), sk(2)) & object(sk(0), sk(1)) & agent(sk(0), ref(lambda(A, speaker(A)))) see(sk(0)) & man(sk(1)) & object(sk(0), sk(1)) & park(sk(2)) & in(sk(0), sk(2)) & agent(sk(0), ref(lambda(A, speaker(A)))) Inference engines usually prefer uniform formats like these.
Allan Ramsay,
-127-
Structural ambiguity
Allan Ramsay,
-128-
Structural ambiguity
Chart parsers [Kaplan, 1973] enable you to compress alternative syntactic analyses into a single ‘packed’ representation. What does ‘+’ mean here? So if the meaning of the whole is a function of the meaning of the parts and their mode of combination then if you can pack the parts you should be be able to pack their meanings. It’s not just or.
[see(sk(0)), man(sk(1)), park(sk(2)), object(sk(0), sk(1)), agent(sk(0), ref(lambda(A, speaker(A))))] +([in(sk(1), sk(2))], [in(sk(0), sk(2))])
Allan Ramsay,
-129-
There are various suggestions, eg.[Reyle, 1993]. I’m going to give you the one in [Ramsay, 1999b]. Why not?
Structural ambiguity
We’ve already seen that it may be useful to wrap something about the speaker’s attitude to what has been said round the propositional content.
Allan Ramsay,
-130-
Structural ambiguity
• This is just a disjunction. But it’s a disjunction over what I think you did, not over what the world is actually like.
We actually had claim(exists(A, see(A) &exists(B :: {man(B) & exists(C :: {park(C)}, in(B, C))}, object(A, B)) &agent(A, ref(lambda(D, speaker(D)))))) or claim(exists(E, see(E) &exists(::(F, {man(F)}), object(E, F)) &exists(::(G, {park(G)}), in(E, G)) &agent(E, ref(lambda(H, speaker(H))))))
Allan Ramsay,
-131-
Structural ambiguity
• People don’t tend to claim barmy things. So if one of these makes more sense than the other, I can reasonably prefer that one [Hirst, 1987]
• People don’t tend to make uninformative claims. So if one of these is more infomarmative than the other, I can reasonably prefer that one [?]
Allan Ramsay,
-132-
Structural ambiguity
Quantifier scope
If I use the packed version then it becomes claim(see(sk(0)) & man(sk(1)) & park(sk(2)) & object(sk(0), sk(1)) & agent(sk(0), ref(lambda(A, speaker(A))))) & (claim(in(sk(1), sk(2))) or claim(in(sk(0), sk(2))))
The structure simply doesn’t provide enough information to construct a unique interpretation.
(64) Every man loves some woman.
From here we can see that you are definitely claiming that you saw a man, and that there is a park; and we can either find some way of choosing between whether you are claiming that the man was in the park or you are claiming that the seeing took place in the park.
Or we can decide not to choose at this moment, because it may become clear later and it may not matter anyway.
Allan Ramsay,
-133-
Structural ambiguity
(61) Someone is mugged every 10 minutes in New York, and he’s getting pretty sick of it.
Cooper storage [Cooper, 1983, Keller, 1987, Vestre, 1991] QLF [van Eijck and Alshawi, 1992], in-situ quantifiers [Milward and Cooper, 1994]: build a structure which leaves the quantifiers where they were found. Sort it out later.
Allan Ramsay,
-134-
Quantifier scope
Dig the in-situ parts out, put them in a ‘quantifier store’.
| ?- chart([every, man, loves, some, woman, ’.’], P), showMeaning(P). exists(A, love(A) &theta(A, object, qq(3, exists(B::{woman(B)}), B)) &theta(A, agent, qq(3, every(C::{man(C)}), C)))
[qq(3, every(A::{man(A)})), qq(3, exists(B::{woman(B)}))] :exists(C, love(C)&theta(C,object,B) &theta(C, agent, A)) Take them out of the store, using the ‘strength’ to order them, and stick them back on the formula. [qq(every, forall(::(B, {man(B)})))]: exists(C :: {woman(C)}, exists(A, agent(A, B) & love(A) & object(A, C))) []: forall(B :: {man(B)}, exists(C :: {woman(C)}, exists(A, agent(A, B) & love(A) & object(A, C))))
Allan Ramsay,
-135-
Quantifier scope
Allan Ramsay,
-136-
Quantifier scope
| ?- chart([he, will, drink, any, thing, ’.’], P), meaning(P, Q), extractQuantifiers(Q,
You need to leave some record of the specific lexical item that introduced the quantifier, since ones with the same logical properties may have different scope priorities.
[qq(1, forall(A::{thing(A)})), qq(2, exists(B::{future(B)}))] :at(B, exists(C, drink(C)&theta(C,object,A) &theta(C, agent, ref(lambda(D, male(D)&salient(D))))))
(65) You can’t invite John. He’ll drink everything.
| ?- chart([he, will, drink, every, thing, ’.’], P), meaning(P, Q), extractQuantifiers(
(66) You can invite John. He’ll drink anything.
Allan Ramsay,
-137-
[qq(2, exists(A::{future(A)})), qq(3, forall(B::{thing(B)}))] :at(A, exists(C, drink(C)&theta(C,object,B) &theta(C, agent, ref(lambda(D, male(D)&salient(D))))))
Quantifier scope
Allan Ramsay,
Quantifier scope
-138-
CHECKPOINT Interaction with mood is intricate: but we’d better get it right. Wrap opaque(N, ...) round an expression to stop any quantifiers of scope greater than N escaping:
• Construct a strict paraphrase in some formal language: nothing added, as little as possible omitted
| ?- chart([does, every, man, love, some, woman, ?], P), showMeaning(P). forall(A::{man(A)}, exists(B::{woman(B)}, exists(C, query(love(C)&theta(C,object,B) &theta(C, agent, A)))))
• Reason about the world view of someone who uttered that sentence in this situation
• Very sparse ‘meaning representation’, fairly rich inference query(forall(A::{man(A)}, exists(B::{woman(B)}, exists(C, love(C)&theta(C,object,B) &theta(C, agent, A)))))
Allan Ramsay,
-139-
• Make sure the meaning representation leaves underspecified things clearly marked for sorting out later: packed representations, quasi-logical forms, ...
Quantifier scope
Allan Ramsay,
-140-
Quantifier scope
Update semantics
Update semantics
Reason about the world view of someone who uttered that sentence in this situation: but what kind of reasoning?
The meaning of an utterance is some object which changes the situation
Most reasoning is aimed at proving something specific. But when you hear an utterance, it seems as though you can’t help doing a bit of basic inference.
The exact effects in a given situation depend on what the situation is like: you have to ‘anchor’ the utterance and then see how it ‘updates’ the situation
(67) A dead dog went into a bar and ordered a pint of philosophy
It looks as though you do something automatically when you hear an utterance. What?
Allan Ramsay,
-141-
Update semantics
Lots of views on what happens here, on just how far you go beyond anchoring and adding the propositional content. I’m going to do something which could be seen as a computational variant on Johnson-Laird [1983]’s ‘mental models’. Other approaches lead you to much the same places.
Allan Ramsay,
-142-
Update semantics
Dynamic semantics Ordinary logic cannot cope with the ‘situated’ nature of natural language. Explore a semantic tableau, hoping not to close all branches.
(68) The King of France is bald.
(69) She had hated him. An open branch is a (partial) model. (70) The president of the USA is the most powerful person on earth.
(use your best theorem prover: property theory, equality → HIGHLY intractable. Don’t care)
(71) John believes he will marry the richest debutante in Dubuque.
Intuitively it’s quite easy to see what’s going on? Formally it’s a nightmare, computationally it’s a heart-attack.
Allan Ramsay,
-143-
Update semantics
Allan Ramsay,
-144-
Dynamic semantics
Numerous solutions: situation semantics [Barwise and Perry, 1983], dynamic predicate logic [Groenendijk and Stokhof, 1991], discourse representation theory [Kamp, 1984, Kamp and Reyle, 1993]. Two basic moves + a lot of detail.
• You have to allow some idea of the ‘context’ into your theory.
Numerous solutions: so I’m going to give you mine. It has, at least, the advantage of hindsight.
• Introduce something which looks just like a referring expression into your formal paraphrase.
• You have to change your logic to accommodate this notion.
The key is that an utterance is produced in a situation, and another situation arises as a result. Or doesn’t, if you’re lying, or the hearer misunderstands you, or . . .
Allan Ramsay,
Dynamic semantics
-145-
• Treat it as a name whose denotation can only be fixed by inspecting the current discourse state (whatever that is).
Allan Ramsay,
Dynamic semantics
-146-
Reference Plenty of problems:
• very few descriptions are actually uniquely identifying: ‘the man’ I’ve been planting things of the form ref(lambda(X, man(X))) in my logical forms, and invoking a process of ‘anchoring’ to deal with them.
• there may not be anything suitable in my model at the moment: ‘the first snowdrops of Spring’
Anchoring: look for something in your model which satisfies the description, make sure nothing else does???
Allan Ramsay,
-147-
Reference
• One or other of us may fail to believe in the existence of the referred to item: (72) A: My husband bought me a Ferrari for Christmas. B: I don’t believe you. A: He did, he really did. B: Go on then, what colour is it?
Allan Ramsay,
-148-
Reference
• Funny things happen when reference occurs inside belief contexts (and maybe other intensional contexts as well). (73) Hob believes that a witch killed his pig, and Nob believes that she killed his cow.
• It may be new to you. (77) My eldest son’s train set is in bits all over his bedroom floor.
• Funny things happen when reference occurs inside logical operators.
You may not have known I had an eldest son. You certainly didn’t know he had a train set. But it’s not that surprising, so you ‘accommodate’ it.
(74) Each man kills the thing he loves. (75) If a farmer owns a donkey he beats it. (76) If a nurse works hard he will be promoted.
Allan Ramsay,
-149-
Reference
• Referential success is a good cue for disambigutation [Hirst, 1987]
Allan Ramsay,
-150-
Reference
• The ‘slate’ (‘common ground’, ‘minutes’): what someone who has been in this conversation should be committed to.
(78) I saw the man in the park with a telescope. How many men are there? How many parks? Is there a park with a telescope? If there are no parks with a telescope then any interpretation that attaches ‘with a telescope’ to ‘park’ will have to accommodate the existence of such a thing.
• My (your) view of the slate contains objects I (you) know about and relations between them.
If there are two parks, one of which has a telescope, then any interpretation that doesn’t attach ‘with a telescope’ to ‘park’ will have an ambiguity.
• My view of it is not visible to you: in particular, the objects it contains are not.
and likewise for ‘man’ and ‘in the park’.
Allan Ramsay,
-151-
Reference
Allan Ramsay,
-152-
Reference
∆[S], ∆[H] are the Speaker and Hearer’s view of what the common ground ought to be like. • I can tell you about the existence of objects, and I can make universal statements. ` ∆[S] → ∃X(man(X) ∧∀Y ((∆[S] → man(Y )) → Y = X)) • I can tell you about the existence of proofs! In practice:
• Check that ∆[H] ` ∃X(man(X))
• Replace the term by a new constant s and note that ∀Y ((∆[S] → man(Y )) → Y = s)) • Referential terms: claims that I have certain kinds of proof
Allan Ramsay,
-153-
Reference
Allan Ramsay,
-154-
Reference
If people make statements, add them to the Prolog database (after anchoring reference terms): | ?- chart([a, farmer, owns, a, donkey, ’.’], P), update(P, Q). So we might do reasoning forwards, to do updating. Don’t know how much to do, so just do enough to be fairly confident you’ve got the general gist. Just do enough to anchor the referring expressions?
Use your favourite theorem prover. Prolog has restricted expressive power (more strictly: it’s a theorem prover for a fragment of first-order logig with restricted expressive power), but it is efficient and it’s also dead easy to use.
claim(exists(A, own(A) & exists(B :: {donkey(B)}, theta(A, object, B)) & exists(C :: {farmer(C)}, theta(A, agent, C)))) % Skolemised, anchored and Prolog-ised newFact(own(#(6))) , newFact(donkey(#(7))) , newFact(theta(#(6), object, #(7))) , newFact(farmer(#(8))) , newFact(theta(#(6), agent, #(8))) (Use newFact rather than just assert to store a record of what we have asserted so we can clean up the database for a new dialogue)
Allan Ramsay,
-155-
Reference
Allan Ramsay,
-156-
Reference
| ?- chart([he, beats, it, ’.’], P), update(P, Q). claim(exists(A, beat(A) & theta(A, object, ref(lambda(B, neuter(B) , salient(B)))) & theta(A, agent, ref(lambda(C, male(C) , salient(C))))))
The ‘model’ that this produces: | ?- listing(temp). temp(own(#(6))). temp(donkey(#(7))). temp(theta(#(6),object,#(7))). temp(farmer(#(8))). temp(theta(#(6),agent,#(8))).
Allan Ramsay,
% anchored newFact(beat(#(9))) , newFact(theta(#(9), object, #(7))) , newFact(theta(#(9), agent, #(8)))
-157-
Reference
| ?- listing(temp). temp(own(#(6))). temp(donkey(#(7))). temp(theta(#(6),object,#(7))). temp(farmer(#(8))). temp(theta(#(6),agent,#(8))). temp(beat(#(9))). temp(theta(#(9),object,#(7))). temp(theta(#(9),agent,#(8))).
Allan Ramsay,
-158-
Reference
Anchoring involves reasoning using background knowledge
woman(X) :- named(X, susan). % should be female(X) :- named(X, susan). man(X) :- named(X, john). man(X) :- farmer(X). % should be a default rule male(X) :- man(X). neuter(X) :- donkey(X). % but donkeys aren’t neuter! animal(X) :- donkey(X). salient(_X). % Don’t have a proper theory of salience yet
Allan Ramsay,
-159-
Reference
Allan Ramsay,
-160-
Reference
What happens if there isn’t anything that fits the description? Just pretend there was? | ?- chart([he, hates, susan, ’.’], P), update(P, Q).
I’ve flagged the fact that we’d never heard of Susan before by instantiating the new fact with accomodated(#(9), named(#(9), susan)). Is this the right thing to do? Should I just introduce her as #(9) and record the fact this is an accommodation separately?
claim(exists(A, hate(A) & theta(A, object, ref(lambda(B, named(B, susan)))) & theta(A, agent, ref(lambda(C, male(C) , salient(C)))))) newFact(hate(#(10))) , newFact(theta(#(10), object, accomodated(#(11), named(#(11), susan)))) , newFact(theta(#(10), agent, #(8)))
Allan Ramsay,
-161-
I certainly should record the fact that she is named Susan: named(#(9), susan).
Reference
Allan Ramsay,
-162-
Reference
CHECKPOINT
| ?- listing(temp). temp(own(#(6))). temp(donkey(#(7))). temp(theta(#(6),object,#(7))). temp(farmer(#(8))). temp(theta(#(6),agent,#(8))). temp(beat(#(9))). temp(theta(#(9),object,#(7))). temp(theta(#(9),agent,#(8))). temp(named(#(11),susan)). temp(hate(#(10))). temp(theta(#(10),object,accomodated(#(11),named(#(11),susan)))). temp(theta(#(10),agent,#(8))).
• Successful reference depends on both parties having identical versions of the minutes. There is no way of checking this (except by referential failure)!
• The uniqueness element of reference is about there being nothing else which can be proved to satisfy the description from mutually available information.
• Reference is about proofs
Allan Ramsay,
-163-
Reference
Allan Ramsay,
-164-
Reference
Questions revisited If someone asks a question about some proposition, ask Prolog whether it can prove that the proposition is true: have to transform it to get existentials as free variables and universals as Skolem constants, which is legitimated by the idea that query(P) = P => say(yes) (obscure-ish technical point for those who care about such things).
We might do reasoning forwards, to do updating. Don’t know how much to do, so just do enough to be fairly confident you’ve got the general gist.
| ?- chart([does, he, own, an, animal, ?], P), update(P, Q). query(exists(A, own(A) & exists(B :: {animal(B)}, theta(A, object, B)) & theta(A, agent, ref(lambda(C, male(C) , salient(C)))))) % anchored but not verified own(A), animal(B), theta(A,object,B) , theta(A,agent,#(8))
We might do it backwards, to extract specific information that we really want. Do as much as it takes, because we know what we want, and we really do want it.
% answer Q = own(#(6)),animal(#(7)),theta(#(6),object,#(7)),theta(#(6),agent,#(8))
This may bind free variables as a side-effect. Is returning a set of Skolem constants an ‘answer’ ?
Allan Ramsay,
-165-
Questions revisited
Allan Ramsay,
-166-
Questions revisited
CHECKPOINT
No particular limit on what background information you can have. The more you know, the more questions you can answer.
• Converting to some form that a theorem prover accepts makes it possible to do reasoning about what’s been said.
Do you like my rules? Are people called Mary usually women, or are they just usually female?
I’ve treated ‘he’ as ref(lambda(C, male(C))) rather than the corrrect ref(lambda(C, male(C) & salient(X))) because I haven’t implemented a notion of salience. Which I ought to have.
I’m missing a trick by not linking my knowledge base to the type lattice.
Allan Ramsay,
-167-
Questions revisited
• Which seems like a reasonable way of dealing with questions [Winograd, 1972, Warren and Pereira, 1982].
• But to do useful amounts of reasoning you have to know lots of things.
Allan Ramsay,
-168-
Questions revisited
Lexical semantics (II)
(Very) weak lexical items (79) Henrietta is crossing the road.
What do words mean?
(80) Harry is hiccupping. (81) Harald is living in Stuttgart
• What do big words mean? Bigamy, inflation, lexicography, . . .
(82) He lives in Munich. (83) He eats raw eggs.
• What do little words mean? (84) There is a man in the park.
on, big, . . .
(85) I’ll do it in a minute. (86) There are 16 people in my class.
• What do non-words mean? -ing, thematic roles, . . .
(87) There are some good ideas in that book. (88) I’ll keep your suggestion in mind.
Allan Ramsay,
-169-
Lexical semantics (II)
Allan Ramsay,
(Very) weak lexical items
-170-
Multiple views We have different ways of thinking about objects: I’m a competent club tennis player, a father of four, a professor, . . . . Some examples with ‘in’. And then say things about entities for which we have these views.
(89) A man reads a book in a park. (90) A man reads a story in a book.
Take these to be different ‘views’ of me.
(91) A man reads a story in a park.
$$ exists(X, named(’ALLAN’, allan) & man(X) & exists(V0, view(V0, X, competentClubTennisPlayer)) & exists(V1, view(V1, allan, fatherOfFour))).
(92) A man reads a book in January.
(89) leads you to suppose that the man and the book are in the park, (90) says that the story is in the book, and (91) says nothing about the location of the story but does imply that the man is in the park.
...
How can things be ‘in’ such disparate entities, and how can such different consequences follow?
($$ is to get standard logical form translated into Prolog: lets me mess around, because I can decide to translate into standard Prolog or into something else that suits me)
Allan Ramsay,
-171-
Multiple views
$$ forall(X :: {exists(Y, view(Y, X, competentClubTennisPlayer))}, (hasBigFirstServe(X) & hasWeakSecondServe(X))).
Allan Ramsay,
-172-
Multiple views
How does introducing views help us deal with the fact that prepositions don’t mean very much? What kinds of things have ‘envelopes in the appropriate space’ ? Lay off the meaning of the preposition onto the ground: the kinds of things you can be ‘in’ are things that have some surrounding envelope in the appropriate space. $$ forall(X, forall(Y :: {in(X, Y)}, forall(K, forall(VX :: {view(X, VX, K)}, forall(VY :: {view(Y, VY, K)}, forall(E :: {envelope(VY, E)}, contains(E, VX))))))).
$$ exists(X, named(X, january) & month(X)). $$ forall(X :: {month(X)}, exists(V, view(V, X, interval))). $$ forall(X, forall(V :: {view(V, X, interval)}, envelope(V, V))).
Months can be seen as temporal entities. Intervals are their own envelopes. If X is in Y, then if Y has an envelope E which matches some view VX of X then VX is in E,
Allan Ramsay,
-173-
Multiple views
Allan Ramsay,
-174-
Multiple views
| ?- chart([john, read, a, book, in, a, park, ’.’], P), showMeaning(P), fail. claim(exists(A :: {past(A)}, exists(B, at(A, B) & readx(B) & exists(C :: {book(C) & exists(D :: {park(D)}, in(C, D))}, theta(B, object, C)) & theta(B, agent, ref(lambda(E, named(E, john)))) & exists(F, view(F, B, interval))))) claim(exists(A :: {past(A)}, exists(B, at(A, B) & readx(B) & exists(C :: {book(C)}, theta(B, object, C)) & exists(D :: {park(D)}, in(B, D)) & theta(B, agent, ref(lambda(E, named(E, john)))) & exists(F, view(F, B, interval)))))
Then choose the ‘more informative’ one (the one that produces the richer model)
read in January
book in January
[book(#232), [book(#238), past(#229), past(#235), readx(#230), readx(#236), at(#229, #230), at(#235, #236), contains(#179(#178), #233),envelope(#239, #239), envelope(#233, #233), in(#238, #178), in(#230, #178), theta(#236, agent, #174), theta(#230, agent, #174), theta(#236, object, #238), theta(#230, object, #232), view(#239, #236, interval)] view(#233, #230, interval)]
(Note readx instead of read) Allan Ramsay,
-175-
Multiple views
Allan Ramsay,
-176-
Multiple views
chart([john, read, a, book, in, the, park, ’.’], P). Sometimes it makes no difference: if you read something when you’re in the park, then it probably is too (and if the thing you read is in the park then so probably are you: if I have both rules, my theorem prover had better spot loops).
$$ forall(R :: {readx(R)}, forall(X :: {theta(R, object, X)}, forall(K, forall(VR :: {view(VR, R, K)}, forall(VX :: {view(VX, X, K)}, forall(C :: {contains(C, VR)}, contains(C, VX))))))).
(+ rules saying that books have physical views, and that parks have physical views that are their own envelopes)
Allan Ramsay,
-177-
Multiple views
[accommodated(park(#(288))), book(#286), park(#(288)), past(#283), readx(#284), at(#283, #284), contains(#(288), #286), % the book is in the park contains(#(288), #253(#284)), % so is the physical view of the read envelope(#287, #287), envelope(#(288), #(288)), in(#284, #(288)), theta(#284, agent, #247), theta(#284, object, #286), view(#286, #286, physical), view(#287, #284, interval), view(#(288), #(288), physical), view(#253(#284), #284, physical)]
Allan Ramsay,
-178-
CHECKPOINT
• Slippery words like prepositions pick up much of their meanings from the words they link: making ‘en’ pick out the envelope of an object may seem circular, but it puts the responsibility on the ground where it belongs.
• Taking multiple views of objects lets you pick up the relevant sense of a term without doing too much violence to your intuitions.
• Choose between interpretations by looking for the more informative one (and if they’re all equally informative it doesn’t matter)
YOU NEED BACKGROUND KNOWLEDGE AND THE ABILITY TO REASON
Allan Ramsay,
-179-
Multiple views
Multiple views
Aspect markers The aspect relates the event to the time: is it still going on, did it finish some time ago, . . . ? | ?- chart([john, slept, ’.’], P), showMeaning(P). claim(exists(A :: {past(A)}, --------------------exists(B, aspect(B, A, simple) -------------------& sleep(B) & theta(B, agent, ref(lambda(C, named(C, john)))) & view(B, B, interval)))) | ?- chart([john, has, slept, ’.’], P), showMeaning(P). claim(exists(A, aspect(A, now, perfect) ----------------------& sleep(A) & theta(A, agent, ref(lambda(B, named(B, john)))) & view(A, A, interval))) Allan Ramsay,
-180-
Aspect markers
| ?- chart([john, had, slept, ’.’], P), showMeaning(P). claim(exists(A :: {past(A)}, --------------------exists(B, aspect(B, A, perfect) --------------------& sleep(B) & theta(B, agent, ref(lambda(C, named(C, john)))) & view(B, B, interval)))) | ?- chart([john, was, sleeping, ’.’], P), showMeaning(P). claim(exists(A :: {past(A)}, ---------------------exists(B, aspect(B, A, progessive) -----------------------& sleep(B) & theta(B, agent, ref(lambda(C, named(C, john)))) & view(B, B, interval)))) Allan Ramsay,
-181-
Multiple views
Lovely: but what does aspect(X, Y, perfect) mean?
The only one I’m confident of: $$ forall(T, forall(X, aspect(X, T, progressive) => (forall(T1 :: {start(T1, X)}, T1 bik
| ?- chart([i, did, not, steal, your, , ’.’], P), showMeaning(
not(lambda(A, bike(A)), lambda(B, exists(C :: past(C), exists(D, aspect(D, C, E) &steal(D) &theta(D, object, ref(lambda(F, B:F &own(ref(lambda(G,hearer(G)) &theta(D,agent, ref(lambda(H, speaker(H)))) &view(D, D, interval))))) I stole something of yours, but it wasn’t a bike
Allan Ramsay,
-201-
Focus
Allan Ramsay,
-202-
Focus
| ?- chart([i, did, not, steal, , bike, ’.’], P), showMeaning( | ?- chart([i, did, not, , your, bike, ’.’], P), meaning(P, Q), verbatim(Q).
not(lambda(A, steal(A)), lambda(B, exists(C :: past(C), exists(D, aspect(D, C, E) & B : D &theta(D, object, ref(lambda(F, bike(F) &own(ref(lambda(G,hearer(G))), &theta(D,agent,ref(lambda(H, speaker(H)))) &view(D, D, interval)))))
not(lambda(A, lambda(B, B :ref(lambda(C, A : C & own(ref(lambda(D, hearer(D))),C))))), lambda(E, exists(F :: past(F), exists(G, aspect(G, F, H) &steal(G) & E:lambda(I,bike(I)):lambda(J, theta(G, objec &theta(G, agent, ref(lambda(K, speaker(K)))) &view(G, G, interval)))))
I did something to your bike, but I didn’t steal it
Is it nice? Is it at least right?
Allan Ramsay,
-203-
Focus
Allan Ramsay,
-204-
Focus
CHECKPOINT But all these things go on together: mood, theme:rheme, focus (+ any others you can think of). How do they interact? about(lambda(A, A : ref(lambda(B,speaker(B)))), claim(lambda(C, not(lambda(D, bike(D)), lambda(E, exists(F :: {past(F)}, exists(G, aspect(G, F, H) & steal(G) & theta(G, object, ref(lambda(I, E : I & own(ref(lambda(J, hearer(J))), I)))) & theta(G, agent, C) & view(G, G, interval))))))))
• Various properties of the surface form carry utterance semantics rather than sentence semantics
• If we don’t deal with them by constructing interpretations and reasoning about them, what do we do?
• Gets dead difficult. Made worse by the need to manage the interactions. There is no alternative. Theme outscopes mood outscopes focus. Is that right?
Allan Ramsay,
-205-
Focus
Allan Ramsay,
-206-
Focus
Statistical approaches Maybe we could extract some information automatically. I’ve spent weeks explaining how to extract fine-grained interpretations of short passages.
What sort of information?
• Consequences, contradictions? • It’s hard to write programs that extract these interpretations • Distinctions? • It’s hard to write programs that use them • Ambiguities?
• It’s hard to write programs that distinguish them reliably
Allan Ramsay,
-207-
• Similarities: facts about words that appear in similar contexts might let you work out which words are similar.
Statistical approaches
Allan Ramsay,
-208-
Statistical approaches
What could you do if you you had some measure of similarity between words?
• Document classification • Deal with attachment ambiguities? If I knew that verbs related to ‘see’ often occurred with optical instruments, but not very often with body parts, I could use this to deal with (104) I saw the man with a big nose with a telescope.
– email filtering: delete all messages that refer to snoring and other related topics
• Deal with lexical ambiguities? (105) If you saw it into pieces you must carry it indoors. (106) If you saw it you must have good eyesight. But how did you know there were two senses of ‘saw’, and how did you determine which context each of them occurred in?
Allan Ramsay,
-209-
Statistical approaches
– web searching, information retrieval: get me all web pages that refer to cures for snoring and other related topics – medicines for stertorous breathing, . . . .
Allan Ramsay,
-210-
Statistical approaches
Similariy by using lexical resources Any word may belong to a number of synsets:
% Get all words that are in some synset that contains ’peach’ | ?- setof(N-W, (s(peach, N), s(W, N)), L). L = [104280667-apricot,104280667-peach,104280667-salmon_pink,104280667-yello 106459435-peach, 108692801-beauty,108692801-dish,108692801-knockout,108692801-looker,1086 110587371-’Prunus_persica’,110587371-peach,110587371-peach_tree, 200668723-betray,200668723-denounce,200668723-give_away,200668723-grass, 200741639-babble,200741639-babble_out,200741639-blab,200741639-blab_out,
WordNet: huge hand-coded lexical resource
Available as Prolog, MySQL, . . .
Most useful components are ‘synsets’ and ‘hypernyms’
synsets: ‘vagrant’, ‘drifter’, ‘floater’ all denote the same general notion. They are a set of ‘synonyms’ – a synset. s(108795365,1,’vagrant’,n,1,0). s(108795365,2,’drifter’,n,1,0). s(108795365,3,’floater’,n,3,0).
‘peach’ denotes a kind of fruit (110587371). It’s also a colour (104280667), a slang term for pretty girl (108692801), and for telling tales on someone (200668723 and 200741639). What’s the difference between 200668723 and 200741639? different people wrote two different sets of entries.
That two
How can you choose which synset you want on any given occasion? You can’t. Allan Ramsay,
-211-
Similariy by using lexical resources
Allan Ramsay,
-212-
Similariy by using lexical resources
You can use these as follows: hypernyms: eating apple is a subclass of apple, apple is a subclass of edible fruit.
% % | L
WordNet contains 90K entries that look like hyp(100002219,100001742). hyp(100002361,100002219). hyp(100002471,100002219). hyp(100002579,100002219). (the synset file contains 195K entries)
Allan Ramsay,
-213-
% get all hypernyms of apple (hypernyms: superclasses) | ?- setof(H, N^S^(s(apple, N), hyp(S, N), s(H, S)), L). L = [apple_tree,edible_fruit,false_fruit,pome] ? yes get all hyponyms (hyponyms: subclasses) source_info ?- setof(H, N^S^(s(apple, N), hyp(S, N), s(H, S)), L). = [cooking_apple,crab_apple,crabapple,dessert_apple,eating_apple] ?
Useful enough, but sometimes a bit weird (what is a ‘pome’, what is a ‘false fruit’?)
Similariy by using lexical resources
Allan Ramsay,
-214-
Similariy by using lexical resources
So WordNet is unreliable. It’s as good as anything like this is going to be: you just have to be wary about how you use it.
Do it for ‘peach’:
| ?- setof(H, N^S^(s(peach, N), hyp(N, S), s(H, S)), L). One quite nice one: two words are similar if their lowest common hypernym isn’t very far L = [adult_female,break,bring_out,disclose,discover,divulge,drupe,edible_fruit,expose,fruit_tree,give_away,impart,inform,let_on,let_out,pink,reveal,st up.
‘peach’ belongs to several synsets: so it has lots of hypernyms. Do it for ‘knife’, ‘fork’, ‘spoon’: | ?- setof(H, N^S^(s(knife, N), hyp(N, S), s(H, S)), L). L = [arm,edge_tool,injure,projection,weapon,weapon_system,wound] ?
| ?- ancestors(apple, L). L = [ancestor(apple,1,apple_tree),ancestor(apple,1,edible_fruit),ancestor(apple,1,pome),anc ancestor(apple,2,produce),ancestor(apple,3,angiospermous_tree),ancestor(apple,3,food),a ancestor(apple,4,plant_organ),ancestor(apple,4,solid),ancestor(apple,4,tree),ancestor(a ancestor(apple,5,substance),ancestor(apple,5,woody_plant),ancestor(apple,6,entity),ance ancestor(apple,7,object),ancestor(apple,7,plant),ancestor(apple,8,organism),ancestor(ap
| ?- setof(H, N^S^(s(fork, N), hyp(N, S), s(H, S)), L). L = [aggress,angle,attack,cutlery,diverge,division,eating_utensil,form,lift,shape,subfigure,tool]? | ?- commonAncestor(peach, apple, A, N1, N2). A = edible_fruit, N1 = 1, N2 = 1 ?
| ?- setof(H, N^S^(s(spoon, N), hyp(N, S), s(H, S)), L). | ?- commonAncestor(peach, knife, A, N1, N2). L = [container,containerful,cutlery,eating_utensil,make_out,neck,remove,take,take_away,withdraw,wood]? A = solid, N1 = 4, N2 = 3 ? Knives aren’t cutlery (and why does ‘spoon’ have ‘neck’ as a hypernym: slang term for ‘kiss’!?)
| ?- commonAncestor(apple, shirt, A, N1, N2). A = entity, N1 = 6, N2 = 6 ?
Allan Ramsay,
Allan Ramsay,
-215-
Similariy by using lexical resources
-216-
Similariy by using lexical resources
Similar contexts, similar words You can do quite a lot with this (and it can be implemented quite efficiently)
• Classification of words: these two words occur in similar contexts, so they must (?) be similar
WordNet is hand-coded
• So it’s flaky: multiple equivalent synsets, missing entries, lack of transitivity (‘love’ is hypernym of ‘adore’, ‘like’ is a hypernym of ‘love’, but ‘like’ is not an ancestor of ‘adore’) | ?- commonAncestor(fork, spoon, A, N1, N2). A = cutlery, N1 = 1, N2 = 1 ?
• What’s a context? A body of text: could small (bigrams), could be large (newspaper articles, books)
| ?- commonAncestor(fork, knife, A, N1, N2). A = tool, N1 = 1, N2 = 4 ?
• What makes two contexts similar? They contain the same words, they contain similar words.
• And it’s no different from the kind of work I’ve been describing all along. Someone has programmed it.
Allan Ramsay,
-217-
• Classification of contexts: these two contexts contain similar words, so they must (?) be similar
Similariy by using lexical resources
• What makes two words similar? They occur in the same contexts.
Allan Ramsay,
-218-
Similar contexts, similar words
Large contexts: articles SEMANTICS
(107) a. A cat sat on the mat. b. The professor discursed on the subject.
Many natural languages use prepositions to mark relations between entities of various kinds – between physical entities and their spatial locations, between temporal entities and their temporal locations, between abstract entities of various kinds (e.g. between ideas and their ‘mental locations’). In the current paper I will show that the consequences of using prepositions to relate temporal entities emerge naturally from the basic interpretations of the prepositions themselves together with a very weak logic of events, where I take it that prepositions denote abstract relations whose significance only emerges when properties of the related items are taken into consideration. Most formal/computational treatments of natural language semantics discuss the production of formal paraphrases in some suitable language. If that is all that you do, the results of your analyses will be inflexible and overly precise, and considerable amounts of work will be required in order to choose between alternative ‘ambiguous’ readings.
Half the words are identical, so these two are similar?
It is widely accepted that semantic theories should, as far as possible, be compositional. The claim that a theory is compositional, however, lacks bite if lexical and pre-lexical items are allowed to mean different things in different contexts. The aim of the current paper is to show how two specific phenomena can be dealt with by relying on combinatorial effects to infer different consequences from the same items in different contexts without altering the contributions that these items make individually.
• What makes two contexts similar? They contain the same unusual words, they contain similar unusual words.
THEOREM PROVING For a number of tasks in knowledge representation, and particularly in natural language semantics, it is useful to be able to treat propositions and properties as objects — as items which can appear as arguments of predicates, as things you can quantify over, and so on. This paper presents a theorem prover for a combination of constructive first-order logic and the λ-calculus. The paper presents the basic theorem prover, which is an extension of Manthey and Bry’s model generation theorem prover for first-order logic; considers issues relating to the compiletime optimisations that are often used with first-order theorem provers; and shows how the resulting system can be used in a natural language understanding system.
• What makes a word unusual? Just how often it occurs. A useful measure, TF-IDF, is (frequency in this context)/(frequency in general), or sometimes -log((frequency in this context)/(frequency in general)) to make the curve less extreme.
Allan Ramsay,
-219-
Similar contexts, similar words
This paper presents a theorem prover for a highly intensional logic, namely a constructive version of Turner’s property theory (this language essentially provides a combination of constructive first-order logic and the λ-calculus). The paper presents the basic theorem prover, which is a higher-order extension of Manthey and Bry’s model generation theorem prover for first-order logic; considers issues relating to the compile-time optimisations that are often used with first-order theorem provers; and shows how the resulting system can be used in a natural language understanding system.
Allan Ramsay,
-220-
Large contexts: articles
Find the low frequency items that occur in one set but not the other.
So if we have articles pre-classified (note the need for manual intervention again) we can use word counts to assign new articles to existing classes.
These are characteristic of documents of that kind – papers by Allan about reasoning include the words ‘property’, ‘λ-calculus’, ‘Manthey’, papers by Allan about semantics include the words ‘semantics’, ‘consequences’, . . .
You can also use this kind of matrix to compute word similarities: given any matrix A like
Make an N × M table of word frequencies against articles, and against types of article: suppose L1, L2, L3 are articles about language, I1, I2, I3 are articles about inference, and X is an article I want to classify (assume that these are counts/thousand words)
a13 a23 a33 a43
a14 a24 a34 a44
you can find matrices U, D, V of the form
0 0 d3 0
0 0 , V = v1 v2 v3 v4 0 d4
where A = U × D × V and the entries on the diagonal of D are decreasing.
r
The ‘distance’ from X to L is (9 − 7)2 + (12 − 15)2 + (10 − 9)2 + (7 − 7)2 + (3 − 2)2 + (2 − 1)2 + (11 − 9)2, r
whereas its distance to I is (2 − 7)2 + (7 − 15)2 + (2 − 10)2 + (7 − 7)2 + (8 − 3)2 + (16 − 2)2 + (12 − 11)2. -221-
a12 a22 a32 a42
u1 d1 0 0 d2 u U = 2 ,D = u3 0 0 0 0 u4
L1 L2 L3 L I1 I2 I3 I X language 3 4 2 9 1 0 1 2 7 semantics 4 2 6 12 1 1 5 7 15 compositional 2 3 4 9 0 1 1 2 10 logic 2 3 2 7 4 2 1 7 7 engine 1 0 1 2 3 0 5 8 3 resolution 0 0 1 1 5 7 4 16 2 unification 3 3 3 9 3 4 5 12 11
Allan Ramsay,
a11 a21 a31 a41
Large contexts: articles
This is called the ‘singular value decomposition’ of the context matrix: it can be very useful for inferring links when the data is sparse (which it always is – Zipf’s law) Allan Ramsay,
-222-
Large contexts: articles
Small contexts: N-grams
This just looks like a weird piece of maths. You can find programs that will compute U, D and V for you (MathLab, JAMA (Java implementation of MathLab) so long as the matrices aren’t too big (not bigger than 2000 by 2000)), but so what?
N-grams: you may be able to collect information that will help you with ‘local’ tasks just by collecting sets of 2, or 3, or . . . , or N words that occur together.
But suppose you remove some of the lower entries on the diagonal. They’re small, so U × Dn × V (Dn is D with the bottom n entries removed) shouldn’t be very different from A.
• Local tasks: ambiguity resolution, maybe document classification What you find is that columns get non-zero scores for rows that have positive scores for similar columns.
Allan Ramsay,
-223-
Large contexts: articles
Allan Ramsay,
-224-
Small contexts: N-grams
. see1+ I
with telescope+ my
man the
old+
Try to parse it. If you want to get anything out of doing this, you have to use large amounts of freely occurring text. Which most of us can’t parse.
new+
Figure 2: ‘I saw the old man with my new telescope’
• Occur together: probably not just adjacency, since most nouns immediately follow determiners, and there’s not much information to be gained from the fact that ‘the’ and ‘fact’ frequently occur next to one another. Minimally, delete all very high occurrence words before you do it. Alternatively, try to parse it and define adjacency in terms of adjacency within the parse tree.
Allan Ramsay,
-225-
Small contexts: N-grams
Suppose I want to look for NPN and VPN triples (e.g. to count occurrences of park-with-telescope and saw-with-telescope).
If I have a part-of-speech tagged corpus then I could try using ‘regular expressions’: handy notation with pretty much the expressive power of a context-free grammar and a very fast parsing algorithm (do it in PERL).
Allan Ramsay,
-226-
Small contexts: N-grams
A part-of-speech tagged corpus You can part of speech tag fairly accurately using rules obtained by machine learning algorithms.
Well known (freely available, I think) corpus: the British National Corpus (BNC).
What could we do with it? Simple proposal: solve PP-attachment by collecting all the NPN and VPN triples, and then when you want to choose an interpretation, see which reading is more common.
• No corpus is big enough: the BNC doesn’t mention ‘saw X with a telescope’ or ‘park with a telescope’ once, let alone enough times to give one more prominence than the other.
Marked up using SGML (like HTML, but specialised tags): you can be infected for between 10–15 years without realising it.
Whole thing is approx 100,000,000 words. Demos in these notes drawn from 800,000 word subsection (if nearly 1M words isn’t enough, then just how much do you need?)
Allan Ramsay,
-227-
A part-of-speech tagged corpus
• Suppose you were collecting data for PP-attachment purposes. Suppose you were lucky enough to come across ‘I saw a man in a park with a telescope’. Then you wouldn’t know which reading was intended, so you’d have to record both. Which wouldn’t do you any good anyway. So you need to look for unambiguous cases: ‘The park with a telescope was a long way away’, ‘I saw it with a telescope’ (this is not uncontroversial, but collecting data from ambiguous cases is dangerous at best).
Allan Ramsay,
-228-
A part-of-speech tagged corpus
Use it to compute similarities: look for verb-object pairs. Verbs with the same objects will be similar, nouns that occur as object of the same verbs will be similar? (which is more likely to be right? would we be better off looking for subjects?) What verb gives rise to the following list? Use regular expressions to describe interesting patterns (regexs ≈ context free grammars)
$AZ = "[a-z]*"; $NN = "($AZ)"; $DET = "(\s*)*"; $ADJS = "($AZ\s*)*($AZ\s*)*"; $VERB = "($AZ)"; # VP -> verb (det*)(adj*)(noun*)noun if(/$VERB\s*$DET$ADJS$NN($AZ)/){ ... } Allan Ramsay,
-229-
A part-of-speech tagged corpus
The objects of a given verb have something in common? | L | L
afterbirths, 1, alfalfa, 1, amount, 2, amounts, 1, animals, 2, apple, 1 Arabs, 1, ball, 1, balls, 1, bar, 1, batter, 1, beans, 1, birds, 1, bisc 1, biscuits, 2, bit, 1, bread, 3, breakfast, 8, bucket, 1, cake, 3, came 1, cereal, 1, cheese, 1, chilli, 1, chip, 1, chips, 2, chocolate, 3, Chu 1, clothes, 1, clove, 1, cockles, 1, course, 1, cream, 1, curry, 1, date 1, day, 3, deal, 1, dessert, 1, diet, 1, dinner, 3, dinners, 1, dog, 8, 1, egg, 1, eggs, 4, evening, 2, fat, 1, feast, 1, fibre, 1, fig, 1, fill 1, fish, 7, fit, 1, food, 19, foods, 1, foods, 4, frogs, 1, ...
Allan Ramsay,
-230-
A part-of-speech tagged corpus
The verbs that can take a given object have something in common?
?- allObjects(eat, L). = [1-’’,1-food,1-lunch,1-pretzels,1-seeds,1-tadpoles] ? ?- allObjects(drink, L). = [1-alcohol,1-brandy,1-champagne,1-coffee] ?
Pretty good: I have a family of fairly closely related nouns
| L | L
?- allOV(food, L). = [1-bring,1-eat,1-feel,1-improve,1-packing,1-spread,1-taste,2-provide ?- allOV(coffee, L). = [1-borrowed,1-drink,1-drinking,1-like,1-made,1-poured,1-wanted,2-mak
Tend to be very generic
The subjects of a given verb have something in common? | L | L
The verbs that can take a given subject have something in common?
?- allSubjects(eat, L). = [1-consumers,1-dodo,1-families] ? ?- allSubjects(drink, L). = [1-secretaries] ?
| ?- allSV(window, L). L = [1-appear,1-facing,1-masked,1-open,1-giving,1-open,1-spilled] ?
Less impressive: subjects just tend to be people, or at best animals (why are their fewer subjects than objects for these two verbs?)
Allan Ramsay,
-231-
A part-of-speech tagged corpus
| ?- allSV(food, L). L = [1-consumed,1-containing,1-reaches,1-represents,1-stains,1-varies] ? Mixture of generic and unpredictable
Allan Ramsay,
-232-
A part-of-speech tagged corpus
CHECKPOINT Then use these to define similarity measures: ‘brandy’, ‘coffee’, ‘alcohol’, ‘champagne’ score 1 because they are all objects of ‘drink’
Some related ones (by finding objects of ‘drink’, and then other verbs involving those items, and then other objects of those verbs): drink [1-alcohol,1-brandy,1-establishments,1-wine,2-champagne,5-coffee] pour [1-brandy,1-coffee,1-tea] try [1-brandy,1-cloud,1-drugs,1-equipment,1-jump,1-things] misuse [1-alcohol,1-drugs] We need something like the singular value decomposition from above to make the links between ‘tea’ and ‘alcohol’.
• Statistical techniques can be used to see if words ‘have something in common’. I don’t know of anyone who has used them to look for more detailed lexical relationships, and I can’t imagine how you would do it (if I could I would have tried it).
• Broad contexts let you find out things that can be used for classifying broad contexts (information retrieval, document classification). Narrow contexts let you find out things that can be used for classifying narrow contexts (lexical semantics, disambiguation).
Some stupid ones (by the same method):
• Some contexts tell you more than others: be careful how you choose a like [1-advice,1-brandy,1-chairs,1-coffee,1-copies,1-dogs,1-football,1-hell,1-reproductions,1-stoats,1-subventions,2-hats] context (all other words in this document vs. all other uncommon words made [1-arrangements,1-coffee,1-friends,1-fun,1-heaven,1-notes,1-omelettes,1-referrals,1-sense,1-tarts,1-tea,2-flesh,2-things,3-love] in this document, . . . )
Allan Ramsay,
-233-
A part-of-speech tagged corpus
Allan Ramsay,
-234-
A part-of-speech tagged corpus
and Meaning II: Semantic Issues, pages 69–130, Dordrecht, 1989. Kluwer Academic Press.
References
N Asher. A default, truth conditional semantics for the progressive. Linguistics and Philosophy, 15:463–508, 1992. J Barwise and J Perry. Situations and Attitudes. Bradford Books, Cambridge, MA, 1983. R Cooper. Quantification and Syntactic Theory. D. Reidel, Dordrecht, 1983. D A Cruse. Lexical Semantics. Cambridge University Press, Cambridge, 1986. M Dalrymple, J Lamping, F C N Pereira, and V Saraswat. A deductive account of quantification in LFG. In M Kanazawa, C Pi˜ no ´n, and H de Swart, editors, Quantifiers, deduction and context, pages 33–58, 1996. D Davidson. The logical form of action sentences. In N Rescher, editor, The Logic of Decision and Action, Pittsburgh, 1967. University of Pittsburgh Press.
D R Dowty. Thematic proto-roles and argument selection. Language, 67: 547–619, 1991. D R Dowty, R E Wall, and S Peters. Introduction to Montague Semantics. D. Reidel, Dordrecht, 1981. J E Fenstad, P-K Halvorsen, T Langholm, and J van Bentham. Situations, Language and Logic. Kluwer Academic Publishers (SLAP-34), Amsterdam, 1987. C Fillmore. The case for case. In E. Bach and R.T. Harms, editors, Universals in Linguistic Theory, pages 1–90, Chicago, 1968. Holt, Rinehart and Winston. G Gazdar, E Klein, G K Pullum, and I Sag. Generalised Phrase Structure Grammar. Basil Blackwell, Oxford, 1985.
D Davidson. Essays on actions and events. Clarendon Press, Oxford, 1980.
J Groenendijk and M Stokhof. Studies on the Semantics of Questions and the Pragmatics of Answers. PhD thesis, Department of Philosophy, University of Amsterdam, 1984.
D R Dowty. On the semantic content of the notion of ‘thematic role’. In G Chierchia, B H Partee, and R Turner, editors, Properties, Types
J Groenendijk and M Stokhof. Dynamic predicate logic. Linguistics and Philosophy, 14:39–100, 1991.
Allan Ramsay,
Allan Ramsay,
-235-
A part-of-speech tagged corpus
-236-
A part-of-speech tagged corpus
B J Grosz, A Joshi, and S Weinstein. Providing a unified account of definite noun phrases in discourse. In Proceedings 21st Annual Meeting of the Association for Computational Linguistics, pages 44–50, 1983. B J Grosz, A Joshi, and S Weinstein. Centering: a framework for modeling the local coherence of discourse. Computational Linguistics, 21(2):175– 204, 1995. M A K Halliday. An Introduction to Functional Grammar. Arnold, London, 1985. G Hirst. Semantic interpretation and the resolution of ambiguity. Studies in natural language processing. Cambridge University Press, Cambridge, 1987. R S Jackendoff. Semantics and Cognition. MIT Press, Cambridge, MA, 1983.
the Study of Language, pages 277–322, Dordrecht, 1984. Foris Publications. H Kamp and U Reyle. From discourse to logic: introduction to model theoretic semantics of natural language. Kluwer Academic Press, Dordrecht, 1993. R M Kaplan. A general syntactic processor. In R. Rustin, editor, Natural language processing, pages 193–241, New York, 1973. Algorithmics Press. J J Katz and J A Fodor. The structure of a semantic theory. Language, 39:170–210, 1963. W R Keller. Nested Cooper storage: the proper treatment of quantification in ordinary noun phrases. Technical Report CSRP. 73, University of Sussex, 1987.
P N Johnson-Laird. Mental Models: towards a cognitive science of language, inference and consciousness. Harvard University Press, Cambridge, Mass., 1983.
K Konrad, H Maier, D Milward, and M Pinkal. An education and research tool for computational semantics. In Proceedings of the 16th International Conference on Computational Linguistics (COLING-96), pages 1098–1102, Copenhagen, 1996.
H Kamp. A theory of truth and semantic representation. In J A G Groenendijk, T M V Janssen, and M B J Stokhof, editors, Formal Methods in
M Krifka. Focus, presupposition and dynamic interpretation. Journal of Semantics, 10, 1993.
Allan Ramsay,
Allan Ramsay,
-237-
A part-of-speech tagged corpus
-238-
A part-of-speech tagged corpus
D Milward and R Cooper. Incremental interpretation: Applications, theory and relationship to dynamic semantics. In Y Wilks, editor, Proceedings of the 15th International Conference on Computational Linguistics (COLING-94), pages 88748–754, Kyoto, 1994.
U Reyle. Dealing with ambiguities by underspecification: construction, representation and deduction. Journal of Semantics, pages 123–179, 1993.
M Mo¨ ens and M Steedman. Temporal ontology and temporal reference. Computational Linguistics, 14(2):15–28, 1988.
R C Schank. Conceptual dependency: a theory of natural language understanding. Cognitive Psychology, 3(4):552–631, 1972.
F C N Pereira and D H D Warren. Definite clause grammars for language analysis — a survey of the formalism and a comparison with atns. Artificial Intelligence, 13(3):231–278, 1980.
J van Eijck and H Alshawi. Logical forms. In H Alshawi, editor, The Core Language Engine, pages 11–40, Cambridge, Mass., 1992. Bradford Books/MIT Press.
C J Pollard and I A Sag. An Information Based Approach to Syntax and Semantics: Vol 1 Fundamentals. CSLI lecture notes 13, Chicago University Press, Chicago, 1988.
J van Genabith and R Crouch. How to glue a donkey to an f-structure. In H C Bunt, L Kievit, R Muskens, and M Verlinden, editors, 2nd International Workshop on Computational Semantics, pages 52–65, University of Tilburg, 1997.
C J Pollard and I A Sag. Head-driven Phrase Structure Grammar. Chicago University Press, Chicago, 1994.
Philosophy, pages 208–220, Dordrecht, 1999b. Kluwer Academic Publishers.
A M Ramsay. Direct parsing with discontinuous phrases. Natural Language Engineering, 5(3):271–300, 1999a.
E Vestre. An algorithm for generating non-redundant quantifier scopings. In Fifth Conference of the European Chapter of the Assoc. for Computational Linguistics, pages 251–256, Berlin, 1991.
A M Ramsay. Dynamic and underspecified semantics without dynamic and underspecified logic. In H C Bunt, L Kievit, R Muskens, and M Verlinden, editors, Computing Meaning I, volume 73 of Studies in Linguistics and
D H D Warren and F C N Pereira. An efficient easily adaptable system for interpreting natural language queries. American Journal for Computational Linguistics, 8(3-4):110–122, 1982.
Allan Ramsay,
Allan Ramsay,
-239-
A part-of-speech tagged corpus
-240-
A part-of-speech tagged corpus
T Winograd. Understanding natural language. Academic Press, New York, 1972.
Allan Ramsay,
-241-
A part-of-speech tagged corpus