Datasets:
Update
Browse files- ELRC-Medical-V2.py +6 -5
ELRC-Medical-V2.py
CHANGED
@@ -31,15 +31,16 @@ _CITATION = """
|
|
31 |
}
|
32 |
"""
|
33 |
|
34 |
-
_URL = "https://huggingface.co/datasets/qanastek/ELRC-Medical-V2/raw/main/csv.zip"
|
35 |
-
# _URL = "https://raw.githubusercontent.com/qanastek/ELRC-Medical-V2/main/csv_corpus/"
|
36 |
-
|
37 |
_LANGUAGE_PAIRS = ["en-" + lang for lang in ["bg", "cs", "da", "de", "el", "es", "et", "fi", "fr", "ga", "hr", "hu", "it", "lt", "lv", "mt", "nl", "pl", "pt", "ro", "sk", "sl", "sv"]]
|
38 |
|
39 |
_LICENSE = """
|
40 |
This work is licensed under a <a rel="license" href="https://elrc-share.eu/static/metashare/licences/CC-BY-4.0.pdf">Attribution 4.0 International (CC BY 4.0) License</a>.
|
41 |
"""
|
42 |
|
|
|
|
|
|
|
|
|
43 |
_DESCRIPTION = "No description"
|
44 |
|
45 |
class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
|
@@ -69,13 +70,13 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
|
|
69 |
def _split_generators(self, dl_manager):
|
70 |
|
71 |
# Download the CSV
|
72 |
-
data_dir = dl_manager.
|
73 |
|
74 |
return [
|
75 |
datasets.SplitGenerator(
|
76 |
name=datasets.Split.TRAIN,
|
77 |
gen_kwargs={
|
78 |
-
"filepath":
|
79 |
"split": "train",
|
80 |
}
|
81 |
),
|
|
|
31 |
}
|
32 |
"""
|
33 |
|
|
|
|
|
|
|
34 |
_LANGUAGE_PAIRS = ["en-" + lang for lang in ["bg", "cs", "da", "de", "el", "es", "et", "fi", "fr", "ga", "hr", "hu", "it", "lt", "lv", "mt", "nl", "pl", "pt", "ro", "sk", "sl", "sv"]]
|
35 |
|
36 |
_LICENSE = """
|
37 |
This work is licensed under a <a rel="license" href="https://elrc-share.eu/static/metashare/licences/CC-BY-4.0.pdf">Attribution 4.0 International (CC BY 4.0) License</a>.
|
38 |
"""
|
39 |
|
40 |
+
_URLS = [{lang : "https://huggingface.co/datasets/qanastek/ELRC-Medical-V2/raw/main/csv/" + lang + ".csv"} for lang in _LANGUAGE_PAIRS]
|
41 |
+
|
42 |
+
# _URL = "https://raw.githubusercontent.com/qanastek/ELRC-Medical-V2/main/csv_corpus/"
|
43 |
+
|
44 |
_DESCRIPTION = "No description"
|
45 |
|
46 |
class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
|
|
|
70 |
def _split_generators(self, dl_manager):
|
71 |
|
72 |
# Download the CSV
|
73 |
+
data_dir = dl_manager.download(_URLS)
|
74 |
|
75 |
return [
|
76 |
datasets.SplitGenerator(
|
77 |
name=datasets.Split.TRAIN,
|
78 |
gen_kwargs={
|
79 |
+
"filepath": data_dir[self.config.name],
|
80 |
"split": "train",
|
81 |
}
|
82 |
),
|