380 likes | 525 Views
Semantics and Time in Language. MAS.S60 Rob Speer Catherine Havasi Some slides: James Pustejovsky. Lexical semantics. We’ve been trying to make word meanings into a functional programming language Applying functions to each other, up the parse tree, gives us a logic expression in the end
E N D
Semantics and Time in Language MAS.S60 Rob Speer Catherine Havasi Some slides: James Pustejovsky
Lexical semantics • We’ve been trying to make word meanings into a functional programming language • Applying functions to each other, up the parse tree, gives us a logic expression in the end • But how do we figure out crazy functions like: \X \y. X(\x. chase(y, x))
Being an un-parser • Work backwards from the result you want • Un-parse your way down the parse tree
“A dog barks.” • A dog barks. exists x. (dog(x) & bark(x))
“A dog barks.” • A dog barks. exists x. (dog(x) & bark(x)) • (A dog) (barks) A dog: barks:
“A dog barks.” • A dog barks. exists x. (dog(x) & bark(x)) • (A dog) (barks) A dog: \P. exists x. (dog(x) & P(x)) barks: \z. bark(z)
“A dog barks.” • A dog barks. exists x. (dog(x) & bark(x)) • (A dog) (barks) A dog: \P. exists x. (dog(x) & P(x)) barks: \z. bark(z) • (A(dog)) (barks) A: dog:
“A dog barks.” • A dog barks. exists x. (dog(x) & bark(x)) • (A dog) (barks) A dog: \P. exists x. (dog(x) & P(x)) barks: \z. bark(z) • (A(dog)) (barks) A: \Q. \P. exists x. (Q(x) & P(x)) dog: \z. dog(z)
Lexical items we learned A: \Q. \P. exists x. (Q(x) & P(x)) dog: \z. dog(z) barks: \z. bark(z)
“Angus chases a dog.” Angus chases a dog: exists x. (dog(x) & chase(Angus, x))
“Angus chases a dog.” Angus chases a dog: exists x. (dog(x) & chase(Angus, x)) • Angus(chases a dog) chases a dog: \y.exists x. (dog(x) & chase(y, x) a dog: \P. exists x. (dog(x) & P(x)) from earlier slides
“Angus chases a dog.” Angus chases a dog: exists x. (dog(x) & chase(Angus, x)) • Angus(chases a dog) chases a dog: \y.exists x. (dog(x) & chase(y, x) a dog: \P. exists x. (dog(x) & P(x)) from earlier slides • (chases) (a dog) • Let’s try to make something like this: (\P. exists x. (dog(x) & P(x)) (\z. chase(y, z))
“Angus chases a dog.” Angus chases a dog: exists x. (dog(x) & chase(Angus, x)) • Angus(chases a dog) chases a dog: \y.exists x. (dog(x) & chase(y, x) a dog: \P. exists x. (dog(x) & P(x)) from earlier slides • (chases) (a dog) • Let’s try to make something like this: (\P. exists x. (dog(x) & P(x)) (\z. chase(y, z))
“Angus chases a dog.” Angus chases a dog: exists x. (dog(x) & chase(Angus, x)) • Angus(chases a dog) chases a dog: \y.exists x. (dog(x) & chase(y, x) a dog: \P. exists x. (dog(x) & P(x)) from earlier slides • (chases) (a dog) • Let’s try to make something like this: (\P. exists x. (dog(x) & P(x)) (\z. chase(y, z)) chases: \y. doSomethingWith(\z. chase(y, z))
“Angus chases a dog.” Angus chases a dog: exists x. (dog(x) & chase(Angus, x)) • Angus(chases a dog) chases a dog: \y.exists x. (dog(x) & chase(y, x) a dog: \P. exists x. (dog(x) & P(x)) from earlier slides • (chases) (a dog) • Let’s try to make something like this: (\P. exists x. (dog(x) & P(x)) (\z. chase(y, z)) chases: \X.\y. X(\z. chase(y, z))
Your turn • We add a feature grammar rule that allows for ditransitive (two-object) verbs: VP[SEM=<?v(?obj,?pp)>] -> DTV[SEM=?v] NP[SEM=?obj] PP[+TO,SEM=?pp] • What are the semantics of a DTV?
High-level overview of C&C • Parses using a Combinatorial Categorial Grammar (CCG) • fancier than a CFG • includes multiple kinds of “slash rules” for gaps and fillers • lots of grad student time spent transforming Treebank
High-level overview of C&C • MaxEnt “supertagger” tags each word with a semantic value • Possible semantic values for verbs determined by VerbNet
High-level overview of C&C • Combine the resulting semantic “tags” • Find the highest-probability result with coherent semantics • Doesn’t this create billions of parses that need to be checked?
High-level overview of C&C • Find the highest-probability result with coherent semantics • Doesn’t this create millions of parses that need to be checked? • Yes. A typical sentence uses 25 GB of RAM to find the best parse. • That’s where the Beowulf cluster comes in.
Questions about time? • The Pierre Vinken example • Events in FrameNet • Question answering
Time in Q&A • When are finals this semester? • Who is currently president of the United States? • How many different airports has Pittsburgh had? • How many classes have we had since January? • When did the Berlin wall fall?
Difficulties • More than 66% of times in documents are relative • Only 15% of documents refer to the “date of creation” (DOC) • 42% percent of the uses of the word “today” are non-specific
James Allen • Created a temporal logic • 13 basic relations • 6 types, their inverses and equal
Types of Information • Properties • Hold over an interval and all subintervals • “Rob was asleep all morning.” • Events • Hold over a interval and no sub events • “Lance wrote a program last night.” • Processes • Hold over some sub intervals • “Brett demoed during sponsor week.”
What is TimeML? • (ISO) Standard language for the mark-up of: • temporal expressions • events • temporal anchoring of events (relations between events and temporal expressions) • temporal ordering of events (relations between events and other events)
Labeling What? • Events are taken to be situations that occur or happen, punctual or lasting for a period of time. • Times may be either points, intervals, or durations. • Relations can hold between events and events and times.
An example “Two Russians and a Frenchman left the Mir and endured a rough landing on the snow-covered plains of Central Asia on Thursday. The two Russians arrived on the Mir last August. Solovyou celebrated his 50th birthday during his six-month space voyage.”
An example “Two Russians and a Frenchman left the Mir and endured a rough landing on the snow-covered plains of Central Asia onThursday. The two Russians arrived on the Mir last August. Solovyoucelebrated his 50th birthday during his six-month space voyage.”
Events and Relations • Event expressions; • tensed verbs; has left, was captured, will resign; • stative adjectives; sunken, stalled, on board; • Nominals: merger, Military Operation, Gulf War; • Dependencies between events and times: • Anchoring; John left on Monday. • Orderings; The party happened after midnight. • Embedding; John said Mary left.
LINKs • Temporal: TLINK It represents the temporal relationship holding between events or between an event and a timex: Mary arrived in Boston last Thursday. • Aspectual: ALINK It represent the relationship between an aspectual event and its argument event. She finishedassembling the table. • Subordination: SLINK It is used for contexts introducing relations between an I-ACTION/I-STATE event and its event argument, or an event and a negation or modal : She tried to buy some wine.
TARSQI • Add and tag time expressions in text • TempEx (MITRE) • Determines extents and nomalizations • GUTime (Brandeis) • Ground things like “last week” • Evita (Brandeis) • Recognize events in time
TARSQI • GUTenLink (Georgetown) • Temporal Tagger • Slinket (Brandeis) • Event logging • SputLink • Based on James Allen’s time logic