diff --git a/spacy/matcher/matcher.pyx b/spacy/matcher/matcher.pyx index e75ee9ce2..e43583e30 100644 --- a/spacy/matcher/matcher.pyx +++ b/spacy/matcher/matcher.pyx @@ -690,18 +690,14 @@ cdef int8_t get_is_match(PatternStateC state, return True -cdef int8_t get_is_final(PatternStateC state) nogil: +cdef inline int8_t get_is_final(PatternStateC state) nogil: if state.pattern[1].quantifier == FINAL_ID: - id_attr = state.pattern[1].attrs[0] - if id_attr.attr != ID: - with gil: - raise ValueError(Errors.E074.format(attr=ID, bad_attr=id_attr.attr)) return 1 else: return 0 -cdef int8_t get_quantifier(PatternStateC state) nogil: +cdef inline int8_t get_quantifier(PatternStateC state) nogil: return state.pattern.quantifier