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

View File

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