utils

Functions

calculate_results

evaluate_results

get_all_evidence_utterance_from_conversation

Iterate through a conversation history to let each utterance be the evidence utterance.

get_best_predictions

get_examples

Converts list of dict of train data to list of SquadExample

get_final_text

Project the tokenized prediction back to the original text.

lcs

load_examples

Convert list of examples to TensorDataset

parse_args_and_load_config

Get config from config file using argparser

squad_convert_examples_to_features

[summary]

to_list

truncate_to_max_length

Truncate length of SquadFeatures’ attributes

write_predictions

Write final predictions to the json file and log-odds of null if needed.

Classes

InputFeatures

A single set of features of data.

RawResult

RecconSpanExtractionData

Class to create torch Dataset instance, which is the required data type for Transformer’s Trainer