Sebastian Gehrmann commited on
Commit
091a47e
1 Parent(s): d36cabe

add skipping of None examples

Browse files
Files changed (2) hide show
  1. SIMPITIKI.py +3 -0
  2. dataset_infos.json +1 -1
SIMPITIKI.py CHANGED
@@ -258,6 +258,9 @@ class SIMPITIKI(datasets.GeneratorBasedBuilder):
258
  with open(filepath, encoding="utf-8") as f:
259
  for id_, row in enumerate(f):
260
  data = json.loads(row)
 
 
 
261
  yield id_, {
262
  "text": data["text"],
263
  "target": data["simplified_text"],
258
  with open(filepath, encoding="utf-8") as f:
259
  for id_, row in enumerate(f):
260
  data = json.loads(row)
261
+ # A couple of missing examples in here, skipping.
262
+ if data["text"] == None:
263
+ continue
264
  yield id_, {
265
  "text": data["text"],
266
  "target": data["simplified_text"],
dataset_infos.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:975a02c53aa1d9c6aa704f750ee773114d1021c6af026c001861055256925a2a
3
  size 8896
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a35664ea0486ed1d9fd55a9f32ed5ab2ab63ced42aad9cbdf30427a464242c29
3
  size 8896