Commit 71d3655b authored by Björn Bebensee's avatar Björn Bebensee
Browse files

Changed whitespace fix to match existing evaluation code

parent 9e5acd1d
......@@ -98,7 +98,7 @@ class NQOpen(Task):
answers = [answer.lower().translate(str.maketrans('', '', string.punctuation)) for answer in doc["answer"]]
# remove duplicate whitespace
continuation = re.sub(' +', ' ', continuation)
continuation = " ".join(continuation.split())
# remove articles
continuation = re.sub('(\s+)(a|an|the)(\s+)', ' ', continuation)
......
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