Aan de slagGa gratis aan de slag

Debugging patterns (1)

Why does this pattern not match the tokens "Silicon Valley" in the doc?

pattern = [{'LOWER': 'silicon'}, {'TEXT': ' '}, {'LOWER': 'valley'}]
doc = nlp("Can Silicon Valley workers rein in big tech from within?")

You can try it out in your IPython shell. The matcher with the added pattern and the doc are already created.

Deze oefening maakt deel uit van de cursus

Advanced NLP with spaCy

Cursus bekijken

Praktische interactieve oefening

Zet theorie om in actie met een van onze interactieve oefeningen.

Begin met trainen