Datasets:
schen149
commited on
Commit
•
bac7667
1
Parent(s):
0a2c2eb
updating dataset loader
Browse files- propsegment.py +1 -1
propsegment.py
CHANGED
@@ -163,7 +163,7 @@ class PropSegment(datasets.GeneratorBasedBuilder):
|
|
163 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
164 |
def _generate_examples(self, filepath, split):
|
165 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
166 |
-
with open(filepath
|
167 |
for key, row in enumerate(f):
|
168 |
data = json.loads(row)
|
169 |
if self.config.name == "segmentation":
|
|
|
163 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
164 |
def _generate_examples(self, filepath, split):
|
165 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
166 |
+
with open(filepath, encoding="utf-8") as f:
|
167 |
for key, row in enumerate(f):
|
168 |
data = json.loads(row)
|
169 |
if self.config.name == "segmentation":
|