holylovenia commited on
Commit
bc408dc
1 Parent(s): 8c636f4

Upload minangnlp_mt.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. minangnlp_mt.py +12 -12
minangnlp_mt.py CHANGED
@@ -3,9 +3,9 @@ from typing import Dict, List, Tuple
3
 
4
  import datasets
5
 
6
- from nusacrowd.utils import schemas
7
- from nusacrowd.utils.configs import NusantaraConfig
8
- from nusacrowd.utils.constants import Tasks
9
 
10
  _CITATION = """\
11
  @inproceedings{koto-koto-2020-towards,
@@ -48,28 +48,28 @@ _URLS = {
48
  _SUPPORTED_TASKS = [Tasks.MACHINE_TRANSLATION]
49
  # Dataset does not have versioning
50
  _SOURCE_VERSION = "1.0.0"
51
- _NUSANTARA_VERSION = "1.0.0"
52
 
53
 
54
  class MinangNLPmt(datasets.GeneratorBasedBuilder):
55
  """16,371-size parallel Minangkabau-Indonesian sentence pairs."""
56
 
57
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
58
- NUSANTARA_VERSION = datasets.Version(_NUSANTARA_VERSION)
59
 
60
  BUILDER_CONFIGS = [
61
- NusantaraConfig(
62
  name="minangnlp_mt_source",
63
  version=SOURCE_VERSION,
64
  description="MinangNLP Machine Translation source schema",
65
  schema="source",
66
  subset_id="minangnlp_mt",
67
  ),
68
- NusantaraConfig(
69
- name="minangnlp_mt_nusantara_t2t",
70
- version=NUSANTARA_VERSION,
71
  description="MinangNLP Machine Translation Nusantara schema",
72
- schema="nusantara_t2t",
73
  subset_id="minangnlp_mt",
74
  ),
75
  ]
@@ -85,7 +85,7 @@ class MinangNLPmt(datasets.GeneratorBasedBuilder):
85
  "tgt": datasets.Value("string"),
86
  }
87
  )
88
- elif self.config.schema == "nusantara_t2t":
89
  features = schemas.text2text_features
90
 
91
  return datasets.DatasetInfo(
@@ -148,7 +148,7 @@ class MinangNLPmt(datasets.GeneratorBasedBuilder):
148
  }
149
  yield idx, row
150
 
151
- elif self.config.schema == "nusantara_t2t":
152
  row = {
153
  "id": str(idx),
154
  "text_1": src,
 
3
 
4
  import datasets
5
 
6
+ from seacrowd.utils import schemas
7
+ from seacrowd.utils.configs import SEACrowdConfig
8
+ from seacrowd.utils.constants import Tasks
9
 
10
  _CITATION = """\
11
  @inproceedings{koto-koto-2020-towards,
 
48
  _SUPPORTED_TASKS = [Tasks.MACHINE_TRANSLATION]
49
  # Dataset does not have versioning
50
  _SOURCE_VERSION = "1.0.0"
51
+ _SEACROWD_VERSION = "2024.06.20"
52
 
53
 
54
  class MinangNLPmt(datasets.GeneratorBasedBuilder):
55
  """16,371-size parallel Minangkabau-Indonesian sentence pairs."""
56
 
57
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
58
+ SEACROWD_VERSION = datasets.Version(_SEACROWD_VERSION)
59
 
60
  BUILDER_CONFIGS = [
61
+ SEACrowdConfig(
62
  name="minangnlp_mt_source",
63
  version=SOURCE_VERSION,
64
  description="MinangNLP Machine Translation source schema",
65
  schema="source",
66
  subset_id="minangnlp_mt",
67
  ),
68
+ SEACrowdConfig(
69
+ name="minangnlp_mt_seacrowd_t2t",
70
+ version=SEACROWD_VERSION,
71
  description="MinangNLP Machine Translation Nusantara schema",
72
+ schema="seacrowd_t2t",
73
  subset_id="minangnlp_mt",
74
  ),
75
  ]
 
85
  "tgt": datasets.Value("string"),
86
  }
87
  )
88
+ elif self.config.schema == "seacrowd_t2t":
89
  features = schemas.text2text_features
90
 
91
  return datasets.DatasetInfo(
 
148
  }
149
  yield idx, row
150
 
151
+ elif self.config.schema == "seacrowd_t2t":
152
  row = {
153
  "id": str(idx),
154
  "text_1": src,