mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Fix shape attr bug, and fix handling of false positive matches
This commit is contained in:
parent
855af087fc
commit
9f65879991
|
@ -86,7 +86,7 @@ def map_attr_name(attr):
|
||||||
return LEMMA
|
return LEMMA
|
||||||
elif attr == 'LOWER':
|
elif attr == 'LOWER':
|
||||||
return LOWER
|
return LOWER
|
||||||
elif attr == 'SHAOE':
|
elif attr == 'SHAPE':
|
||||||
return SHAPE
|
return SHAPE
|
||||||
elif attr == 'NORM':
|
elif attr == 'NORM':
|
||||||
return NORM
|
return NORM
|
||||||
|
@ -109,6 +109,8 @@ cdef class Matcher:
|
||||||
entity_key = vocab.strings[entity_key]
|
entity_key = vocab.strings[entity_key]
|
||||||
if isinstance(etype, basestring):
|
if isinstance(etype, basestring):
|
||||||
etype = vocab.strings[etype]
|
etype = vocab.strings[etype]
|
||||||
|
elif etype is None:
|
||||||
|
etype = -1
|
||||||
# TODO: Do something more clever about multiple patterns for single
|
# TODO: Do something more clever about multiple patterns for single
|
||||||
# entity
|
# entity
|
||||||
for spec in specs:
|
for spec in specs:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user