Update E3C.py
Browse files
E3C.py
CHANGED
@@ -54,34 +54,22 @@ class E3C(datasets.GeneratorBasedBuilder):
|
|
54 |
self.config.name = self.DEFAULT_CONFIG_NAME
|
55 |
|
56 |
if self.config.name.find("clinical") != -1:
|
57 |
-
|
58 |
-
features = datasets.Features(
|
59 |
-
{
|
60 |
-
"id": datasets.Value("string"),
|
61 |
-
"text": datasets.Value("string"),
|
62 |
-
"tokens": datasets.Sequence(datasets.Value("string")),
|
63 |
-
"ner_clinical_tags": datasets.Sequence(
|
64 |
-
datasets.features.ClassLabel(
|
65 |
-
names=["O","B-CLINENTITY","I-CLINENTITY"],
|
66 |
-
),
|
67 |
-
),
|
68 |
-
}
|
69 |
-
)
|
70 |
-
|
71 |
elif self.config.name.find("temporal") != -1:
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
),
|
83 |
-
|
84 |
-
|
|
|
85 |
|
86 |
print(features)
|
87 |
|
|
|
54 |
self.config.name = self.DEFAULT_CONFIG_NAME
|
55 |
|
56 |
if self.config.name.find("clinical") != -1:
|
57 |
+
names=["O","B-CLINENTITY","I-CLINENTITY"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
elif self.config.name.find("temporal") != -1:
|
59 |
+
names = ["O", "B-EVENT", "B-ACTOR", "B-BODYPART", "B-TIMEX3", "B-RML", "I-EVENT", "I-ACTOR", "I-BODYPART", "I-TIMEX3", "I-RML"]
|
60 |
+
|
61 |
+
features = datasets.Features(
|
62 |
+
{
|
63 |
+
"id": datasets.Value("string"),
|
64 |
+
"text": datasets.Value("string"),
|
65 |
+
"tokens": datasets.Sequence(datasets.Value("string")),
|
66 |
+
"ner_tags": datasets.Sequence(
|
67 |
+
datasets.features.ClassLabel(
|
68 |
+
names=names,
|
69 |
),
|
70 |
+
),
|
71 |
+
}
|
72 |
+
)
|
73 |
|
74 |
print(features)
|
75 |
|