I am using Stanza Biomedical i2b2 processor to identify PROBLEM, TREATMENT and TEST entities in drugs data.
Python code is as follows:
import stanza
stanza.download(
"en",
package="mimc",
processors={"ner": ["i2b2"]},
verbose=False,
)
nlp = stanza.Pipeline(
"en",
package="mimc",
processors={"ner": ["i2b2"]},
verbose=False,
)
parsed_row = nlp("Prevention of phototoxicity in adult patients with erythropoietic protoporphyria (EPP).")
for ent in parsed_row.entities:
print(f"{ent.text}\t{ent.type}")
NER output
phototoxicity PROBLEM
erythropoietic protoporphyria PROBLEM
I am reading the page about using brat to visualize Stanza NER annotations here https://brat.nlplab.org/embed.html but I' totally lost. Can anyone please help me fill the dots ? Thanks