cryptexcode commited on
Commit
6169dd2
·
1 Parent(s): c6a90e5

Update multiconer_v2.py

Browse files
Files changed (1) hide show
  1. multiconer_v2.py +4 -2
multiconer_v2.py CHANGED
@@ -303,7 +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": s_id,
 
307
  "tokens": tokens,
308
  "ner_tags": ner_tags,
309
  }
@@ -320,7 +321,8 @@ class MultiCoNER2(datasets.GeneratorBasedBuilder):
320
  ner_tags.append(splits[-1].strip())
321
  if s_id:
322
  yield guid, {
323
- "id": s_id,
 
324
  "tokens": tokens,
325
  "ner_tags": ner_tags,
326
  }
 
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
  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
  }