# Path: pydmrs/_exceptions.py
# class PydmrsTypeError(PydmrsError, TypeError):
#     pass


from pydmrs._exceptions import PydmrsTypeError
    from pydmrs.matching.general_matching import Match


def get_recall(match, dmrs):
    if isinstance(match, list) and isinstance(match[0], Match):
        raise PydmrsTypeError("More than one match passed in an argument.")
    return len(match) / (len(dmrs.nodes) + len(dmrs.links))


def get_fscore(match, dmrs):
    # Precision always 1.0. for this algorithm.
    recall = get_recall(match, dmrs)
    return 2 * recall / (1.0 + recall)



# Path: pydmrs/_exceptions.py
# class PydmrsTypeError(PydmrsError, TypeError):
#     pass


# Path: pydmrs/matching/match_evaluation.py
from pydmrs._exceptions import PydmrsTypeError
    from pydmrs.matching.general_matching import Match



def get_recall(match, dmrs):
    if isinstance(match, list) and isinstance(match[0], Match):
        raise PydmrsTypeError("More than one match passed in an argument.")
    return len(match) / (len(dmrs.nodes) + len(dmrs.links))


def get_fscore(match, dmrs):
    # Precision always 1.0. for this algorithm.
    recall = get_recall(match, dmrs)
    return 2 * recall / (1.0 + recall)



def get_missing_elements(match, dmrs):