singh-aditya commited on
Commit
3eb2985
1 Parent(s): 09bf1c7

Update MACCROBAT_biomedical_ner.py

Browse files
Files changed (1) hide show
  1. MACCROBAT_biomedical_ner.py +10 -0
MACCROBAT_biomedical_ner.py CHANGED
@@ -122,3 +122,13 @@ class MACCROBAT_biomedical_ner(datasets.GeneratorBasedBuilder):
122
  return [
123
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": _TRAIN}),
124
  ]
 
 
 
 
 
 
 
 
 
 
 
122
  return [
123
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": _TRAIN}),
124
  ]
125
+
126
+ def _generate_examples(self, filepath):
127
+ with open(filepath, encoding="utf-8") as f:
128
+ datas = json.load(f)
129
+ datas = datas["data"]
130
+ guid = 0
131
+ for data in datas:
132
+ yield guid, data
133
+ guid += 1
134
+