Datasets:
Commit ·
ff79626
1
Parent(s): 7b0f0f9
Update multiconer_v2.py
Browse files- multiconer_v2.py +1 -1
multiconer_v2.py
CHANGED
|
@@ -289,7 +289,7 @@ class MultiCoNER2(datasets.GeneratorBasedBuilder):
|
|
| 289 |
guid = 0
|
| 290 |
tokens = []
|
| 291 |
ner_tags = []
|
| 292 |
-
for line in f:
|
| 293 |
if line.startswith("# id") or line == "" or line == "\n":
|
| 294 |
if tokens:
|
| 295 |
yield guid, {
|
|
|
|
| 289 |
guid = 0
|
| 290 |
tokens = []
|
| 291 |
ner_tags = []
|
| 292 |
+
for line in f.read().strip().split('\n'):
|
| 293 |
if line.startswith("# id") or line == "" or line == "\n":
|
| 294 |
if tokens:
|
| 295 |
yield guid, {
|