1. Learn
  2. /
  3. Courses
  4. /
  5. Advanced NLP with spaCy

Exercise

Processing streams

In this exercise, you'll be using nlp.pipe for more efficient text processing. The nlp object has already been created for you. A list of tweets about a popular American fast food chain are available as the variable TEXTS.

Instructions 1/3

undefined XP
  • 1
    • Rewrite the example to use nlp.pipe. Instead of iterating over the texts and processing them, iterate over the doc objects yielded by nlp.pipe.
  • 2
    • Rewrite the example to use nlp.pipe. Don't forget to call list() around the result to turn it into a list.
  • 3
    • Rewrite the example to use nlp.pipe. Don't forget to call list() around the result to turn it into a list.