Datasets:
Update sd-character-level-ner.py
Browse files
sd-character-level-ner.py
CHANGED
@@ -83,23 +83,21 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
83 |
if self.config.name == "NER":
|
84 |
features = datasets.Features(
|
85 |
{
|
86 |
-
"
|
87 |
"labels": datasets.Sequence(
|
88 |
feature=datasets.ClassLabel(num_classes=len(self._NER_LABEL_NAMES),
|
89 |
names=self._NER_LABEL_NAMES)
|
90 |
-
)
|
91 |
-
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
92 |
}
|
93 |
)
|
94 |
elif self.config.name == "PANELIZATION":
|
95 |
features = datasets.Features(
|
96 |
{
|
97 |
-
"
|
98 |
"labels": datasets.Sequence(
|
99 |
feature=datasets.ClassLabel(num_classes=len(self._PANEL_START_NAMES),
|
100 |
names=self._PANEL_START_NAMES)
|
101 |
-
)
|
102 |
-
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
103 |
}
|
104 |
)
|
105 |
|
|
|
83 |
if self.config.name == "NER":
|
84 |
features = datasets.Features(
|
85 |
{
|
86 |
+
"text": datasets.Value("string"),
|
87 |
"labels": datasets.Sequence(
|
88 |
feature=datasets.ClassLabel(num_classes=len(self._NER_LABEL_NAMES),
|
89 |
names=self._NER_LABEL_NAMES)
|
90 |
+
)
|
|
|
91 |
}
|
92 |
)
|
93 |
elif self.config.name == "PANELIZATION":
|
94 |
features = datasets.Features(
|
95 |
{
|
96 |
+
"text": datasets.Value("string"),
|
97 |
"labels": datasets.Sequence(
|
98 |
feature=datasets.ClassLabel(num_classes=len(self._PANEL_START_NAMES),
|
99 |
names=self._PANEL_START_NAMES)
|
100 |
+
)
|
|
|
101 |
}
|
102 |
)
|
103 |
|