evaluate-v1.1.py 543 Bytes
Newer Older
Pan,Huiwen's avatar
Pan,Huiwen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import argparse
import json
import evaluate as eval

if __name__ == '__main__':
    expected_version = '1.1'
    parser = argparse.ArgumentParser(description='Evaluation for SQuAD ' +
                                     expected_version)
    parser.add_argument('dataset_file', help='Dataset file')
    parser.add_argument('prediction_file', help='Prediction File')
    args = parser.parse_args()

    print(
        json.dumps(
            eval.evaluate(expected_version, args.dataset_file,
                          args.prediction_file)))