Datasets:
Update sd-nlp-non-tokenized.py
Browse files- sd-nlp-non-tokenized.py +3 -2
sd-nlp-non-tokenized.py
CHANGED
@@ -49,6 +49,7 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
49 |
_SEMANTIC_SMALL_MOL_ROLES_LABEL_NAMES = ["O", "B-CONTROLLED_VAR", "I-CONTROLLED_VAR", "B-MEASURED_VAR", "I-MEASURED_VAR"]
|
50 |
_BORING_LABEL_NAMES = ["O", "B-BORING", "I-BORING"]
|
51 |
_PANEL_START_NAMES = ["O", "B-PANEL_START", "I-PANEL_START"]
|
|
|
52 |
|
53 |
_CITATION = """\
|
54 |
@Unpublished{
|
@@ -153,8 +154,8 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
153 |
{
|
154 |
"words": datasets.Sequence(feature=datasets.Value("string")),
|
155 |
"labels": datasets.Sequence(
|
156 |
-
feature=datasets.ClassLabel(num_classes=len(self.
|
157 |
-
names=self.
|
158 |
),
|
159 |
}
|
160 |
)
|
|
|
49 |
_SEMANTIC_SMALL_MOL_ROLES_LABEL_NAMES = ["O", "B-CONTROLLED_VAR", "I-CONTROLLED_VAR", "B-MEASURED_VAR", "I-MEASURED_VAR"]
|
50 |
_BORING_LABEL_NAMES = ["O", "B-BORING", "I-BORING"]
|
51 |
_PANEL_START_NAMES = ["O", "B-PANEL_START", "I-PANEL_START"]
|
52 |
+
_ROLES_NAMES = ["O", "B-CONTROLLED_VAR", "I-CONTROLLED_VAR", "B-MEASURED_VAR", "I-MEASURED_VAR"]
|
53 |
|
54 |
_CITATION = """\
|
55 |
@Unpublished{
|
|
|
154 |
{
|
155 |
"words": datasets.Sequence(feature=datasets.Value("string")),
|
156 |
"labels": datasets.Sequence(
|
157 |
+
feature=datasets.ClassLabel(num_classes=len(self._ROLES_NAMES),
|
158 |
+
names=self._ROLES_NAMES)
|
159 |
),
|
160 |
}
|
161 |
)
|