Don't use deprecated Doc.merge call in displaCy

As reported here: https://stackoverflow.com/a/48464412/6400719
This commit is contained in:
ines 2018-01-27 11:25:05 +01:00
parent 6a8cb905aa
commit 6d978e5c35
1 changed files with 2 additions and 2 deletions

View File

@ -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: