Update fdner.py
Browse files
fdner.py
CHANGED
|
@@ -105,4 +105,18 @@ class fdner(datasets.GeneratorBasedBuilder):
|
|
| 105 |
citation=_CITATION,
|
| 106 |
)
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
|
|
|
| 105 |
citation=_CITATION,
|
| 106 |
)
|
| 107 |
|
| 108 |
+
def _split_generators(self, dl_manager):
|
| 109 |
+
"""Returns SplitGenerators."""
|
| 110 |
+
downloaded_file = dl_manager.download_and_extract(_URL)
|
| 111 |
+
data_files = {
|
| 112 |
+
"train": os.path.join(downloaded_file, _TRAINING_FILE),
|
| 113 |
+
"dev": os.path.join(downloaded_file, _DEV_FILE),
|
| 114 |
+
"test": os.path.join(downloaded_file, _TEST_FILE),
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
return [
|
| 118 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_files["train"]}),
|
| 119 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": data_files["dev"]}),
|
| 120 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": data_files["test"]}),
|
| 121 |
+
]
|
| 122 |
|