Datasets:

Languages:
Indonesian
ArXiv:
License:
holylovenia commited on
Commit
3b93eb0
·
verified ·
1 Parent(s): 02d2b88

Upload id_frog_story.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. id_frog_story.py +12 -12
id_frog_story.py CHANGED
@@ -4,9 +4,9 @@ from typing import List
4
 
5
  import datasets
6
 
7
- from nusacrowd.utils import schemas
8
- from nusacrowd.utils.configs import NusantaraConfig
9
- from nusacrowd.utils.constants import Tasks
10
 
11
  _CITATION = """\
12
  @article{FrogStorytelling,
@@ -31,32 +31,32 @@ Indonesian written and spoken corpus, based on the twenty-eight pictures. (http:
31
  """
32
  _HOMEPAGE = "https://github.com/matbahasa/corpus-frog-storytelling"
33
  _LANGUAGES = ["ind"]
34
- _LICENSE = "Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)"
35
  _LOCAL = False
36
  _URLS = {
37
  _DATASETNAME: "https://github.com/matbahasa/corpus-frog-storytelling/archive/refs/heads/master.zip",
38
  }
39
  _SUPPORTED_TASKS = [Tasks.SELF_SUPERVISED_PRETRAINING]
40
  _SOURCE_VERSION = "1.0.0"
41
- _NUSANTARA_VERSION = "1.0.0"
42
 
43
 
44
  class IdFrogStory(datasets.GeneratorBasedBuilder):
45
  """IdFrogStory contains 13 spoken datasets and 11 written datasets"""
46
 
47
  BUILDER_CONFIGS = [
48
- NusantaraConfig(
49
  name="id_frog_story_source",
50
  version=datasets.Version(_SOURCE_VERSION),
51
  description="IdFrogStory source schema",
52
  schema="source",
53
  subset_id="id_frog_story",
54
  ),
55
- NusantaraConfig(
56
- name="id_frog_story_nusantara_ssp",
57
- version=datasets.Version(_NUSANTARA_VERSION),
58
  description="IdFrogStory Nusantara schema",
59
- schema="nusantara_ssp",
60
  subset_id="id_frog_story",
61
  ),
62
  ]
@@ -71,7 +71,7 @@ class IdFrogStory(datasets.GeneratorBasedBuilder):
71
  "text": datasets.Value("string"),
72
  }
73
  )
74
- elif self.config.schema == "nusantara_ssp":
75
  features = schemas.self_supervised_pretraining.features
76
 
77
  return datasets.DatasetInfo(
@@ -119,7 +119,7 @@ class IdFrogStory(datasets.GeneratorBasedBuilder):
119
  "text": row
120
  }
121
  yield index, ex
122
- elif self.config.schema == "nusantara_ssp":
123
  for index, row in enumerate(data):
124
  ex = {
125
  "id": index,
 
4
 
5
  import datasets
6
 
7
+ from seacrowd.utils import schemas
8
+ from seacrowd.utils.configs import SEACrowdConfig
9
+ from seacrowd.utils.constants import Tasks, Licenses
10
 
11
  _CITATION = """\
12
  @article{FrogStorytelling,
 
31
  """
32
  _HOMEPAGE = "https://github.com/matbahasa/corpus-frog-storytelling"
33
  _LANGUAGES = ["ind"]
34
+ _LICENSE = Licenses.CC_BY_SA_4_0.value
35
  _LOCAL = False
36
  _URLS = {
37
  _DATASETNAME: "https://github.com/matbahasa/corpus-frog-storytelling/archive/refs/heads/master.zip",
38
  }
39
  _SUPPORTED_TASKS = [Tasks.SELF_SUPERVISED_PRETRAINING]
40
  _SOURCE_VERSION = "1.0.0"
41
+ _SEACROWD_VERSION = "2024.06.20"
42
 
43
 
44
  class IdFrogStory(datasets.GeneratorBasedBuilder):
45
  """IdFrogStory contains 13 spoken datasets and 11 written datasets"""
46
 
47
  BUILDER_CONFIGS = [
48
+ SEACrowdConfig(
49
  name="id_frog_story_source",
50
  version=datasets.Version(_SOURCE_VERSION),
51
  description="IdFrogStory source schema",
52
  schema="source",
53
  subset_id="id_frog_story",
54
  ),
55
+ SEACrowdConfig(
56
+ name="id_frog_story_seacrowd_ssp",
57
+ version=datasets.Version(_SEACROWD_VERSION),
58
  description="IdFrogStory Nusantara schema",
59
+ schema="seacrowd_ssp",
60
  subset_id="id_frog_story",
61
  ),
62
  ]
 
71
  "text": datasets.Value("string"),
72
  }
73
  )
74
+ elif self.config.schema == "seacrowd_ssp":
75
  features = schemas.self_supervised_pretraining.features
76
 
77
  return datasets.DatasetInfo(
 
119
  "text": row
120
  }
121
  yield index, ex
122
+ elif self.config.schema == "seacrowd_ssp":
123
  for index, row in enumerate(data):
124
  ex = {
125
  "id": index,