Commit
•
4f5405b
1
Parent(s):
d85246d
Correctly parse conglomerate entity normalizations (#2)
Browse files- Correctly parse conglomerate entity normalizations (4022937ab8de8ce503b8570fe8527c092acac8f4)
Co-authored-by: David Kartchner <davidkartchner@users.noreply.huggingface.co>
- ncbi_disease.py +13 -1
ncbi_disease.py
CHANGED
@@ -238,8 +238,20 @@ class NCBIDiseaseDataset(datasets.GeneratorBasedBuilder):
|
|
238 |
normalized.append(
|
239 |
{"db_name": "OMIM", "db_id": x.strip().split(":")[-1]}
|
240 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
else:
|
242 |
-
normalized.append(
|
|
|
243 |
|
244 |
unified_entities.append(
|
245 |
{
|
|
|
238 |
normalized.append(
|
239 |
{"db_name": "OMIM", "db_id": x.strip().split(":")[-1]}
|
240 |
)
|
241 |
+
elif "+" in x:
|
242 |
+
normalized.extend(
|
243 |
+
[
|
244 |
+
{
|
245 |
+
"db_name": "MESH",
|
246 |
+
"db_id": y.split(":")[-1].strip(),
|
247 |
+
}
|
248 |
+
for y in x.split("+")
|
249 |
+
]
|
250 |
+
)
|
251 |
+
|
252 |
else:
|
253 |
+
normalized.append(
|
254 |
+
{"db_name": "MESH", "db_id": x.split(":")[-1].strip()}
|
255 |
|
256 |
unified_entities.append(
|
257 |
{
|