:py:mod:`medcat.utils.ner` ========================== .. py:module:: medcat.utils.ner Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 deid/index.rst helpers/index.rst metrics/index.rst model/index.rst Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: medcat.utils.ner.metrics medcat.utils.ner.make_or_update_cdb .. py:function:: metrics(p, return_df=False, plus_recall=0, tokenizer=None, dataset=None, merged_negative={0, 1, -100}, padding_label=-100, csize=15, subword_label=1, verbose=False) TODO: This could be done better, for sure. But it works. .. py:function:: make_or_update_cdb(json_path, cdb = None, min_count = 0) 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. :param json_path: The json path :type json_path: str :param cdb: The CDB if present. Defaults to None. :type cdb: Optional[CDB] :param min_count: Minimum count to include. Defaults to 0. :type min_count: int :Returns: **CDB** -- The same or new CDB.