path bug fixed
Browse files- CoarseWSD-20.py +6 -1
CoarseWSD-20.py
CHANGED
@@ -40,7 +40,12 @@ class CWSD20(datasets.GeneratorBasedBuilder):
|
|
40 |
BUILDER_CONFIGS = [datasets.BuilderConfig(name=word, description=_DESCRIPTION) for word in _WORDS]
|
41 |
|
42 |
def _info(self):
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
cmap = json.load(cmap_f)
|
45 |
label_classes = [cmap[str(k)] for k in range(len(cmap))]
|
46 |
|
|
|
40 |
BUILDER_CONFIGS = [datasets.BuilderConfig(name=word, description=_DESCRIPTION) for word in _WORDS]
|
41 |
|
42 |
def _info(self):
|
43 |
+
dl_manager = datasets.DownloadManager()
|
44 |
+
cmap_path = dl_manager.download_and_extract(
|
45 |
+
url_or_urls=os.path.join(_URL, self.config.name,
|
46 |
+
"classes_map.txt")
|
47 |
+
)
|
48 |
+
with open(cmap_path) as cmap_f:
|
49 |
cmap = json.load(cmap_f)
|
50 |
label_classes = [cmap[str(k)] for k in range(len(cmap))]
|
51 |
|