johngiorgi commited on
Commit
208785c
1 Parent(s): b81ba1d

Don't strip proceeding hyphen (#4353)

Browse files

* Don't strip proceeding hyphen

* Continue to strip whitespace

* Update multi_news.py

Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>

Commit from https://github.com/huggingface/datasets/commit/b1d704d1cf2ccb6afbea7fc11421b5d7afeb2d78

Files changed (1) hide show
  1. multi_news.py +1 -2
multi_news.py CHANGED
@@ -93,6 +93,5 @@ class MultiNews(datasets.GeneratorBasedBuilder):
93
  # tokens "\n" are being replaced with "NEWLINE_CHAR". Here restore
94
  # the natural newline token to avoid special vocab "NEWLINE_CHAR".
95
  _DOCUMENT: src_line.strip().replace("NEWLINE_CHAR", "\n"),
96
- # Remove the starting token "- " for every target sequence.
97
- _SUMMARY: tgt_line.strip().lstrip("- "),
98
  }
 
93
  # tokens "\n" are being replaced with "NEWLINE_CHAR". Here restore
94
  # the natural newline token to avoid special vocab "NEWLINE_CHAR".
95
  _DOCUMENT: src_line.strip().replace("NEWLINE_CHAR", "\n"),
96
+ _SUMMARY: tgt_line.strip(),
 
97
  }