Datasets:
Update
Browse files- ELRC-Medical-V2.py +7 -3
ELRC-Medical-V2.py
CHANGED
@@ -37,7 +37,11 @@ _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 = {
|
|
|
|
|
|
|
|
|
41 |
|
42 |
# _URL = "https://raw.githubusercontent.com/qanastek/ELRC-Medical-V2/main/csv_corpus/"
|
43 |
|
@@ -76,7 +80,7 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
|
|
76 |
datasets.SplitGenerator(
|
77 |
name=datasets.Split.TRAIN,
|
78 |
gen_kwargs={
|
79 |
-
"filepath": data_dir[
|
80 |
"split": "train",
|
81 |
}
|
82 |
),
|
@@ -87,7 +91,7 @@ class ELRC_Medical_V2(datasets.GeneratorBasedBuilder):
|
|
87 |
|
88 |
logger.info("⏳ Generating examples from = %s", filepath)
|
89 |
|
90 |
-
with open(filepath, encoding="utf-8") as f:
|
91 |
|
92 |
for id_, row in enumerate(csv.reader(f, delimiter=',')):
|
93 |
|
|
|
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 = {
|
41 |
+
"train": {
|
42 |
+
lang : "https://huggingface.co/datasets/qanastek/ELRC-Medical-V2/raw/main/csv/" + lang + ".csv" for lang in _LANGUAGE_PAIRS
|
43 |
+
}
|
44 |
+
}
|
45 |
|
46 |
# _URL = "https://raw.githubusercontent.com/qanastek/ELRC-Medical-V2/main/csv_corpus/"
|
47 |
|
|
|
80 |
datasets.SplitGenerator(
|
81 |
name=datasets.Split.TRAIN,
|
82 |
gen_kwargs={
|
83 |
+
"filepath": data_dir["train"],
|
84 |
"split": "train",
|
85 |
}
|
86 |
),
|
|
|
91 |
|
92 |
logger.info("⏳ Generating examples from = %s", filepath)
|
93 |
|
94 |
+
with open(filepath[self.config.name], encoding="utf-8") as f:
|
95 |
|
96 |
for id_, row in enumerate(csv.reader(f, delimiter=',')):
|
97 |
|