Datasets:
Commit
•
85045e0
1
Parent(s):
e4763e5
Update loading script
Browse files
universal_dependencies.py
CHANGED
@@ -393,8 +393,8 @@ _DESCRIPTIONS = {
|
|
393 |
"wo_wtb": "UD_Wolof-WTB is a natively manual developed treebank for Wolof. Sentences were collected from encyclopedic, fictional, biographical, religious texts and news.",
|
394 |
"yo_ytb": "Parts of the Yoruba Bible and of the Yoruba edition of Wikipedia, hand-annotated natively in Universal Dependencies.",
|
395 |
}
|
396 |
-
_DATA_URL = "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-3424/ud-treebanks-v2.7.tgz"
|
397 |
-
_DATA_URL = "data/ud-treebanks-v2.7.zip"
|
398 |
_PREFIX = "https://raw.githubusercontent.com/UniversalDependencies/"
|
399 |
_UD_DATASETS = {
|
400 |
"af_afribooms": {
|
@@ -1093,11 +1093,8 @@ class UniversalDependencies(datasets.GeneratorBasedBuilder):
|
|
1093 |
|
1094 |
def _split_generators(self, dl_manager):
|
1095 |
"""Returns SplitGenerators."""
|
1096 |
-
data_dir = dl_manager.download_and_extract(_DATA_URL)
|
1097 |
-
filepaths = {
|
1098 |
-
split: os.path.join(data_dir, "ud-treebanks-v2.7", path)
|
1099 |
-
for split, path in _UD_DATASETS[self.config.name].items()
|
1100 |
-
}
|
1101 |
return [
|
1102 |
datasets.SplitGenerator(name=datasets.Split(split), gen_kwargs={"filepath": filepaths[split]})
|
1103 |
for split in filepaths
|
|
|
393 |
"wo_wtb": "UD_Wolof-WTB is a natively manual developed treebank for Wolof. Sentences were collected from encyclopedic, fictional, biographical, religious texts and news.",
|
394 |
"yo_ytb": "Parts of the Yoruba Bible and of the Yoruba edition of Wikipedia, hand-annotated natively in Universal Dependencies.",
|
395 |
}
|
396 |
+
# _DATA_URL = "https://lindat.mff.cuni.cz/repository/xmlui/bitstream/handle/11234/1-3424/ud-treebanks-v2.7.tgz"
|
397 |
+
_DATA_URL = "data/ud-treebanks-v2.7/{config}.zip"
|
398 |
_PREFIX = "https://raw.githubusercontent.com/UniversalDependencies/"
|
399 |
_UD_DATASETS = {
|
400 |
"af_afribooms": {
|
|
|
1093 |
|
1094 |
def _split_generators(self, dl_manager):
|
1095 |
"""Returns SplitGenerators."""
|
1096 |
+
data_dir = dl_manager.download_and_extract(_DATA_URL.format(config=self.config.name))
|
1097 |
+
filepaths = {split: os.path.join(data_dir, path) for split, path in _UD_DATASETS[self.config.name].items()}
|
|
|
|
|
|
|
1098 |
return [
|
1099 |
datasets.SplitGenerator(name=datasets.Split(split), gen_kwargs={"filepath": filepaths[split]})
|
1100 |
for split in filepaths
|