Datasets:
Commit
•
fda8ada
1
Parent(s):
9fc37e8
Added utf-8 encoding to gszip open as STS17 has multilingual data (#2)
Browse files- Added utf-8 encoding to gszip open as STS17 has multilingual data (85132b3c0debc3d52d73d327bd9bc8238709dd57)
Co-authored-by: Rajath Kumar Ravi <rajathravi@users.noreply.huggingface.co>
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)
|