Skip to content

Commit

Permalink
Log output
Browse files Browse the repository at this point in the history
  • Loading branch information
phlobo committed Dec 5, 2024
1 parent a5b0969 commit 818fdee
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions run_snomed_german_recommender.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@

from utils import handle_dates

from transformers import logging as tf_logging
import logging

logging.basicConfig(level=logging.INFO)
tf_logging.set_verbosity_info()

class xMENSNOMEDLinker(Classifier):
def __init__(self, linker: EntityLinker, top_k = 3):
self.linker = linker
Expand All @@ -36,8 +30,7 @@ def predict(self, cas: Cas, layer: str, feature: str, project_id: str, document_
# TODO: support re-ranking (see GraSCCo_Evaluation.ipynb)

for anno, pred in zip(annos, preds):
for concept in pred['normalized'][0:self.top_k]:
print(concept)
for concept in pred['normalized'][0:self.top_k]:
sctid = concept['db_id']
score = concept['score']
prediction = create_span_prediction(cas, layer, feature, anno.begin, anno.end, f"http://snomed.info/id/{sctid}", score=score)
Expand Down

0 comments on commit 818fdee

Please sign in to comment.