mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
commit
874f174ab1
|
@ -136,7 +136,7 @@ p
|
||||||
+aside-code("Example").
|
+aside-code("Example").
|
||||||
from spacy.gold import biluo_tags_from_offsets
|
from spacy.gold import biluo_tags_from_offsets
|
||||||
|
|
||||||
doc = nlp('I like London.')
|
doc = nlp(u'I like London.')
|
||||||
entities = [(7, 13, 'LOC')]
|
entities = [(7, 13, 'LOC')]
|
||||||
tags = biluo_tags_from_offsets(doc, entities)
|
tags = biluo_tags_from_offsets(doc, entities)
|
||||||
assert tags == ['O', 'O', 'U-LOC', 'O']
|
assert tags == ['O', 'O', 'U-LOC', 'O']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user