medcat.components.ner.trf.helpers
Functions:
-
make_or_update_cdb–Creates a new CDB or updates an existing one with new
-
replace_entities_in_text–
make_or_update_cdb
Creates a new CDB or updates an existing one with new concepts if the cdb argument is provided. All concepts that are less frequent than min_count will be ignored.
Parameters:
-
(json_pathstr) –The json path
-
(cdbOptional[CDB], default:None) –The CDB if present. Defaults to None.
-
(min_countint, default:0) –Minimum count to include. Defaults to 0.
Returns:
-
CDB(CDB) –The same or new CDB.
Source code in medcat-v2/medcat/components/ner/trf/helpers.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
replace_entities_in_text
replace_entities_in_text(text: str, entities: Dict, get_cui_name: Callable[[str], str], redact: bool = False) -> str
Source code in medcat-v2/medcat/components/ner/trf/helpers.py
10 11 12 13 14 15 16 17 18 19 20 | |