versae commited on
Commit
0153ba2
·
2 Parent(s): 725889a 013370a

Merge branch 'main' of https://huggingface.co/datasets/versae/bibles into main

Browse files
Files changed (1) hide show
  1. bibles.py +5 -1
bibles.py CHANGED
@@ -215,6 +215,8 @@ class Bibles(datasets.GeneratorBasedBuilder):
215
  "text": datasets.Value("string"),
216
  "label": datasets.ClassLabel(names=labels),
217
  "language": datasets.Value("string"),
 
 
218
  }
219
  ),
220
  supervised_keys=None,
@@ -235,9 +237,11 @@ class Bibles(datasets.GeneratorBasedBuilder):
235
  with open(filepath, encoding="utf-8") as csv_file:
236
  csv_reader = csv.reader(csv_file, delimiter=",")
237
  next(csv_reader) # skip header
238
- for idx, (text, label, language) in enumerate(csv_reader):
239
  yield int(idx), {
240
  "text": text,
241
  "label": self.labels.index(label),
242
  "language": language,
 
 
243
  }
 
215
  "text": datasets.Value("string"),
216
  "label": datasets.ClassLabel(names=labels),
217
  "language": datasets.Value("string"),
218
+ "year": datasets.Value("int16"),
219
+ "century": datasets.Value("string"),
220
  }
221
  ),
222
  supervised_keys=None,
 
237
  with open(filepath, encoding="utf-8") as csv_file:
238
  csv_reader = csv.reader(csv_file, delimiter=",")
239
  next(csv_reader) # skip header
240
+ for idx, (text, label, language, year, century) in enumerate(csv_reader):
241
  yield int(idx), {
242
  "text": text,
243
  "label": self.labels.index(label),
244
  "language": language,
245
+ "year": year,
246
+ "century": century,
247
  }