def load_entity_freq_map(path_to_map):
    """
    Load the map of entity frequencies from a file.

    :param path_to_map: location of the map file
    :return: entity map as a dictionary
    >>> load_entity_freq_map("../resources/wikidata_entity_freqs.map")['Q76']
    7070
    """
    return_map = {}
    with open(path_to_map, encoding="utf-8") as f:
        for l in f.readlines():
            k = l.strip().split("\t")
            return_map[k[0]] = int(k[1])
    return return_map