path bug fixed
Browse files- CoarseWSD-20.py +20 -11
CoarseWSD-20.py
CHANGED
@@ -67,19 +67,28 @@ class CWSD20(datasets.GeneratorBasedBuilder):
|
|
67 |
|
68 |
def _split_generators(self, dl_manager):
|
69 |
"""Returns SplitGenerators."""
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
return [datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
80 |
-
gen_kwargs={"ex":
|
81 |
datasets.SplitGenerator(name=datasets.Split.TEST,
|
82 |
-
gen_kwargs={"ex":
|
83 |
|
84 |
def _generate_examples(self, ex, lb):
|
85 |
"""Yields examples."""
|
|
|
67 |
|
68 |
def _split_generators(self, dl_manager):
|
69 |
"""Returns SplitGenerators."""
|
70 |
+
dl = {
|
71 |
+
"train_ex":dl_manager.download_and_extract(
|
72 |
+
url_or_urls=os.path.join(_URL, self.config.name,
|
73 |
+
"train.data.txt")
|
74 |
+
),
|
75 |
+
"train_lb":dl_manager.download_and_extract(
|
76 |
+
url_or_urls=os.path.join(_URL, self.config.name,
|
77 |
+
"train.gold.txt")
|
78 |
+
),
|
79 |
+
"test_ex":dl_manager.download_and_extract(
|
80 |
+
url_or_urls=os.path.join(_URL, self.config.name,
|
81 |
+
"test.data.txt")
|
82 |
+
),
|
83 |
+
"test_lb":dl_manager.download_and_extract(
|
84 |
+
url_or_urls=os.path.join(_URL, self.config.name,
|
85 |
+
"test.gold.txt")
|
86 |
+
)
|
87 |
+
}
|
88 |
return [datasets.SplitGenerator(name=datasets.Split.TRAIN,
|
89 |
+
gen_kwargs={"ex": dl["train_ex"], "lb":dl["train_lb"] }),
|
90 |
datasets.SplitGenerator(name=datasets.Split.TEST,
|
91 |
+
gen_kwargs={"ex": dl["test_ex"], "lb":dl["test_lb"] })]
|
92 |
|
93 |
def _generate_examples(self, ex, lb):
|
94 |
"""Yields examples."""
|