mirror of https://github.com/explosion/spaCy.git
Add example to Span.merge()
This commit is contained in:
parent
404d3067b8
commit
471eed4126
|
@ -150,6 +150,13 @@ p
|
|||
|
||||
p Retokenize the document, such that the span is merged into a single token.
|
||||
|
||||
+aside-code("Example").
|
||||
doc = nlp(u'I like New York in Autumn.')
|
||||
span = doc[2:3]
|
||||
span.merge()
|
||||
assert len(doc) == 6
|
||||
assert doc[2].text == 'New York'
|
||||
|
||||
+table(["Name", "Type", "Description"])
|
||||
+row
|
||||
+cell #[code **attributes]
|
||||
|
|
Loading…
Reference in New Issue