Presentation on theme: "Semantics LING 001 - October 16, 2006 Joshua Tauberer and some syntax, math, and computational linguistics too."— Presentation transcript:
Semantics LING 001 - October 16, 2006 Joshua Tauberer and some syntax, math, and computational linguistics too
Semantics Why does a sentence mean what it means? What are the meanings of words and how do they come together to make larger meanings (i.e. phrases, sentences)? Perhaps the only level of linguistic description actually needed for there to be language…?
Overview Machine Translation Quantifier Scope Ambiguity Negative Polarity Items Object Language vs Meta Language Compositionality Idioms Presupposition Formal Semantics (Propositional Logic, etc.) …….
Machine Translation Can we make a computer program to translate text between languages automatically?
MT: Morphological Analysis Direct word-to-word mapping Billy eats the cake quickly. Billy come la torta rápidamente. (Spanish)
MT: Morphological Analysis Word-to-word mapping doesn’t work well. Billy ate the cake quickly. Billy keki çabukça yedi. (Turkish (I hope))
MT: Morphological Analysis Word-to-word mapping doesn’t work well. What did Billy eat quickly? Billy neyi çabukça yedi? (Turkish (I hope))
MT: Morphological Analysis Word-to-word mapping doesn’t work well. Wawirri kapi-rna panti-rni yalumpu. “Kangaroo will-I spear that.”. I will spear that kangaroo. (Warlpiri, from Hale (1983) via Legate (2002)).
actual MT systems today MT: The Pyramid Interlingua Syntactic Structure Morphological Structure Morphological Structure word-to-word translation tree-to-tree translation Input LanguageOutput Language
MT: Syntactic Analysis Even syntactic MT runs into trouble. Let’s take a brief trip into quantifier scope ambiguity…
Quantifier Scope Ambiguity Two students met with every teacher. (Syntactically unambiguous.) Semantically ambiguous. 1.Two particular students each met all of the teachers. 2.Each teacher was visited by two students, but possibly different students meeting with each.
Quantifier Scope & MT Unfortunately, not all languages have the same quantifier scope ambiguities. Proper translation requires recognition (& maybe resolution) of ambiguity, and then selection of appropriate form in the target language.
Quantifier Scope & MT English: Everyone loves someone. –Ambiguous. Japanese: Daremo-ga dareka-o aisite-iru. everyone-NOM someone-ACC love –Unambiguous. “Everyone loves someone or other.” –Using this translation would be wrong unless the computer has resolved the ambiguity, i.e. if it knows what the speaker intended. Japanese: Dareka-o daremo-ga aisite-iru. –Ambiguous. –Close to English “Someone, everyone loves.” –A (potentially) awkward translation if the other one would work. (source: Kuno, Takami, and Wu 1999)
MT: Semantic Analysis The holy grail of MT. Obviously a computer cannot truly understand anything, but it has to have a symbolic representation of the meaning. –Translate the input sentence into the ‘interlingua’ which represents the full original meaning. –Translate ‘interlingua’ into the target language.
Other Practical Applications Question-Answering Automated Summarization Existing solutions don’t use any sophisticated syntax or semantics. –Because when they try…
Negative Polarity Items NPIs are words that seem to only be allowed in negative contexts. I did not see anything/any books at the store. I didn’t get paid a red cent for my trouble. I have not ever been to Mexico. I don’t give a damn about the homework. * I saw any book at the store. * I got paid a red cent for my trouble. * I have ever been to Mexico. * I give a damn about the homework.
Negative Polarity Items What constituents a negative context? I didn’t see anyone at the store. I never see anyone at the store. I rarely see anyone at the store. * I saw anyone at the store. * I always see anyone at the store. * I sometimes see anyone at the store.
Negative Polarity Items But there are other licensing contexts too: If I see anyone at the store after hours... Students who bought anything from the bookstore... What do these have in common? –Negation –The antecedent of a conditional –Relative clauses
Negative Polarity Items This is an upward-entailing context: I saw something in the fishbowl. I saw a fish in the fishbowl. I saw a goldfish in the fishbowl. more general more specific entails
Negative Polarity Items This is a downward-entailing context: I didn’t see a thing in the fishbowl. I didn’t see a fish in the fishbowl. I didn’t see a goldfish in the fishbowl. more general more specific entails
Negative Polarity Items If I find a fish in the fishbowl, I will feed it. Is fish in an upward-entailing or downward-entailing context?
Negative Polarity Items If I find a fish in the fishbowl, I will feed it. Situation Feed it? I found a worm (an animal). NO I found a goldfish. YES So the conditional above entails: If I find a goldfish in the fishbowl, I will feed it Goldfish is more specific. It is downward entailing.
Negative Polarity Items Students who bought a book will get a rebate. Situation Rebate? I bought merchandise. NO I bought a textbook. YES This is also downward-entailing.
Negative Polarity Items If Clinton wins in ’08, some politicians will be happy. Clinton wins. Let’s see who is happy. Group Happy? some people YES Republicans NO This is upward entailing. The antecedent of a conditional is downward-entailing, but the consequent is upward-entailing.
Negative Polarity Items Licit only in downward-entailing contexts. –Where replacement with a more specific term yields a sentence entailed by the original. NPIs also have a syntactic requirement. –“c-command” under the standard generative model of sentence structure There are also positive-polarity items.
Object vs. Meta Language When describing meaning, it doesn’t help to use the words we’re trying to define. The quick brown fox jumped. –What does this mean? –It doesn’t help to just repeat the sentence. –We need a controlled vocabulary that we can agree on to describe language.
Object vs. Meta Language I will use italics for utterances of English, our object language. –The quick brown fox jumped. I will use CAPITALS for the meta- language, the language to talk about language.
Object vs. Meta Language deep blue oceans What does this mean? I think it means things that are… –OCEANS –AND DEEP –AND BLUE Reduction of meaning into smaller pieces: –AND, OCEANS, DEEP, BLUE
Object vs. Meta Language We can’t possibly list the meaning of every phrase. (Is there a longest phrase?) But we can list the meaning of every word. –“oceans” “deep” “blue” And we can add a little bit of glue and some rules for putting the meanings together.
Object vs. Meta Language deep blue oceans ADJ ADJ …. N The meaning 〚 … 〛 of a noun phrase of the form above is the conjunction of the meaning of its parts. 〚 ADJ 1 ADJ 2 ADJ 3... N 〛 = things that are 〚 ADJ 1 〛 AND 〚 ADJ 2 〛 AND 〚 ADJ 3 〛 AND 〚 N 〛
Compositionality The meaning of a constituent is determined by –The meaning of its parts –The way the parts are put together –(And nothing else.) It seems obvious, but there are some complications.
Compositionality Complications: Idioms Idioms –Phrases that defy compositionality –Meaning of the whole must be listed lexically a red cent (‘nothing’) give a damn (‘care’) kick the bucket (‘die’) sleeping with the fishes (‘killed’) the cat has got your tongue (‘speechless’)
Compositionality Complications: Idioms Are they just multi-word words? Idioms differ in their rigidity...
Compositionality Complications: Idioms In most idioms, one cannot replace any words and retain the idiomatic meaning: –a red cent / *penny / *coin –*punch/*tap the bucket But some have replaceable parts: –the cat got my/your/the teacher’s tongue
Compositionality Complications: Idioms Some but not all idioms can be syntactically shuffled around (here, passivized): Keep tabs on Henry. (‘track his whereabouts’) Tabs were kept on Henry for three days. Don’t spill the beans. (‘don’t give up the secret’) The beans were spilled already. * The bucket was kicked by the old man. * His tongue has been gotten by the cat.
Compositionality Complications: Idioms This suggests idioms have internal syntactic structure, but perhaps no internal semantic structure.
Compositionality Complications: Idioms This suggests idioms have internal syntactic structure, but perhaps no internal semantic structure.
Compositionality Complications: Non-Intersective Adjectives We previously saw ‘intersective’ adjectives: –A hungry alligator is something that is both hungry and an alligator. –Something that is a hungry alligator comes from the intersection of the set of hungry things and the set of alligators. – 〚 ADJ N 〛 = 〚 ADJ 〛 ∩ 〚 N 〛
Compositionality Complications: Non-Intersective Adjectives There are also non-intersective adjectives: –a good plumber is not someone who is both good (in general) and a plumber. He only has to be good at plumbing. –a proud father is not necessarily a proud person – 〚 ADJ N 〛 = 〚 ADJ 〛 ∩ 〚 N 〛 –At least a good plumber is a plumber and a proud father is a father. These are called ‘subsective’ because it still finds a subset. 〚 ADJ N 〛⊆ 〚 N 〛
Compositionality Complications: Non-Intersective Adjectives Then there are non-intersective, non- subsective adjectives: –a former student is not even a student (let alone ‘former’, cf. ‘blue’) The whale is blue. *John is former. –an alleged criminal is not (by necessity) a criminal. –counterfeit money is not money (arguably, but certainly not the way we usually use money).
Compositionality Complications: Non-Intersective Adjectives How to reconcile non-intersective adjectives with compositionality? If 〚 former student 〛 ≠ 〚 former 〛 ∩ 〚 student 〛 then we have to give up either: –Compositionality –Intersection ∩
Brief Interlude: Functions A FUNCTION FROM GREY- BROWN COGS TO RED/YELLOW COGS
Brief Interlude: Functions FORMER (the notion of a student)(the notion of a former student)
Compositionality Complications: Non-Intersective Adjectives By treating the meaning of former as a function from one notion to another, we can have a compositional account of former X. For non-intersective adjectives: – 〚 ADJ N 〛 = 〚 ADJ 〛 ( 〚 N 〛 ) –Treat the meaning of ADJ as a function and apply it to the meaning of N.
Compositionality Meanings can be compositional in two ways: –By conjunction/intersection: 〚 X Y 〛 = things that are both 〚 X 〛 and 〚 Y 〛 〚 X Y 〛 = 〚 X 〛 ∩ 〚 Y 〛 –By function-application: 〚 X Y 〛 = 〚 X 〛 ( 〚 Y 〛 )
Presupposition A man sat in the witness chair awaiting the next question from the attorney…. When did you stop beating your wife? The jury gasps, but the man is simply confused. He responds: But I never beat my wife!
Presupposition The King of France is bald. Huh? It’s not false, per se. It’s just weird.
Presupposition Compare: I don’t think that the Earth is flat. (a true statement) I don’t know that the Earth is flat. (presupposition failure)
Presupposition If an utterance has a presupposition π, then π must be true in order for the utterance to be ‘OK’. Further, π must be established as common ground in the discourse. (Unless the presupposition is ‘accommodated’.)
Presupposition The hallmark of presupposition is that it remains despite negation. Thus we can separate an utterance into two parts: –the assertion, which is affected by negation –the presupposition, which is not
Presuppositions Under Negation I think the Earth is flat. –Assertion: I believe the Earth is flat. –Presupposition: None –Sentence is false (i.e. a lie), but otherwise OK. I know the Earth is flat. –Assertion: I believe the Earth is flat. –Presupposition: The Earth is flat. –Presupposition is not true, therefore sentence is weird.
Presuppositions Under Negation I didn’t think the Earth is flat. –Assertion: I didn’t believe the Earth is flat. –Presupposition: None –Sentence is true. I didn’t know the Earth is flat. –Assertion: I didn’t believe the Earth is flat. –Presupposition: The Earth is flat. –Presupposition is still not true, therefore sentence is still weird.
Presupposition Triggers definite descriptions (‘the King of France’) π = ‘there is a King of France’ quantificational NPs (‘every cat I own’) π = ‘I own at least one cat’ factive verbs (‘regret’, ‘know’, ‘discover’) π = the proposition regretted/known/discovered aspectual verbs/adverbs (‘stop’, ‘still’) π = the action was happening previously questions (‘who stole the cookies?’) π = ‘someone stole the cookies’
Presupposition Projection Presuppositions can ‘project’ or percolate up recursively embedded sentences. I think [John knows [the Earth is flat.]] If [John knows the Earth is flat] then... Even though ‘think’/‘if’ are not a p-triggers, ‘know’ is, and its presupposition passes through ‘think’/‘if’.
Presupposition Filters On the other hand, presuppositions can be blocked. If the Earth is flat, then a good scientist probably would know the Earth is flat. There is no presupposition here. If π, a presupposition of the consequent, is asserted in the antecedent, it is not a presupposition of the whole sentence.
Presupposition Filters If France had a King, the King of France would be a very powerful man.
Presupposition Accommodation Usually presuppositions have to be established: –A man off the street walks up to you and says: I regret that I didn’t buy the tomato. You say: “Oh. You were going to buy a tomato?” The presupposition was not a part of the common ground.
Presupposition Accommodation But sometimes we accept sentences with presuppositions not already established: If the North Korean ambassador turned up, then it is amazing that both the North and South Korean ambassadors are here. (Beaver 2002) π = the S.K. ambassador is here π is ‘accommodated’
Formal Semantics Not just what things mean, but representing meaning & composition in precise logical terms Hashing out the meta language.
Propositional Logic Mathematical representation of meaning. Symbols like p, q stand in for propositions about what is true in the world. Propositions can be either true or false. Let p = ‘It is raining.’ p is true iif it is raining. –If p is true, it must be raining. –If it is raining, p must be true.
Propositional Logic: Connectives Propositions can be combined into formulas using special connectives: and: ∧ or: ∨ not: ￢ if: → (aka implies, conditional) iif: ↔ (aka if and only if, biconditional)
Propositional Logic: Connectives Let p = ‘It is raining.’ Let q = ‘It is snowing.’ Let r = ‘I will play outside.’ (p ∨ q) → ￢ r ‘If it is raining or snowing, then I will not play outside.’
Predicate Logic Predicate logic adds names and predicates on top of propositional logic. KNOWS(JOHN, MARY) Let KNOWS be the predicate that is true just when the first argument knows the second argument. the predicate the arguments (also names) capitals for the meta language
Predicate Logic: Examples If John meets Mary, then he will know her. MEETS(JOHN, MARY) → KNOWS(JOHN, MARY)
Predicate Logic: Examples On days without a cloud in the sky, whenever my dog Sparky barks, and only when he barks, I take him for a walk. ￢ CLOUDY → [BARKS(SPARKY) ↔ WALK(ME, SPARKY)]
Predicate Logic & Natl. Language 〚 John 〛 = JOHN 〚 Mary 〛 = MARY 〚 knows 〛 = KNOWS( …, … ) 〚 John knows Mary 〛 = some combination of 〚 John 〛〚 Mary 〛 and 〚 knows 〛 with either conjunction/intersection or function application
Predicate Logic & Compositionality Formal semantics starts where generative syntax ends. = KNOWS(JOHN, MARY) = JOHN = MARY = KNOWS(…, …)
Predicate Logic & Compositionality Syntax Semantics S → NP 1 V NP 2 〚 S 〛 = 〚 V 〛 ( 〚 NP 1 〛, 〚 NP 2 〛 ) S → John knows Mary 〚 S 〛 = 〚 knows 〛 ( 〚 John 〛, 〚 Mary 〛 ) S → John knows Mary 〚 S 〛 = KNOWS(JOHN, MARY) = KNOWS(JOHN, MARY) = JOHN = MARY = KNOWS(…, …)
Predicate Logic & Compositionality MET(JOHN, MARY) KNOWS(JOHN, MARY) = MEETS(JOHN, MARY) → KNOWS(JOHN, MARY) Syntax Semantics CP → if S 1 then S 2 〚 CP 〛 = 〚 S 1 〛 → 〚 S 2 〛 (roughly)