Update E3C.py
Browse files
E3C.py
CHANGED
@@ -242,22 +242,16 @@ class E3C(datasets.GeneratorBasedBuilder):
|
|
242 |
temporal_information_labels[idx_token] = f"I-{entity_type}"
|
243 |
|
244 |
if self.config.name.find("clinical") != -1:
|
245 |
-
|
246 |
-
all_res.append({
|
247 |
-
"id": key,
|
248 |
-
"text": sentence[-1],
|
249 |
-
"tokens": list(map(lambda token: token[2], filtered_tokens)),
|
250 |
-
"ner_clinical_tags": clinical_labels,
|
251 |
-
})
|
252 |
-
|
253 |
elif self.config.name.find("temporal") != -1:
|
|
|
254 |
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
|
262 |
key += 1
|
263 |
|
|
|
242 |
temporal_information_labels[idx_token] = f"I-{entity_type}"
|
243 |
|
244 |
if self.config.name.find("clinical") != -1:
|
245 |
+
_labels = clinical_labels
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
elif self.config.name.find("temporal") != -1:
|
247 |
+
_labels = temporal_information_labels
|
248 |
|
249 |
+
all_res.append({
|
250 |
+
"id": key,
|
251 |
+
"text": sentence[-1],
|
252 |
+
"tokens": list(map(lambda token: token[2], filtered_tokens)),
|
253 |
+
"ner_tags": _labels,
|
254 |
+
})
|
255 |
|
256 |
key += 1
|
257 |
|