data path changed
Browse files- CoarseWSD-20.py +12 -5
CoarseWSD-20.py
CHANGED
@@ -25,17 +25,23 @@ from training), both quantitavely and qualitatively.
|
|
25 |
path = "data/apple/train.data.txt"
|
26 |
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
|
30 |
|
31 |
class CWSD20(datasets.GeneratorBasedBuilder):
|
32 |
-
"""TODO
|
33 |
|
34 |
-
# TODO
|
35 |
VERSION = datasets.Version("1.0.0")
|
36 |
|
|
|
|
|
37 |
def _info(self):
|
38 |
-
#
|
39 |
return datasets.DatasetInfo(
|
40 |
# This is the description that will appear on the datasets page.
|
41 |
description=_DESCRIPTION,
|
@@ -44,7 +50,8 @@ class CWSD20(datasets.GeneratorBasedBuilder):
|
|
44 |
{
|
45 |
"idx": datasets.Value("int32"),
|
46 |
"sentence": datasets.Value("string"),
|
47 |
-
|
|
|
48 |
# "idx": datasets.Value("int32"),
|
49 |
# "word": datasets.Value("string"),
|
50 |
# "start1": datasets.Value("int32"),
|
|
|
25 |
path = "data/apple/train.data.txt"
|
26 |
|
27 |
|
28 |
+
_WORDS = ["apple", "arm", "bank", "bass",
|
29 |
+
"bow", "chair", "club", "crane",
|
30 |
+
"deck", "digit", "hood", "java",
|
31 |
+
"mole", "pitcher", "pound", "seal",
|
32 |
+
"spring", "square", "trunk", "yard"]
|
33 |
|
34 |
|
35 |
class CWSD20(datasets.GeneratorBasedBuilder):
|
36 |
+
"""TODO: Short description of my dataset."""
|
37 |
|
38 |
+
# TODO: Set up version.
|
39 |
VERSION = datasets.Version("1.0.0")
|
40 |
|
41 |
+
BUILDER_CONFIGS = [datasets.BuilderConfig(name=word, description=_DESCRIPTION) for word in _WORDS]
|
42 |
+
|
43 |
def _info(self):
|
44 |
+
# Specifies the datasets.DatasetInfo object
|
45 |
return datasets.DatasetInfo(
|
46 |
# This is the description that will appear on the datasets page.
|
47 |
description=_DESCRIPTION,
|
|
|
50 |
{
|
51 |
"idx": datasets.Value("int32"),
|
52 |
"sentence": datasets.Value("string"),
|
53 |
+
# datasets.features.ClassLabel(names=self.config.label_classes)
|
54 |
+
# "label": datasets.Value("int32")
|
55 |
# "idx": datasets.Value("int32"),
|
56 |
# "word": datasets.Value("string"),
|
57 |
# "start1": datasets.Value("int32"),
|