holylovenia commited on
Commit
990aa6f
1 Parent(s): 62665dd

Upload id_short_answer_grading.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. id_short_answer_grading.py +13 -13
id_short_answer_grading.py CHANGED
@@ -4,11 +4,11 @@ from typing import Dict, List, Tuple
4
 
5
  import datasets
6
 
7
- from nusacrowd.nusa_datasets.id_short_answer_grading.utils.id_short_answer_grading_utils import \
8
  create_saintek_and_soshum_dataset
9
- from nusacrowd.utils import schemas
10
- from nusacrowd.utils.configs import NusantaraConfig
11
- from nusacrowd.utils.constants import Tasks
12
 
13
  _CITATION = """\
14
  @article{
@@ -72,28 +72,28 @@ _SUPPORTED_TASKS = [Tasks.SHORT_ANSWER_GRADING]
72
 
73
  _SOURCE_VERSION = "1.0.0"
74
 
75
- _NUSANTARA_VERSION = "1.0.0"
76
 
77
 
78
  class IdShortAnswerGrading(datasets.GeneratorBasedBuilder):
79
  """Indonesian short answers for Biology and Geography subjects from 534 respondents where the answer grading was done by 7 experts."""
80
 
81
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
82
- NUSANTARA_VERSION = datasets.Version(_NUSANTARA_VERSION)
83
 
84
  BUILDER_CONFIGS = [
85
- NusantaraConfig(
86
  name="id_short_answer_grading_source",
87
  version=SOURCE_VERSION,
88
  description="id_short_answer_grading source schema",
89
  schema="source",
90
  subset_id="id_short_answer_grading",
91
  ),
92
- NusantaraConfig(
93
- name="id_short_answer_grading_nusantara_pairs_score",
94
- version=NUSANTARA_VERSION,
95
  description="id_short_answer_grading Nusantara schema",
96
- schema="nusantara_pairs_score",
97
  subset_id="id_short_answer_grading",
98
  ),
99
  ]
@@ -112,7 +112,7 @@ class IdShortAnswerGrading(datasets.GeneratorBasedBuilder):
112
  "score": datasets.Value("int64"),
113
  }
114
  )
115
- elif self.config.schema == "nusantara_pairs_score":
116
  features = schemas.pairs_features([0, 1, 2, 3, 4, 5])
117
 
118
  return datasets.DatasetInfo(
@@ -184,7 +184,7 @@ class IdShortAnswerGrading(datasets.GeneratorBasedBuilder):
184
  }
185
  yield row.index, entry
186
 
187
- elif self.config.schema == "nusantara_pairs_score":
188
  for row in df.itertuples():
189
  entry = {
190
  "id": str(row.index),
 
4
 
5
  import datasets
6
 
7
+ from seacrowd.sea_datasets.id_short_answer_grading.utils.id_short_answer_grading_utils import \
8
  create_saintek_and_soshum_dataset
9
+ from seacrowd.utils import schemas
10
+ from seacrowd.utils.configs import SEACrowdConfig
11
+ from seacrowd.utils.constants import Tasks
12
 
13
  _CITATION = """\
14
  @article{
 
72
 
73
  _SOURCE_VERSION = "1.0.0"
74
 
75
+ _SEACROWD_VERSION = "2024.06.20"
76
 
77
 
78
  class IdShortAnswerGrading(datasets.GeneratorBasedBuilder):
79
  """Indonesian short answers for Biology and Geography subjects from 534 respondents where the answer grading was done by 7 experts."""
80
 
81
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
82
+ SEACROWD_VERSION = datasets.Version(_SEACROWD_VERSION)
83
 
84
  BUILDER_CONFIGS = [
85
+ SEACrowdConfig(
86
  name="id_short_answer_grading_source",
87
  version=SOURCE_VERSION,
88
  description="id_short_answer_grading source schema",
89
  schema="source",
90
  subset_id="id_short_answer_grading",
91
  ),
92
+ SEACrowdConfig(
93
+ name="id_short_answer_grading_seacrowd_pairs_score",
94
+ version=SEACROWD_VERSION,
95
  description="id_short_answer_grading Nusantara schema",
96
+ schema="seacrowd_pairs_score",
97
  subset_id="id_short_answer_grading",
98
  ),
99
  ]
 
112
  "score": datasets.Value("int64"),
113
  }
114
  )
115
+ elif self.config.schema == "seacrowd_pairs_score":
116
  features = schemas.pairs_features([0, 1, 2, 3, 4, 5])
117
 
118
  return datasets.DatasetInfo(
 
184
  }
185
  yield row.index, entry
186
 
187
+ elif self.config.schema == "seacrowd_pairs_score":
188
  for row in df.itertuples():
189
  entry = {
190
  "id": str(row.index),