Commit ·
f4fa683
1
Parent(s): 2df6ce5
Update bionlp2.py
Browse files- bionlp2.py +3 -1
bionlp2.py
CHANGED
|
@@ -93,7 +93,9 @@ class BioNLP2004(datasets.GeneratorBasedBuilder):
|
|
| 93 |
nlist.append(custom_names.index(inv_map[indx]))
|
| 94 |
#data['ner_tags'] = map_ner_tags(data['ner_tags'])
|
| 95 |
data["ner_tags"]=nlist
|
| 96 |
-
|
|
|
|
|
|
|
| 97 |
_key += 1
|
| 98 |
|
| 99 |
def _info(self):
|
|
|
|
| 93 |
nlist.append(custom_names.index(inv_map[indx]))
|
| 94 |
#data['ner_tags'] = map_ner_tags(data['ner_tags'])
|
| 95 |
data["ner_tags"]=nlist
|
| 96 |
+
xstr = str(_key)
|
| 97 |
+
yield xstr,{"id":xstr,"tokens":data['tokens'], "nertags":data["ner_tags"]
|
| 98 |
+
#yield _key,data
|
| 99 |
_key += 1
|
| 100 |
|
| 101 |
def _info(self):
|