allennlp.common.squad_eval

Official evaluation script for v1.1 of the SQuAD dataset.

allennlp.common.squad_eval.evaluate(dataset, predictions)[source]
allennlp.common.squad_eval.exact_match_score(prediction, ground_truth)[source]
allennlp.common.squad_eval.f1_score(prediction, ground_truth)[source]
allennlp.common.squad_eval.metric_max_over_ground_truths(metric_fn, prediction, ground_truths)[source]
allennlp.common.squad_eval.normalize_answer(s)[source]

Lower text and remove punctuation, articles and extra whitespace.