Fix entity recognition example (closes #803)

This commit is contained in:
Matthew Honnibal 2017-02-05 11:23:12 +01:00 committed by GitHub
parent cf529f4774
commit 9aaa2c5633

View File

@ -54,7 +54,7 @@ p
doc = nlp(u'London is a big city in the United Kingdom.')
doc.ents = []
assert doc[0].ent_type_ == ''
doc.ents = [Span(0, 1, label='GPE')]
doc.ents = [Span(doc, 0, 1, label=doc.vocab.strings['GPE'])]
assert doc[0].ent_type_ == 'GPE'
doc.ents = []
doc.ents = [(u'LondonCity', u'GPE', 0, 1)]