Datasets:
Update sd-nlp-non-tokenized.py
Browse files- sd-nlp-non-tokenized.py +0 -6
sd-nlp-non-tokenized.py
CHANGED
@@ -111,7 +111,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
111 |
)
|
112 |
),
|
113 |
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
114 |
-
"panel_id": datasets.Value("string"),
|
115 |
}
|
116 |
)
|
117 |
elif self.config.name == "SMALL_MOL_ROLES":
|
@@ -125,7 +124,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
125 |
)
|
126 |
),
|
127 |
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
128 |
-
"panel_id": datasets.Value("string"),
|
129 |
}
|
130 |
)
|
131 |
elif self.config.name == "BORING":
|
@@ -136,7 +134,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
136 |
feature=datasets.ClassLabel(num_classes=len(self._BORING_LABEL_NAMES),
|
137 |
names=self._BORING_LABEL_NAMES)
|
138 |
),
|
139 |
-
"panel_id": datasets.Value("string"),
|
140 |
}
|
141 |
)
|
142 |
elif self.config.name == "PANELIZATION":
|
@@ -148,7 +145,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
148 |
names=self._PANEL_START_NAMES)
|
149 |
),
|
150 |
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
151 |
-
"panel_id": datasets.Value("string"),
|
152 |
}
|
153 |
)
|
154 |
|
@@ -221,7 +217,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
221 |
"words": data["words"],
|
222 |
"labels": labels,
|
223 |
"tag_mask": tag_mask,
|
224 |
-
"panel_id": data["panel_id"]
|
225 |
}
|
226 |
elif self.config.name == "SMALL_MOL_ROLES":
|
227 |
labels = data["label_ids"]["small_mol_roles"]
|
@@ -231,7 +226,6 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
|
|
231 |
"words": data["words"],
|
232 |
"labels": labels,
|
233 |
"tag_mask": tag_mask,
|
234 |
-
"panel_id": data["panel_id"]
|
235 |
}
|
236 |
elif self.config.name == "BORING":
|
237 |
yield id_, {"words": data["words"],
|
|
|
111 |
)
|
112 |
),
|
113 |
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
|
|
114 |
}
|
115 |
)
|
116 |
elif self.config.name == "SMALL_MOL_ROLES":
|
|
|
124 |
)
|
125 |
),
|
126 |
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
|
|
127 |
}
|
128 |
)
|
129 |
elif self.config.name == "BORING":
|
|
|
134 |
feature=datasets.ClassLabel(num_classes=len(self._BORING_LABEL_NAMES),
|
135 |
names=self._BORING_LABEL_NAMES)
|
136 |
),
|
|
|
137 |
}
|
138 |
)
|
139 |
elif self.config.name == "PANELIZATION":
|
|
|
145 |
names=self._PANEL_START_NAMES)
|
146 |
),
|
147 |
"tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
|
|
|
148 |
}
|
149 |
)
|
150 |
|
|
|
217 |
"words": data["words"],
|
218 |
"labels": labels,
|
219 |
"tag_mask": tag_mask,
|
|
|
220 |
}
|
221 |
elif self.config.name == "SMALL_MOL_ROLES":
|
222 |
labels = data["label_ids"]["small_mol_roles"]
|
|
|
226 |
"words": data["words"],
|
227 |
"labels": labels,
|
228 |
"tag_mask": tag_mask,
|
|
|
229 |
}
|
230 |
elif self.config.name == "BORING":
|
231 |
yield id_, {"words": data["words"],
|