def generate_features_to_numbers(dataset, sanitized_directory):
    """
    Generate pos and dep type to number dictionary.
    """
    with open(sanitized_directory + dataset + '/sanitized_pos.txt', 'r') as file_p:
        pos_list = file_p.read().split('\n')
        num_to_pos = dict(zip(pos_list, range(len(pos_list))))
    with open(sanitized_directory + dataset + '/sanitized_dep_type.txt', 'r') as file_p:
        dep_type_list = file_p.read().split('\n')
        num_to_dep_type = dict(zip(dep_type_list, range(len(dep_type_list))))

    return num_to_pos, num_to_dep_type