semantics in nlp (part 2) mas.s60 rob speer catherine havasi * lots of slides borrowed for lots of...
TRANSCRIPT
![Page 1: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/1.jpg)
Semantics in NLP(part 2)
MAS.S60Rob Speer
Catherine Havasi
* Lots of slides borrowed for lots of sources! See end.
![Page 2: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/2.jpg)
Are people doing logic?
• Language Log: “Russia sentences”– *More people have been to Russia than I have.
![Page 3: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/3.jpg)
Are people doing logic?
• Language Log: “Russia sentences”– *More people have been to Russia than I have.– *It just so happens that more people are bitten by
New Yorkers than they are by sharks.
![Page 4: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/4.jpg)
Are people doing logic?
• The thing is, is people come up with new ways of speaking all the time.
![Page 5: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/5.jpg)
More lexical semantics
![Page 6: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/6.jpg)
Quantifiers
• Every/all: \P. \Q. all x. (P(x) -> Q(x))• A/an/some: \P. \Q. exists x. (P(x) & Q(x))• The:– \P. \Q. Q(x)– P(x) goes in the presuppositions
![Page 7: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/7.jpg)
High-level overview of C&C
• Find the highest-probability result with coherent semantics
• Doesn’t this create billions of parses that need to be checked?
• Yes.
![Page 8: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/8.jpg)
High-level overview of C&C
• Parses using a Combinatorial Categorial Grammar (CCG)– fancier than a CFG– includes multiple kinds of “slash rules”– lots of grad student time spent transforming
Treebank• MaxEnt “supertagger” tags each word with a
semantic category
![Page 9: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/9.jpg)
High-level overview of C&C
• Find the highest-probability result with coherent semantics
• Doesn’t this create billions of parses that need to be checked?
![Page 10: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/10.jpg)
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.• That’s where the Beowulf cluster comes in.
![Page 11: Semantics in NLP (part 2) MAS.S60 Rob Speer Catherine Havasi * Lots of slides borrowed for lots of sources! See end](https://reader036.vdocument.in/reader036/viewer/2022071805/56649ccd5503460f94997608/html5/thumbnails/11.jpg)
Can we do this with NLTK?
• NLTK’s feature-based parser has some machinery for doing semantics