You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The relations visualisation should visualise correctly in the notebooks, but the render functions is displaying the HTML as string
To Reproduce
Steps to reproduce the behavior:
import spacy
from zshot import PipelineConfig, displacy
from zshot.linker import LinkerSMXM
from zshot.utils.data_models import Entity, Relation
from zshot.relation_extractor import RelationsExtractorZSRC
config = PipelineConfig(
entities=[
Entity(name="company", description="The name of a company"),
Entity(name="location", description="A physical location"),
Entity(name="chemical compound", description="Any of a large class of chemical compounds in which one or more \
atoms of carbon are covalently linked to atoms of other elements, most commonly hydrogen, oxygen, or nitrogen")
],
relations=[
Relation(name="acronym", description="Is the acronym of"),
Relation(name="parent", description="Is the parent of someone")
],
linker=LinkerSMXM(),
relations_extractor=RelationsExtractorZSRC(),
)
nlp = spacy.blank("en")
nlp.add_pipe("zshot", config=config, last=True)
text = "CH2O2 is a chemical compound similar to Acetamide used in International \
Business Machines Corporation (IBM) to create new materials that act like PAGs."
doc = nlp(text)
Expected behavior
Correctly render the HTML in the notebook
The text was updated successfully, but these errors were encountered:
Summary
Describe the bug
The relations visualisation should visualise correctly in the notebooks, but the render functions is displaying the HTML as string
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Correctly render the HTML in the notebook
The text was updated successfully, but these errors were encountered: