Closed
Description
From Issue #429:
import spacy
import spacy.matcher
nlp = spacy.load('en', parser=False, entity=False)
matcher = spacy.matcher.Matcher(nlp.vocab)
content = u'''a b; c'''
matcher.add(entity_key='1', label='TEST', attrs={}, specs=[[]])
matcher(nlp(content))
->
Traceback (most recent call last):
File "word2vec/matcher_bla.py", line 8, in <module>
matcher(nlp(content))
File "spacy/matcher.pyx", line 315, in spacy.matcher.Matcher.__call__ (spacy/matcher.cpp:8519)
Exception: Error selecting action in matcher
Caused by empty specs. While I understand that this is a mistake in my data it's better to check this when entity is being added.