import json


def read_gold_standard(json_path):
    """Reads the reference list from a json file

    Args:
        json_path: The path to the json file containing the gold reference list.

    Returns:
        A dict of source to target terms as a set.

    """
    with open(json_path) as gs:
        data = json.load(gs)
        return {key: val for key, val in map(lambda t: [t['source'], set(t['targets'])], data['terms'])}