Rachel Wicks commited on
Commit
c42fe4d
1 Parent(s): 7752c7f

xz reading

Browse files
Files changed (1) hide show
  1. paradocs.py +1 -1
paradocs.py CHANGED
@@ -139,7 +139,7 @@ class ParaDocs(datasets.GeneratorBasedBuilder):
139
  for filepath in filepaths:
140
  # logger.info("Generating examples from = %s", filepath)
141
  try:
142
- with xz.open(filepath, "r", encoding="utf-8") as f:
143
  rstream = csv.DictReader(f,
144
  delimiter='\t',
145
  fieldnames = [
 
139
  for filepath in filepaths:
140
  # logger.info("Generating examples from = %s", filepath)
141
  try:
142
+ with xz.open(filepath, "rt", encoding="utf-8") as f:
143
  rstream = csv.DictReader(f,
144
  delimiter='\t',
145
  fieldnames = [