From 9ef30b0cdecff4bf16af82faf56b320ea80ffad5 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 16 Dec 2018 20:10:43 +0100 Subject: [PATCH] Accept 'text' in matcher as an alternative to ORTH --- spacy/matcher.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/matcher.pyx b/spacy/matcher.pyx index 726a50d18..23449aa57 100644 --- a/spacy/matcher.pyx +++ b/spacy/matcher.pyx @@ -342,6 +342,8 @@ def _convert_strings(token_specs, string_store): keys = ', '.join(operators.keys()) raise KeyError(Errors.E011.format(op=value, opts=keys)) if isinstance(attr, basestring): + if attr.upper() == 'TEXT': + attr = 'ORTH' attr = IDS.get(attr.upper()) if isinstance(value, basestring): value = string_store.add(value)