mirror of https://github.com/explosion/spaCy.git
Don't use deprecated Doc.merge call in displaCy
As reported here: https://stackoverflow.com/a/48464412/6400719
This commit is contained in:
parent
6a8cb905aa
commit
6d978e5c35
|
@ -95,8 +95,8 @@ def parse_deps(orig_doc, options={}):
|
|||
span = doc[start:end]
|
||||
spans.append((span.start_char, span.end_char, word.tag_,
|
||||
word.lemma_, word.ent_type_))
|
||||
for span_props in spans:
|
||||
doc.merge(*span_props)
|
||||
for start, end, tag, lemma, ent_type in spans:
|
||||
doc.merge(start, end, tag=tag, lemma=lemma, ent_type=ent_type)
|
||||
if options.get('fine_grained'):
|
||||
words = [{'text': w.text, 'tag': w.tag_} for w in doc]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue