Datasets:
Update NorSumm.py
Browse files- NorSumm.py +3 -4
NorSumm.py
CHANGED
|
@@ -67,17 +67,16 @@ class NorSumm(datasets.GeneratorBasedBuilder):
|
|
| 67 |
# download and extract URLs
|
| 68 |
urls_to_download = _URLS
|
| 69 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 70 |
-
|
| 71 |
-
|
| 72 |
return [
|
| 73 |
-
datasets.SplitGenerator(name=datasets.Split.
|
| 74 |
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
| 75 |
]
|
| 76 |
|
| 77 |
def _generate_examples(self, filepath):
|
| 78 |
"""Yields examples."""
|
| 79 |
print(filepath)
|
| 80 |
-
with open(filepath, 'r') as f:
|
| 81 |
norsumm = json.load(f)
|
| 82 |
print(norsumm)
|
| 83 |
for example in norsumm:
|
|
|
|
| 67 |
# download and extract URLs
|
| 68 |
urls_to_download = _URLS
|
| 69 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 70 |
+
|
|
|
|
| 71 |
return [
|
| 72 |
+
datasets.SplitGenerator(name=datasets.Split.DEV, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
| 73 |
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
| 74 |
]
|
| 75 |
|
| 76 |
def _generate_examples(self, filepath):
|
| 77 |
"""Yields examples."""
|
| 78 |
print(filepath)
|
| 79 |
+
with open(filepath, 'r', encoding="utf-8") as f:
|
| 80 |
norsumm = json.load(f)
|
| 81 |
print(norsumm)
|
| 82 |
for example in norsumm:
|