rajathravi
commited on
Commit
•
85132b3
1
Parent(s):
9fc37e8
Added utf-8 encoding to gszip open as STS17 has multilingual data
Browse filesThe data generator fails when we try to evaluate the STS17 benchmark across all languages. Hence, added utf-8 encoding to gszip open as STS17 has multilingual data.
sts17-crosslingual-sts.py
CHANGED
@@ -70,6 +70,6 @@ class STS17_CROSSLINGUAL(datasets.GeneratorBasedBuilder):
|
|
70 |
|
71 |
def _generate_examples(self, text_path):
|
72 |
"""Yields examples."""
|
73 |
-
with gzip.open(text_path,'rt') as f:
|
74 |
for i, line in enumerate(f):
|
75 |
yield i, json.loads(line)
|
|
|
70 |
|
71 |
def _generate_examples(self, text_path):
|
72 |
"""Yields examples."""
|
73 |
+
with gzip.open(text_path,'rt',encoding='utf-8') as f:
|
74 |
for i, line in enumerate(f):
|
75 |
yield i, json.loads(line)
|