:py:mod:`medcat.utils.regression.editing` ========================================= .. py:module:: medcat.utils.regression.editing Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: medcat.utils.regression.editing.combine_dicts medcat.utils.regression.editing.combine_contents medcat.utils.regression.editing.combine_yamls Attributes ~~~~~~~~~~ .. autoapisummary:: medcat.utils.regression.editing.logger .. py:data:: logger .. py:function:: combine_dicts(base_dict, add_dict, in_place = False, ignore_identicals = True) Combine two dictionaries that define RegressionCheckers. The idea is to combine them into one that defines cases from both. If two cases have identical filters, their phrases are combined. If an additional case has the same name as one in the base dict, its name is changed before adding it. :param base_dict: The base dict to which we shall add :type base_dict: dict :param add_dict: The additional dict :type add_dict: dict :param in_place: Whether or not to modify the existing (base) dict. Defaults to False. :type in_place: bool :param ignore_identicals: Whether to ignore identical cases (otherwise they get duplicated). Defaults to True. :type ignore_identicals: bool :Returns: **dict** -- The combined dict .. py:function:: combine_contents(base_yaml, add_yaml, ignore_identicals = True) Combined the contents of two yaml strings that describe RegressionCheckers. This method simply loads in teh yamls and uses the `combine_dicts` method. :param base_yaml: The yaml of the base checker :type base_yaml: str :param add_yaml: The yaml of the additional checker :type add_yaml: str :param ignore_identicals: Whether or not to ignore identical cases. Defaults to True. :type ignore_identicals: bool :Returns: **str** -- The combined yaml contents .. py:function:: combine_yamls(base_file, add_file, new_file = None, ignore_identicals = True) Combined the contents of two yaml files that describe RegressionCheckers. This method simply reads the data and uses the `combined_contents` method. The results are saved into the new_file (if specified) or to the base_file otherwise. :param base_file: The base file :type base_file: str :param add_file: The additional file :type add_file: str :param new_file: The new file name. Defaults to None. :type new_file: Optional[str] :param ignore_identicals: Whether or not to ignore identical cases. Defaults to True. :type ignore_identicals: bool :Returns: **str** -- The new file name