Exercise

Using the Matcher

Let's try spaCy's rule-based Matcher. You'll be using the example from the previous exercise and write a pattern that can match the phrase "iPhone X" in the text. The nlp object and a processed doc are already available.

Instructions 1/3

undefined XP
    1
    2
    3
  • Import the Matcher from spacy.matcher.
  • Initialize it with the nlp object's shared vocab.