Skip to content

Commit

Permalink
Update doc.ents test
Browse files Browse the repository at this point in the history
  • Loading branch information
honnibal committed Mar 28, 2018
1 parent e807f88 commit 95fa89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spacy/tests/doc/test_add_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_doc_add_entities_set_ents_iob(en_vocab):
assert [w.ent_iob_ for w in doc] == (['O'] * len(doc))

doc.ents = [(doc.vocab.strings['ANIMAL'], 3, 4)]
assert [w.ent_iob_ for w in doc] == ['O', 'O', 'O', 'B']
assert [w.ent_iob_ for w in doc] == ['', '', '', 'B']

doc.ents = [(doc.vocab.strings['WORD'], 0, 2)]
assert [w.ent_iob_ for w in doc] == ['B', 'I', 'O', 'O']
assert [w.ent_iob_ for w in doc] == ['B', 'I', '', '']

0 comments on commit 95fa89c

Please sign in to comment.