Commit
·
a44e683
1
Parent(s):
26f0f37
fix imports
Browse files
cdcp.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
"""The Cornell eRulemaking Corpus (CDCP) dataset for English Argumentation Mining."""
|
| 2 |
import glob
|
| 3 |
import json
|
|
|
|
| 4 |
from pathlib import Path
|
| 5 |
|
| 6 |
import datasets
|
|
@@ -97,8 +98,8 @@ class CDCP(datasets.GeneratorBasedBuilder):
|
|
| 97 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 98 |
|
| 99 |
if dl_manager.manual_dir is not None:
|
| 100 |
-
base_path =
|
| 101 |
-
if not
|
| 102 |
base_path = dl_manager.extract(base_path)
|
| 103 |
else:
|
| 104 |
base_path = dl_manager.download_and_extract(_URL)
|
|
|
|
| 1 |
"""The Cornell eRulemaking Corpus (CDCP) dataset for English Argumentation Mining."""
|
| 2 |
import glob
|
| 3 |
import json
|
| 4 |
+
from os.path import abspath, isdir
|
| 5 |
from pathlib import Path
|
| 6 |
|
| 7 |
import datasets
|
|
|
|
| 98 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 99 |
|
| 100 |
if dl_manager.manual_dir is not None:
|
| 101 |
+
base_path = abspath(dl_manager.manual_dir)
|
| 102 |
+
if not isdir(base_path):
|
| 103 |
base_path = dl_manager.extract(base_path)
|
| 104 |
else:
|
| 105 |
base_path = dl_manager.download_and_extract(_URL)
|