Upload 2 files
Browse files
README.md
CHANGED
@@ -1,160 +1,65 @@
|
|
1 |
---
|
2 |
dataset_info:
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
num_bytes: 615175
|
63 |
-
num_examples: 3126
|
64 |
-
download_size: 230213492
|
65 |
-
dataset_size: 615175
|
66 |
-
- config_name: fr
|
67 |
-
features:
|
68 |
-
- name: tokens
|
69 |
-
sequence: string
|
70 |
-
- name: ner_tags
|
71 |
-
sequence:
|
72 |
-
class_label:
|
73 |
-
names:
|
74 |
-
"0": O
|
75 |
-
"1": CLINENTITY
|
76 |
-
"2": EVENT
|
77 |
-
"3": ACTOR
|
78 |
-
"4": BODYPART
|
79 |
-
"5": TIMEX3
|
80 |
-
"6": RML
|
81 |
-
splits:
|
82 |
-
- name: fr
|
83 |
-
num_bytes: 506754
|
84 |
-
num_examples: 1109
|
85 |
-
download_size: 230213492
|
86 |
-
dataset_size: 506754
|
87 |
-
- config_name: it
|
88 |
-
features:
|
89 |
-
- name: tokens
|
90 |
-
sequence: string
|
91 |
-
- name: ner_tags
|
92 |
-
sequence:
|
93 |
-
class_label:
|
94 |
-
names:
|
95 |
-
"0": O
|
96 |
-
"1": CLINENTITY
|
97 |
-
"2": EVENT
|
98 |
-
"3": ACTOR
|
99 |
-
"4": BODYPART
|
100 |
-
"5": TIMEX3
|
101 |
-
"6": RML
|
102 |
-
splits:
|
103 |
-
- name: it
|
104 |
-
num_bytes: 516047
|
105 |
-
num_examples: 1146
|
106 |
-
download_size: 230213492
|
107 |
-
dataset_size: 516047
|
108 |
-
- config_name: e3c
|
109 |
-
features:
|
110 |
-
- name: tokens
|
111 |
-
sequence: string
|
112 |
-
- name: ner_tags
|
113 |
-
sequence:
|
114 |
-
class_label:
|
115 |
-
names:
|
116 |
-
"0": O
|
117 |
-
"1": CLINENTITY
|
118 |
-
"2": EVENT
|
119 |
-
"3": ACTOR
|
120 |
-
"4": BODYPART
|
121 |
-
"5": TIMEX3
|
122 |
-
"6": RML
|
123 |
-
splits:
|
124 |
-
- name: en.layer1
|
125 |
-
num_bytes: 507939
|
126 |
-
num_examples: 1520
|
127 |
-
- name: en.layer2
|
128 |
-
num_bytes: 1017690
|
129 |
-
num_examples: 2873
|
130 |
-
- name: es.layer1
|
131 |
-
num_bytes: 501523
|
132 |
-
num_examples: 1134
|
133 |
-
- name: es.layer2
|
134 |
-
num_bytes: 1002221
|
135 |
-
num_examples: 2347
|
136 |
-
- name: eu.layer1
|
137 |
-
num_bytes: 615175
|
138 |
-
num_examples: 3126
|
139 |
-
- name: eu.layer2
|
140 |
-
num_bytes: 342204
|
141 |
-
num_examples: 1594
|
142 |
-
- name: fr.layer1
|
143 |
-
num_bytes: 506754
|
144 |
-
num_examples: 1109
|
145 |
-
- name: fr.layer2
|
146 |
-
num_bytes: 1027933
|
147 |
-
num_examples: 2389
|
148 |
-
- name: it.layer1
|
149 |
-
num_bytes: 516047
|
150 |
-
num_examples: 1146
|
151 |
-
- name: it.layer2
|
152 |
-
num_bytes: 1071873
|
153 |
-
num_examples: 2436
|
154 |
-
download_size: 230213492
|
155 |
-
dataset_size: 7109359
|
156 |
---
|
157 |
-
|
158 |
# Dataset Card for E3C
|
159 |
|
160 |
## Dataset Description
|
@@ -181,4 +86,4 @@ information about clinical entities based on medical taxonomies, to be used for
|
|
181 |
url = {https://uts.nlm.nih.gov/uts/umls/home},
|
182 |
year = {2021},
|
183 |
}
|
184 |
-
```
|
|
|
1 |
---
|
2 |
dataset_info:
|
3 |
+
features:
|
4 |
+
- name: text
|
5 |
+
dtype: string
|
6 |
+
- name: tokens
|
7 |
+
sequence: string
|
8 |
+
- name: tokens_offsets
|
9 |
+
sequence:
|
10 |
+
sequence: int32
|
11 |
+
- name: ner_tags
|
12 |
+
sequence:
|
13 |
+
class_label:
|
14 |
+
names:
|
15 |
+
'0': O
|
16 |
+
'1': B-CLINENTITY
|
17 |
+
'2': B-EVENT
|
18 |
+
'3': B-ACTOR
|
19 |
+
'4': B-BODYPART
|
20 |
+
'5': B-TIMEX3
|
21 |
+
'6': B-RML
|
22 |
+
'7': I-CLINENTITY
|
23 |
+
'8': I-EVENT
|
24 |
+
'9': I-ACTOR
|
25 |
+
'10': I-BODYPART
|
26 |
+
'11': I-TIMEX3
|
27 |
+
'12': I-RML
|
28 |
+
config_name: e3c
|
29 |
+
splits:
|
30 |
+
- name: en.layer1
|
31 |
+
num_bytes: 1039582
|
32 |
+
num_examples: 1520
|
33 |
+
- name: en.layer2
|
34 |
+
num_bytes: 2083098
|
35 |
+
num_examples: 2873
|
36 |
+
- name: es.layer1
|
37 |
+
num_bytes: 1026950
|
38 |
+
num_examples: 1134
|
39 |
+
- name: es.layer2
|
40 |
+
num_bytes: 2052073
|
41 |
+
num_examples: 2347
|
42 |
+
- name: eu.layer1
|
43 |
+
num_bytes: 1252750
|
44 |
+
num_examples: 3126
|
45 |
+
- name: eu.layer2
|
46 |
+
num_bytes: 697118
|
47 |
+
num_examples: 1594
|
48 |
+
- name: fr.layer1
|
49 |
+
num_bytes: 1036878
|
50 |
+
num_examples: 1109
|
51 |
+
- name: fr.layer2
|
52 |
+
num_bytes: 2104253
|
53 |
+
num_examples: 2389
|
54 |
+
- name: it.layer1
|
55 |
+
num_bytes: 1055588
|
56 |
+
num_examples: 1146
|
57 |
+
- name: it.layer2
|
58 |
+
num_bytes: 2191803
|
59 |
+
num_examples: 2436
|
60 |
+
download_size: 230213492
|
61 |
+
dataset_size: 14540093
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
---
|
|
|
63 |
# Dataset Card for E3C
|
64 |
|
65 |
## Dataset Description
|
|
|
86 |
url = {https://uts.nlm.nih.gov/uts/umls/home},
|
87 |
year = {2021},
|
88 |
}
|
89 |
+
```
|
e3c.py
CHANGED
@@ -61,12 +61,18 @@ class E3C(datasets.GeneratorBasedBuilder):
|
|
61 |
datasets.features.ClassLabel(
|
62 |
names=[
|
63 |
"O",
|
64 |
-
"CLINENTITY",
|
65 |
-
"EVENT",
|
66 |
-
"ACTOR",
|
67 |
-
"BODYPART",
|
68 |
-
"TIMEX3",
|
69 |
-
"RML",
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
],
|
71 |
),
|
72 |
),
|
@@ -303,9 +309,9 @@ class E3C(datasets.GeneratorBasedBuilder):
|
|
303 |
]
|
304 |
for idx_token in annotated_tokens:
|
305 |
if idx_token == annotated_tokens[0]:
|
306 |
-
labels[idx_token] = f"{entity_type}"
|
307 |
else:
|
308 |
-
labels[idx_token] = f"{entity_type}"
|
309 |
yield guid, {
|
310 |
"text": sentence[-1],
|
311 |
"tokens": list(map(lambda tokens: tokens[2], filtered_tokens)),
|
@@ -313,3 +319,5 @@ class E3C(datasets.GeneratorBasedBuilder):
|
|
313 |
"tokens_offsets": tokens_offsets,
|
314 |
}
|
315 |
guid += 1
|
|
|
|
|
|
61 |
datasets.features.ClassLabel(
|
62 |
names=[
|
63 |
"O",
|
64 |
+
"B-CLINENTITY",
|
65 |
+
"B-EVENT",
|
66 |
+
"B-ACTOR",
|
67 |
+
"B-BODYPART",
|
68 |
+
"B-TIMEX3",
|
69 |
+
"B-RML",
|
70 |
+
"I-CLINENTITY",
|
71 |
+
"I-EVENT",
|
72 |
+
"I-ACTOR",
|
73 |
+
"I-BODYPART",
|
74 |
+
"I-TIMEX3",
|
75 |
+
"I-RML",
|
76 |
],
|
77 |
),
|
78 |
),
|
|
|
309 |
]
|
310 |
for idx_token in annotated_tokens:
|
311 |
if idx_token == annotated_tokens[0]:
|
312 |
+
labels[idx_token] = f"B-{entity_type}"
|
313 |
else:
|
314 |
+
labels[idx_token] = f"I-{entity_type}"
|
315 |
yield guid, {
|
316 |
"text": sentence[-1],
|
317 |
"tokens": list(map(lambda tokens: tokens[2], filtered_tokens)),
|
|
|
319 |
"tokens_offsets": tokens_offsets,
|
320 |
}
|
321 |
guid += 1
|
322 |
+
|
323 |
+
datasets.load_dataset("e3c/e3c.py")
|