Unverified Commit a1782f9a authored by Leymore's avatar Leymore Committed by GitHub
Browse files

[Fix] triviaqa & nq postprocess (#350)

parent ce65d339
......@@ -44,7 +44,7 @@ class NQEvaluator(BaseEvaluator):
}
processed_predictions = []
for prediction in predictions:
prediction = prediction.split('\n')[0].lower()
prediction = prediction.strip().split('\n')[0].lower()
if 'answer is' in prediction:
prediction = prediction.split('answer is')[-1]
prediction = general_postprocess(prediction)
......
......@@ -43,7 +43,7 @@ class TriviaQAEvaluator(BaseEvaluator):
}
processed_predictions = []
for prediction in predictions:
prediction = prediction.split('\n')[0].lower()
prediction = prediction.strip().split('\n')[0].lower()
if 'answer is' in prediction:
prediction = prediction.split('answer is')[-1]
prediction = general_postprocess(prediction)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment