Update
Browse files- metrics.py +2 -2
- puzzles_cleaned.csv +2 -2
- results.duckdb +2 -2
metrics.py
CHANGED
@@ -21,7 +21,7 @@ def _parse_answer(text: str) -> List[List[str]]:
|
|
21 |
alternatives = re.split(r';', text)
|
22 |
result = [ ]
|
23 |
for alternative in alternatives:
|
24 |
-
groups = re.split(r'
|
25 |
result.append([" ".join(re.findall(r'\b\w+\b', group)) for group in groups])
|
26 |
return result
|
27 |
|
@@ -42,7 +42,7 @@ def _check_answer(completion: str, answer: str) -> bool:
|
|
42 |
"""
|
43 |
completion = _answer_without_thoughts(completion).lower()
|
44 |
completion = re.sub(r'[^\w\s]', ' ', completion) # this replaces punctuations with space, aligning with the _parse_answer function's ' '.join
|
45 |
-
completion = re.sub(r'
|
46 |
alternative_answers = _parse_answer(answer)
|
47 |
for answer_phrases in alternative_answers:
|
48 |
# if all(phrase in completion for phrase in answer_phrases):
|
|
|
21 |
alternatives = re.split(r';', text)
|
22 |
result = [ ]
|
23 |
for alternative in alternatives:
|
24 |
+
groups = re.split(r'–?-?-?>|,', alternative)
|
25 |
result.append([" ".join(re.findall(r'\b\w+\b', group)) for group in groups])
|
26 |
return result
|
27 |
|
|
|
42 |
"""
|
43 |
completion = _answer_without_thoughts(completion).lower()
|
44 |
completion = re.sub(r'[^\w\s]', ' ', completion) # this replaces punctuations with space, aligning with the _parse_answer function's ' '.join
|
45 |
+
completion = re.sub(r'\s+', ' ', completion) # normalize consecutive (Unicode) spaces to finish aligning with _parse_answer
|
46 |
alternative_answers = _parse_answer(answer)
|
47 |
for answer_phrases in alternative_answers:
|
48 |
# if all(phrase in completion for phrase in answer_phrases):
|
puzzles_cleaned.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0a97676e6cfc842a0fe5cd0999a16c6523e71ef0692b125cd426cff963eabc1a
|
3 |
+
size 1117498
|
results.duckdb
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:569fd5c2d797ed702e5d2551bc6a9d4d54df78481ee016bc9ee07767361525b8
|
3 |
+
size 137637888
|