def load_mapping(match_filename):
    res = {}
    for ii in glob("%s*" % match_filename):
        for jj in codecs.open(ii, 'r', 'utf-8'):
            if jj.strip() == "":
                continue

            try:
                id, page = jj.split("\t", 1)
                id = int(id)
            except __HOLE__:
                page = ""
                id = int(jj)
            res[id] = page.strip()
    return res
dataset/ETHPy150Open Pinafore/qb/page_assignment/active_learning_for_matching.py/load_mapping