The Famous Buffalo Sentence and AI Parse Analysis

generative ai and language understanding part 7 n.w
1 / 13
Embed
Share

Explore the intriguing Buffalo sentence, its multiple meanings, and the parsing analysis using Python NLTK code. Dive into the complexities of language understanding through examples and insights provided in the context of generative AI.

  • Buffalo Sentence
  • Language Understanding
  • AI Analysis
  • Syntax Parsing
  • Generative AI

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Generative AI and Language Understanding: Part 7 Sandiway Fong University of Arizona

  2. The famous Buffalo sentence Wikipedia page: https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffa lo_buffalo_buffalo_buffalo_Buffalo_buffalo Parse: S = sentence, NP = noun phrase, RC = relative clause VP = verb phrase, PN = proper noun, N = noun, V = verb

  3. The famous Buffalo sentence Word Senses for buffalo

  4. The famous Buffalo sentence See also ChatGPT-4 response in later slides

  5. The famous Buffalo sentence

  6. The famous Buffalo sentence ChatGPT's answer is incomplete, it doesn't really know how to parse. Why? See next slide

  7. The famous Buffalo sentence ChatGPT's answer: the relativized subject reading But if it knew parsing, it would also know the relativized object reading

  8. The famous Buffalo sentence Python nltk code: Python interpreter: >>> import nltk >>> f = open('buffalo.txt','r') >>> raw = f.read() >>> raw "S -> NP VP\nNP -> NNP NNS\nVP -> VBP NP \nVP -> VBD NP \nNNP -> 'Buffalo'\nNNS -> 'buffalo'\nVBP -> 'buffalo'\nVBD -> 'buffaloed'\nNP -> NP RELC\nRELC -> REL RELS \nRELC -> RELS \nREL -> 'that'\nRELS -> NP VPREL\nVPREL -> VBP\nVPREL -> VBD\n" >>> cfg = nltk.CFG.fromstring(raw) >>> p = nltk.ChartParser(cfg) >>> for t in p.parse(['buffalo'] * 8): ... t.draw() ... buffalo.txt

  9. The famous Buffalo sentence To verify that ChatGPT has no knowledge of the Buffalo sentence syntax, we can try a longer sentence.

  10. The famous Buffalo sentence We have added three more buffalo words to the sentence.

  11. The famous Buffalo sentence Incorrect! Same response as for the 8 buffalo sentence.

  12. ChatGPT-4

  13. ChatGPT-4

Related


More Related Content