def is_match(annotation, truth):
    """Checks whether annotations from the system and ground truth overlap.
    """
    return (annotation['start'] <= truth['startIndex']
            and annotation['end'] > truth['startIndex']) or (
                truth['startIndex'] <= annotation['start']
                and truth['endIndex'] > annotation['start'])