Hi
I am using spacy3.5 for evaluation while my model was generated using spacy3.5.
I have some data from manual annotation which I want to use to evaluate a custom model built in spacy.
I am unable to find the relevant tutorial/documentation about how to go about it .
My code is below.
nlp = spacy.load("model-best")
TEST_DATA = [("The type strain is ST 57T (=ATCC BAA-2401T=DSM 25251T), isolated from the trachea of
a white stork nestling in Nielitz, Mecklenburg-Western Pomerania, Germany.",{"entities":[(19,25,"strain"),
(56,69,"iso"),(74,81,"iso_loc"),(87,98,"organism"),(110,118,"location"),(120,149,"location"), (151,158,"location")]}),
("Temperature range for growth is 23- 44 C, with optimum growth at 37 C.",{"entities":[(0,11,"temp"),
(22,28,"growth"),(32,40,"temp"),(47,61,"growth"),(65,69,"temp")]})]
for text, annotations in TEST_DATA:
doc_pred = nlp(text)
example = Example.from_dict(doc_pred, {"entities": entity_offsets})
scores = scorer.score(examples)
Also, I want to compute Precision and Recall with respect to each entity tag.
Thanks