mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Fix entity recognition example (closes #803)
This commit is contained in:
parent
cf529f4774
commit
9aaa2c5633
|
@ -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)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user