mirror of https://github.com/explosion/spaCy.git
Accept 'text' in matcher as an alternative to ORTH
This commit is contained in:
parent
7bbdffd36e
commit
9ef30b0cde
|
@ -342,6 +342,8 @@ def _convert_strings(token_specs, string_store):
|
||||||
keys = ', '.join(operators.keys())
|
keys = ', '.join(operators.keys())
|
||||||
raise KeyError(Errors.E011.format(op=value, opts=keys))
|
raise KeyError(Errors.E011.format(op=value, opts=keys))
|
||||||
if isinstance(attr, basestring):
|
if isinstance(attr, basestring):
|
||||||
|
if attr.upper() == 'TEXT':
|
||||||
|
attr = 'ORTH'
|
||||||
attr = IDS.get(attr.upper())
|
attr = IDS.get(attr.upper())
|
||||||
if isinstance(value, basestring):
|
if isinstance(value, basestring):
|
||||||
value = string_store.add(value)
|
value = string_store.add(value)
|
||||||
|
|
Loading…
Reference in New Issue