dureader¶
Official evaluation script for SQuAD version 2.0.
In addition to basic functionality, we also compute additional statistics and plot precision-recall curves if an additional na_prob.json file is provided. This file is expected to map question ID's to the model's predicted probability that a question is unanswerable.
-
compute_predictions
(all_examples, all_features, all_results, n_best_size, max_answer_length, do_lower_case, verbose, tokenizer)[源代码]¶ Write final predictions to the json file and log-odds of null if needed.