:py:mod:`medcat.utils.cdb_utils` ================================ .. py:module:: medcat.utils.cdb_utils Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: medcat.utils.cdb_utils.merge_cdb Attributes ~~~~~~~~~~ .. autoapisummary:: medcat.utils.cdb_utils.logger .. py:data:: logger .. py:function:: merge_cdb(cdb1, cdb2, overwrite_training = 0, full_build = False) Merge two CDB's together to produce a new, single CDB. The contents of inputs CDBs will not be changed. `addl_info` can not be perfectly merged, and will prioritise cdb1. see `full_build` :param cdb1: The first medcat cdb to merge. In cases where merging isn't suitable isn't ideal (such as cui2preferred_name), this cdb values will be prioritised over cdb2. :type cdb1: CDB :param cdb2: The second medcat cdb to merge. :type cdb2: CDB :param overwrite_training: Choose to prioritise a CDB's context vectors values over merging gracefully. 0 - no prio, 1 - CDB1, 2 - CDB2 :type overwrite_training: int :param full_build: Add additional information from "addl_info" dicts "cui2ontologies" and "cui2description" :type full_build: bool :Returns: **CDB** -- The merged CDB.