Stardrums commited on
Commit
acd0763
·
1 Parent(s): 3c7ce5b

matching conll2003 loading script

Browse files
Files changed (1) hide show
  1. pico-breast-cancer.py +9 -0
pico-breast-cancer.py CHANGED
@@ -110,3 +110,12 @@ class PicoBreastCancer(datasets.GeneratorBasedBuilder):
110
  splits = line.split(" ")
111
  tokens.append(splits[0])
112
  ner_tags.append(splits[1].rstrip())
 
 
 
 
 
 
 
 
 
 
110
  splits = line.split(" ")
111
  tokens.append(splits[0])
112
  ner_tags.append(splits[1].rstrip())
113
+ # last example
114
+ if tokens:
115
+ yield guid, {
116
+ "id": str(guid),
117
+ "tokens": tokens,
118
+ "pos_tags": pos_tags,
119
+ "chunk_tags": chunk_tags,
120
+ "ner_tags": ner_tags,
121
+ }