Datasets:

Languages:
Japanese
Size:
n<1K
Tags:
news
License:
Kosuke-Yamada commited on
Commit
e39dd70
1 Parent(s): 5b2f9f7

modify file

Browse files
Files changed (1) hide show
  1. ner-wikinews-dataset.py +2 -0
ner-wikinews-dataset.py CHANGED
@@ -61,6 +61,8 @@ class NerWikinewsDataset(datasets.GeneratorBasedBuilder):
61
  "type": result["value"]["labels"][0],
62
  }
63
  )
 
 
64
  outputs.append(
65
  {
66
  "curid": data["id"],
 
61
  "type": result["value"]["labels"][0],
62
  }
63
  )
64
+ if entities != []:
65
+ entities = sorted(entities, key=lambda x: x["span"][0])
66
  outputs.append(
67
  {
68
  "curid": data["id"],