Datasets:
Tasks:
Text Classification
Sub-tasks:
multi-class-classification
Languages:
English
Size:
100K<n<1M
ArXiv:
Tags:
relation extraction
License:
Move manual dir check to the top of the _split_generators method
Browse filesThe idea is that the manual download instructions would be displayed instead of the generic DatasetViewer is disabled message
tacred.py
CHANGED
|
@@ -313,12 +313,6 @@ class Tacred(datasets.GeneratorBasedBuilder):
|
|
| 313 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
|
| 314 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
| 315 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 316 |
-
patch_files = {}
|
| 317 |
-
if self.config.name == "revisited":
|
| 318 |
-
patch_files = dl_manager.download_and_extract(_PATCH_URLs)
|
| 319 |
-
elif self.config.name == "re-tacred":
|
| 320 |
-
patch_files = dl_manager.download_and_extract(_RETACRED_PATCH_URLs)
|
| 321 |
-
|
| 322 |
data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
|
| 323 |
|
| 324 |
if not os.path.exists(data_dir):
|
|
@@ -328,6 +322,12 @@ class Tacred(datasets.GeneratorBasedBuilder):
|
|
| 328 |
)
|
| 329 |
)
|
| 330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
return [
|
| 332 |
datasets.SplitGenerator(
|
| 333 |
name=datasets.Split.TRAIN,
|
|
|
|
| 313 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
|
| 314 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
| 315 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
|
| 317 |
|
| 318 |
if not os.path.exists(data_dir):
|
|
|
|
| 322 |
)
|
| 323 |
)
|
| 324 |
|
| 325 |
+
patch_files = {}
|
| 326 |
+
if self.config.name == "revisited":
|
| 327 |
+
patch_files = dl_manager.download_and_extract(_PATCH_URLs)
|
| 328 |
+
elif self.config.name == "re-tacred":
|
| 329 |
+
patch_files = dl_manager.download_and_extract(_RETACRED_PATCH_URLs)
|
| 330 |
+
|
| 331 |
return [
|
| 332 |
datasets.SplitGenerator(
|
| 333 |
name=datasets.Split.TRAIN,
|