Datasets:

Modalities:
Text
Formats:
parquet
Languages:
Catalan
ArXiv:
Libraries:
Datasets
Dask
License:
albertvillanova HF staff commited on
Commit
26c3bd5
1 Parent(s): 7a7d482

Remove trailing blanks from text

Browse files
Files changed (1) hide show
  1. catalan_textual_corpus.py +1 -1
catalan_textual_corpus.py CHANGED
@@ -74,7 +74,7 @@ class CatalanTextualCorpus(datasets.GeneratorBasedBuilder):
74
  text = ""
75
  for id_, line in enumerate(f):
76
  if line == "\n":
77
- yield id_, {"text": text}
78
  text = ""
79
  else:
80
  text += line
 
74
  text = ""
75
  for id_, line in enumerate(f):
76
  if line == "\n":
77
+ yield id_, {"text": text.strip()}
78
  text = ""
79
  else:
80
  text += line