Datasets:
Commit
·
7bcc487
1
Parent(s):
1c6e67a
Update open-license-corpus.py
Browse files- open-license-corpus.py +1 -1
open-license-corpus.py
CHANGED
@@ -106,7 +106,7 @@ class OpenLicenseCorpus(datasets.GeneratorBasedBuilder):
|
|
106 |
for subset in filepaths:
|
107 |
for path in filepaths[subset]:
|
108 |
logger.info("generating examples from = %s", path)
|
109 |
-
with gzip.open(open(
|
110 |
for line in f:
|
111 |
if line:
|
112 |
example = json.loads(line)
|
|
|
106 |
for subset in filepaths:
|
107 |
for path in filepaths[subset]:
|
108 |
logger.info("generating examples from = %s", path)
|
109 |
+
with gzip.open(open(path, "rb"), "rt", encoding="utf-8") as f:
|
110 |
for line in f:
|
111 |
if line:
|
112 |
example = json.loads(line)
|