Skip to content

Commit

Permalink
CU-8694ezhrn: Propgate keeping raw option properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mart-r committed Apr 30, 2024
1 parent fd29bfe commit dd2c559
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions medcat/compare_models/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ def _get_pt2ch(cat: CAT) -> Optional[Dict]:


def get_per_annotation_diffs(cat1: CAT, cat2: CAT, documents: Iterator[Tuple[str, str]],
show_progress: bool = True) -> PerAnnotationDifferences:
show_progress: bool = True,
keep_raw: bool = True,
) -> PerAnnotationDifferences:
pt2ch1: Optional[Dict] = _get_pt2ch(cat1)
pt2ch2: Optional[Dict] = _get_pt2ch(cat2)
pad = PerAnnotationDifferences(pt2ch1=pt2ch1, pt2ch2=pt2ch2,
model1_cuis=set(cat1.cdb.cui2names),
model2_cuis=set(cat2.cdb.cui2names))
model2_cuis=set(cat2.cdb.cui2names),
keep_raw=keep_raw)
for doc_id, doc in tqdm.tqdm(documents, disable=not show_progress):
pad.look_at_doc(cat1.get_entities(doc), cat2.get_entities(doc), doc_id, doc)
pad.finalise()
Expand Down

0 comments on commit dd2c559

Please sign in to comment.