MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Advanced NLP with spaCy

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import the Matcher
from spacy.____ import ____

# Initialize the Matcher with the shared vocabulary
matcher = ____(____.____)
Edit dan Jalankan Kode