Datasets:
Commit
·
7ed6316
1
Parent(s):
6169dd2
Update multiconer_v2.py
Browse files- multiconer_v2.py +4 -4
multiconer_v2.py
CHANGED
|
@@ -303,8 +303,8 @@ class MultiCoNER2(datasets.GeneratorBasedBuilder):
|
|
| 303 |
elif len(line.strip()) < 3:
|
| 304 |
if s_id and len(tokens) >= 1 and len(tokens) == len(ner_tags):
|
| 305 |
yield guid, {
|
| 306 |
-
"id": guid,
|
| 307 |
-
"sample_id": s_id,
|
| 308 |
"tokens": tokens,
|
| 309 |
"ner_tags": ner_tags,
|
| 310 |
}
|
|
@@ -321,8 +321,8 @@ class MultiCoNER2(datasets.GeneratorBasedBuilder):
|
|
| 321 |
ner_tags.append(splits[-1].strip())
|
| 322 |
if s_id:
|
| 323 |
yield guid, {
|
| 324 |
-
"id": guid,
|
| 325 |
-
"sample_id": s_id,
|
| 326 |
"tokens": tokens,
|
| 327 |
"ner_tags": ner_tags,
|
| 328 |
}
|
|
|
|
| 303 |
elif len(line.strip()) < 3:
|
| 304 |
if s_id and len(tokens) >= 1 and len(tokens) == len(ner_tags):
|
| 305 |
yield guid, {
|
| 306 |
+
"id": str(guid),
|
| 307 |
+
"sample_id": str(s_id),
|
| 308 |
"tokens": tokens,
|
| 309 |
"ner_tags": ner_tags,
|
| 310 |
}
|
|
|
|
| 321 |
ner_tags.append(splits[-1].strip())
|
| 322 |
if s_id:
|
| 323 |
yield guid, {
|
| 324 |
+
"id": str(guid),
|
| 325 |
+
"sample_id": str(s_id),
|
| 326 |
"tokens": tokens,
|
| 327 |
"ner_tags": ner_tags,
|
| 328 |
}
|