def create_duplicate_dictionary(duplicate_file):
    """Creates a lookup dictionary from the WaPo duplicates file

    Args:
        duplicate_file (file): WaPo duplicates file

    Returns:
        dict: duplicates lookup dictionary
    """
    dup_dict = {}
    data_dups = open(duplicate_file).readlines()
    for each in data_dups:
        idxs = each.strip().split(' ')  # source duplicate title
        if idxs[0] == idxs[1]:
            dup_dict[idxs[1]] = 2  # the duplicate has the same id as the original
        else:
            dup_dict[idxs[1]] = 1  # the duplicate has a different id from the original

    return dup_dict