CNLeonardoCordoba commited on
Commit
f4460ee
1 Parent(s): de62c91

remove files

Browse files
Files changed (8) hide show
  1. .gitattributes +5 -0
  2. CC-NEWS-ES-titles.py +19 -14
  3. README.md +5 -3
  4. dataset_infos.json +1 -0
  5. eval.json +0 -3
  6. sample.json +0 -3
  7. test.json +0 -3
  8. train.json +0 -3
.gitattributes CHANGED
@@ -28,3 +28,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
  eval.json filter=lfs diff=lfs merge=lfs -text
29
  test.json filter=lfs diff=lfs merge=lfs -text
30
  train.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
28
  eval.json filter=lfs diff=lfs merge=lfs -text
29
  test.json filter=lfs diff=lfs merge=lfs -text
30
  train.json filter=lfs diff=lfs merge=lfs -text
31
+ sample.json filter=lfs diff=lfs merge=lfs -text
32
+ sample.jsonl filter=lfs diff=lfs merge=lfs -text
33
+ test.jsonl filter=lfs diff=lfs merge=lfs -text
34
+ train.jsonl filter=lfs diff=lfs merge=lfs -text
35
+ eval.jsonl filter=lfs diff=lfs merge=lfs -text
CC-NEWS-ES-titles.py CHANGED
@@ -33,11 +33,11 @@ _HOMEPAGE = ""
33
 
34
  _LICENSE = ""
35
 
36
- _URL = "https://huggingface.co/datasets/LeoCordoba/CC-NEWS-ES-titles/"
37
  _URLS = {
38
- "train": _URL + "blob/main/train.json",
39
- "test": _URL + "blob/main/test.json",
40
- "eval": _URL + "blob/main/eval.json",
41
  }
42
 
43
  class CCNewsESTitlesConfig(datasets.BuilderConfig):
@@ -65,7 +65,7 @@ class CCNewsESTitles(datasets.GeneratorBasedBuilder):
65
  features=datasets.Features(
66
  {
67
  "text": datasets.Value("string"),
68
- "output_test": datasets.Value("string")
69
  }
70
  ),
71
  homepage=_HOMEPAGE,
@@ -74,19 +74,24 @@ class CCNewsESTitles(datasets.GeneratorBasedBuilder):
74
  )
75
  def _split_generators(self, dl_manager):
76
  """Returns SplitGenerators."""
77
- downloaded_files = dl_manager.download_and_extract(_URLS)
78
-
 
 
 
79
  return [
80
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
81
- datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["eval"]}),
82
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]})
83
  ]
 
 
84
  def _generate_examples(self, filepath):
85
- """This function returns the examples in the raw (text) form."""
86
  logger.info("generating examples from = %s", filepath)
87
  data = []
88
- with open(filepath, encoding="utf-8") as f:
89
  for line in f:
90
  data.append(json.loads(line))
91
- for obs in data:
92
- yield(obs)
 
 
33
 
34
  _LICENSE = ""
35
 
36
+ _URL = "https://huggingface.co/datasets/LeoCordoba/CC-NEWS-ES-titles/resolve/main/"
37
  _URLS = {
38
+ "train": _URL + "train.json",
39
+ "test": _URL + "test.json",
40
+ "eval": _URL + "eval.json"
41
  }
42
 
43
  class CCNewsESTitlesConfig(datasets.BuilderConfig):
 
65
  features=datasets.Features(
66
  {
67
  "text": datasets.Value("string"),
68
+ "output_text": datasets.Value("string")
69
  }
70
  ),
71
  homepage=_HOMEPAGE,
 
74
  )
75
  def _split_generators(self, dl_manager):
76
  """Returns SplitGenerators."""
77
+
78
+ train = dl_manager.download_and_extract(_URLS["train"])
79
+ eval_ = dl_manager.download_and_extract(_URLS["eval"])
80
+ test = dl_manager.download_and_extract(_URLS["test"])
81
+
82
  return [
83
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train}),
84
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": eval_}),
85
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test})
86
  ]
87
+
88
+
89
  def _generate_examples(self, filepath):
 
90
  logger.info("generating examples from = %s", filepath)
91
  data = []
92
+ with open(filepath) as f:
93
  for line in f:
94
  data.append(json.loads(line))
95
+
96
+ for idx, obs in enumerate(data):
97
+ yield idx, obs
README.md CHANGED
@@ -59,9 +59,11 @@ CC-NEWS-ES-titles is a Spanish-language dataset for news titles generation. The
59
 
60
  It contains 402.310 pairs of news title and body, splitted in :
61
 
62
- Train: 370.125
63
- Eval: 16.092
64
- Test: 16.092
 
 
65
 
66
  ### Supported Tasks and Leaderboards
67
 
 
59
 
60
  It contains 402.310 pairs of news title and body, splitted in :
61
 
62
+ - Train: 370.125
63
+
64
+ - Eval: 16.092
65
+
66
+ - Test: 16.092
67
 
68
  ### Supported Tasks and Leaderboards
69
 
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "", "citation": " ", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "output_text": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "cc_news_es_titles", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 592272595, "num_examples": 370125, "dataset_name": "cc_news_es_titles"}, "validation": {"name": "validation", "num_bytes": 25737461, "num_examples": 16092, "dataset_name": "cc_news_es_titles"}, "test": {"name": "test", "num_bytes": 25854392, "num_examples": 16093, "dataset_name": "cc_news_es_titles"}}, "download_checksums": {"https://huggingface.co/datasets/LeoCordoba/CC-NEWS-ES-titles/resolve/main/train.json": {"num_bytes": 602204733, "checksum": "b8fb35cda6132005a9862bd658093bdd5f2100e1cf729ac38fce31fa23d9774f"}, "https://huggingface.co/datasets/LeoCordoba/CC-NEWS-ES-titles/resolve/main/eval.json": {"num_bytes": 26167193, "checksum": "d2e986d4a36a8194915e8e4e35e5723324f3df9494f223ee5a7f341cc4e98f36"}, "https://huggingface.co/datasets/LeoCordoba/CC-NEWS-ES-titles/resolve/main/test.json": {"num_bytes": 26285538, "checksum": "e46ea032c13a268fd2346e728ea1b1f919b6f8af50712b5c38c9fda83c26f3d9"}}, "download_size": 654657464, "post_processing_size": null, "dataset_size": 643864448, "size_in_bytes": 1298521912}}
eval.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d2e986d4a36a8194915e8e4e35e5723324f3df9494f223ee5a7f341cc4e98f36
3
- size 26167193
 
 
 
 
sample.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:17cf1031cc688e9e93848523882cc7c745fe5a812b802f7dca5f462822bc5ff6
3
- size 7594
 
 
 
 
test.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e46ea032c13a268fd2346e728ea1b1f919b6f8af50712b5c38c9fda83c26f3d9
3
- size 26285538
 
 
 
 
train.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b8fb35cda6132005a9862bd658093bdd5f2100e1cf729ac38fce31fa23d9774f
3
- size 602204733