Datasets:

ArXiv:
License:
sgallon-rin commited on
Commit
d14a1fd
1 Parent(s): c6f9faf

Fix dataset download url

Browse files

Thank you for your wonderful work in creating and sharing this dataset!

However, when I was trying to load the dataset according to the instruction given in README, I got: `... FileNotFoundError: Unable to resolve any data file that matches ['**'] in dataset repository csebuetnlp/CrossSum with any supported extension ...` and `AttributeError: 'NoneType' object has no attribute 'version_str'`.

The former error can be solved by loading the dataset in lower case, namely: `load_dataset(f"csebuetnlp/crosssum", "{}-{}".format(src_lang, tgt_lang))`;

This pull request is opened to fix the latter error by using the correct format for dataset download url.

Files changed (1) hide show
  1. crosssum.py +3 -1
crosssum.py CHANGED
@@ -116,7 +116,9 @@ class Crosssum(datasets.GeneratorBasedBuilder):
116
  def _split_generators(self, dl_manager):
117
  """Returns SplitGenerators."""
118
  lang = str(self.config.name)
119
- url = _URL.format(lang, self.VERSION.version_str[:-2])
 
 
120
 
121
  data_dir = dl_manager.download_and_extract(url)
122
  return [
 
116
  def _split_generators(self, dl_manager):
117
  """Returns SplitGenerators."""
118
  lang = str(self.config.name)
119
+ src_lang, tgt_lang = lang.split("-")
120
+ # url = _URL.format(lang, self.VERSION.version_str[:-2])
121
+ url = _URL.format(src_lang, tgt_lang)
122
 
123
  data_dir = dl_manager.download_and_extract(url)
124
  return [