davebulaval commited on
Commit
a806b06
1 Parent(s): be8705c

Update risbac.py

Browse files

Fix version and fix readlines errors

Files changed (1) hide show
  1. riscbac.py +3 -2
riscbac.py CHANGED
@@ -56,7 +56,7 @@ _URLS = {
56
  class RISCBAC(datasets.GeneratorBasedBuilder):
57
  """RISCBAC: a synthetic bilingual automotive insurance contract dataset"""
58
 
59
- VERSION = datasets.Version("1.1.0")
60
 
61
  BUILDER_CONFIGS = [
62
  datasets.BuilderConfig(
@@ -109,4 +109,5 @@ class RISCBAC(datasets.GeneratorBasedBuilder):
109
  files = os.listdir(files_dir_path)
110
  for key, file in enumerate(files):
111
  with open(os.path.join(files_dir_path, file), "r", encoding="utf-8") as f:
112
- yield key, {"text": f.readlines()}
 
 
56
  class RISCBAC(datasets.GeneratorBasedBuilder):
57
  """RISCBAC: a synthetic bilingual automotive insurance contract dataset"""
58
 
59
+ VERSION = datasets.Version("1.0.0")
60
 
61
  BUILDER_CONFIGS = [
62
  datasets.BuilderConfig(
 
109
  files = os.listdir(files_dir_path)
110
  for key, file in enumerate(files):
111
  with open(os.path.join(files_dir_path, file), "r", encoding="utf-8") as f:
112
+ text = "".join(f.readlines()).strip()
113
+ yield key, {"text": text}