Jon Gauthier
commited on
Commit
·
07dd735
1
Parent(s):
2b3c98b
improve punctuation rendering (no extraneous spaces)
Browse files- syntaxgym.py +1 -1
syntaxgym.py
CHANGED
@@ -42,7 +42,7 @@ def condition_to_string(cond):
|
|
42 |
ret = " ".join([region["content"].lstrip()
|
43 |
for region in cond["regions"]
|
44 |
if region["content"].strip() != ""])
|
45 |
-
ret = re.sub(r"\s
|
46 |
|
47 |
return ret
|
48 |
|
|
|
42 |
ret = " ".join([region["content"].lstrip()
|
43 |
for region in cond["regions"]
|
44 |
if region["content"].strip() != ""])
|
45 |
+
ret = re.sub(r"\s+([.,])", r"\1", ret)
|
46 |
|
47 |
return ret
|
48 |
|