Update spacy/displacy/render.py

Co-authored-by: Renat Shigapov <57352291+shigapov@users.noreply.github.com>
This commit is contained in:
Sofie Van Landeghem 2021-09-16 09:22:38 +02:00 committed by GitHub
parent d5cc009faf
commit 4bf2606adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -314,8 +314,8 @@ class EntityRenderer:
label = span["label"]
start = span["start"]
end = span["end"]
kb_id = str(span.get("kb_id") or "")
kb_url = str(span.get("kb_url") or "")
kb_id = span.get("kb_id", "")
kb_url = span.get("kb_url", "")
additional_params = span.get("params", {})
entity = escape_html(text[start:end])
fragments = text[offset:start].split("\n")