Functions | |
def | normalize_answer (s) |
def | f1_score (prediction, ground_truth) |
def | exact_match_score (prediction, ground_truth) |
def | metric_max_over_ground_truths (metric_fn, prediction, ground_truths) |
def | evaluate (dataset, predictions, f1_acc) |
Variables | |
string | expected_version = '1.1' |
parser | |
help | |
args = parser.parse_args() | |
dataset_json = json.load(dataset_file) | |
file | |
dataset = dataset_json['data'] | |
predictions = json.load(prediction_file) | |
f1_acc = float(args.f1_acc) | |
def evaluate-v1.normalize_answer | ( | s | ) |
Lower text and remove punctuation, articles and extra whitespace.
def evaluate-v1.f1_score | ( | prediction, | |
ground_truth | |||
) |
def evaluate-v1.exact_match_score | ( | prediction, | |
ground_truth | |||
) |
def evaluate-v1.metric_max_over_ground_truths | ( | metric_fn, | |
prediction, | |||
ground_truths | |||
) |
def evaluate-v1.evaluate | ( | dataset, | |
predictions, | |||
f1_acc | |||
) |
string evaluate-v1.expected_version = '1.1' |
evaluate-v1.parser |
evaluate-v1.help |
evaluate-v1.args = parser.parse_args() |
evaluate-v1.dataset_json = json.load(dataset_file) |
evaluate-v1.file |
evaluate-v1.dataset = dataset_json['data'] |
evaluate-v1.predictions = json.load(prediction_file) |
evaluate-v1.f1_acc = float(args.f1_acc) |