1. Învăţa
  2. /
  3. Courses
  4. /
  5. Advanced NLP with spaCy

Connected

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.

Instrucțiuni 1 / 3

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