* Update test for Issue #242

This commit is contained in:
Matthew Honnibal 2016-04-17 15:34:23 +02:00
parent f12b043308
commit 2b419d5b8c

View File

@ -51,11 +51,12 @@ def test_overlap_issue242():
nlp.matcher.add('FOOD', 'FOOD', {}, patterns)
doc = nlp(u'There are different food safety standards in different countries.')
food_safety, safety_standards = doc.ents
assert food_safety.text == u'food safety'
assert safety_standards.text == u'safety standards'
doc = nlp.tokenizer(u'There are different food safety standards in different countries.')
food_safety, safety_standards = nlp.matcher(doc)
assert food_safety[1] == 3
assert food_safety[2] == 5
assert safety_standards[1] == 4
assert safety_standards[2] == 6
def test_overlap_reorder(EN):