Datasets:
GEM
/

Multilinguality:
unknown
Size Categories:
unknown
Language Creators:
unknown
Annotations Creators:
none
Source Datasets:
original
License:
j-chim commited on
Commit
a9c4360
1 Parent(s): a88f2c1

Update multilingual data

Browse files
README.md CHANGED
@@ -106,11 +106,14 @@ The fields are the same across all splits.
106
 
107
 
108
  ### Data Statistics
109
- |dataset |train |validation|test|
110
- |-------:|:-----:|:--------:|:--:|
111
- |BiSECT |928440 | 9079|583 |
112
- |HSplit |-- |-- |359 |
113
- |Challenge Set|--|-- |1798|
 
 
 
114
 
115
  ## Dataset Creation
116
 
 
106
 
107
 
108
  ### Data Statistics
109
+ |dataset |train |validation |test |
110
+ |--------:|:-----:|:---------:|:---:|
111
+ |BiSECT-en|928,440| 9,079|583 |
112
+ |BiSECT-de|184,638| 864|735 |
113
+ |BiSECT-es|282,944| 3,638|3,081|
114
+ |BiSECT-fr|491,035| 2,400|1,036|
115
+ |HSplit |-- |-- |359 |
116
+ |Challenge Set|-- |-- |1,798|
117
 
118
  ## Dataset Creation
119
 
bisect.json → bisect-11_24_2021_13_05_49.json RENAMED
@@ -12,30 +12,25 @@
12
  "contact-email": "jkim0118@seas.upenn.edu, mmaddela3@gatech.edu, rkriz1@jh.edu"
13
  },
14
  "languages": {
15
- "is-multilingual": "no",
16
  "license": "other: Other license",
17
  "task-other": "N/A",
18
  "language-names": [
19
- "English"
 
 
 
20
  ],
21
  "license-other": "The dataset is not licensed by itself, and the source OPUS data consists solely of publicly available parallel corpora.",
22
  "task": "Simplification",
23
  "communicative": "To rewrite a long, complex sentence into shorter, readable, meaning-equivalent sentences.",
24
  "intended-use": "Split and Rephrase."
25
  },
26
- "credit": {
27
- "organization-type": [
28
- "academic"
29
- ],
30
- "organization-names": "University of Pennsylvania, Georgia Institute of Technology",
31
- "creators": "Joongwon Kim (University of Pennsylvania), Mounica Maddela (Georgia Institute of Technology), Reno Kriz (University of Pennsylvania, Johns Hopkins University), Wei Xu (Georgia Institute of Technology), Chris Callison-Burch (University of Pennsylvania)",
32
- "funding": "This work is supported in part by the NSF awards IIS-2055699, ODNI and IARPA via the BETTER program (contract 19051600004), and the DARPA KAIROS Program (contract FA8750-19-2-1004).",
33
- "gem-added-by": "Reno Kriz (Johns Hopkins University), Jenny Chim (Queen Mary University of London)"
34
- },
35
  "structure": {
36
  "data-fields": "gem_id - (string) a unique identifier for the instance\nsource_sentence - (string) sentence to be simplified\ntarget_sentence - (string) simplified text that was split and rephrased",
37
  "structure-example": "{\n \"gem_id\": \"bisect-train-0\",\n \"source_sentence\": \"The report on the visit to Bhutan states that the small community has made the task of coordination less complex and success is manifested in the synchronized programming cycles which now apply to all but one of the agencies ( the World Health Organization ) .\",\n \"target_sentence\": \"The report on the visit to Bhutan says that the small community has made the coordination work less complex . Success manifests itself in synchronized programming cycles that now apply to all but one organism ( the World Health Organization ) .\"\n}",
38
- "structure-splits": "For the main English BiSECT dataset, the splits are as follows:\n(1) train (n=928440)\n(2) validation (n=9079)\n(3) test (n=583)\nAdditional challenge sets were derived from the data presented in the paper. Please refer to the challenge set sections.",
39
  "structure-description": "N/A",
40
  "structure-labels": "N/A",
41
  "structure-splits-criteria": "While all training data were derived from subsets of the OPUS corpora, different source subsets were used for training v.s., validation and testing. The training set comprised more web crawl data, whereas development and test sets comprised EMEA and EU texts. Details can be found in the BiSECT paper.",
 
12
  "contact-email": "jkim0118@seas.upenn.edu, mmaddela3@gatech.edu, rkriz1@jh.edu"
13
  },
14
  "languages": {
15
+ "is-multilingual": "yes",
16
  "license": "other: Other license",
17
  "task-other": "N/A",
18
  "language-names": [
19
+ "English",
20
+ "German",
21
+ "French",
22
+ "Spanish, Castilian"
23
  ],
24
  "license-other": "The dataset is not licensed by itself, and the source OPUS data consists solely of publicly available parallel corpora.",
25
  "task": "Simplification",
26
  "communicative": "To rewrite a long, complex sentence into shorter, readable, meaning-equivalent sentences.",
27
  "intended-use": "Split and Rephrase."
28
  },
29
+ "credit": {},
 
 
 
 
 
 
 
 
30
  "structure": {
31
  "data-fields": "gem_id - (string) a unique identifier for the instance\nsource_sentence - (string) sentence to be simplified\ntarget_sentence - (string) simplified text that was split and rephrased",
32
  "structure-example": "{\n \"gem_id\": \"bisect-train-0\",\n \"source_sentence\": \"The report on the visit to Bhutan states that the small community has made the task of coordination less complex and success is manifested in the synchronized programming cycles which now apply to all but one of the agencies ( the World Health Organization ) .\",\n \"target_sentence\": \"The report on the visit to Bhutan says that the small community has made the coordination work less complex . Success manifests itself in synchronized programming cycles that now apply to all but one organism ( the World Health Organization ) .\"\n}",
33
+ "structure-splits": "For the main English BiSECT dataset, the splits are as follows: 1. Train (n=928440) 2. Validation (n=9079) 3. Test (n=583) Additional challenge sets were derived from the data presented in the paper. Please refer to the challenge set sections. The train/validation/test splits for other languages are as follows: German (n=184638/n=864/n=735) Spanish (n=282944/n=3638/n=3081) French (n=491035/n=2400/n=1036)",
34
  "structure-description": "N/A",
35
  "structure-labels": "N/A",
36
  "structure-splits-criteria": "While all training data were derived from subsets of the OPUS corpora, different source subsets were used for training v.s., validation and testing. The training set comprised more web crawl data, whereas development and test sets comprised EMEA and EU texts. Details can be found in the BiSECT paper.",
bisect.py CHANGED
@@ -46,7 +46,6 @@ _URL = "https://raw.githubusercontent.com/mounicam/BiSECT/main/"
46
  _URL_MAIN = _URL + "bisect/"
47
  _URL_CHALLENGE = _URL + "bisect_challenge/"
48
 
49
-
50
  _URLs = {
51
  datasets.Split.TRAIN: {
52
  "src": _URL_MAIN + "train.src.gz",
@@ -78,13 +77,28 @@ class BiSECT(datasets.GeneratorBasedBuilder):
78
 
79
  BUILDER_CONFIGS = [
80
  datasets.BuilderConfig(
81
- name="bisect",
82
  version=VERSION,
83
- description="Data described in the BiSECT paper",
84
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  ]
86
 
87
- DEFAULT_CONFIG_NAME = "bisect"
88
 
89
  def _info(self):
90
  return datasets.DatasetInfo(
@@ -103,20 +117,44 @@ class BiSECT(datasets.GeneratorBasedBuilder):
103
 
104
  def _split_generators(self, dl_manager):
105
  """Returns SplitGenerators."""
106
- data_dir = dl_manager.download_and_extract(_URLs)
107
- return [
108
- datasets.SplitGenerator(
109
- name=split_name,
110
- gen_kwargs={"filepath": data_dir[split_name], "split": split_name},
111
- )
112
- for split_name in data_dir
113
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  def _generate_examples(self, filepath, split):
116
  """Yields examples as (key, example) tuples."""
117
 
118
- source_filepath = filepath["src"]
119
- target_filepath = filepath["dst"]
 
 
 
 
120
 
121
  with open(source_filepath, encoding="utf-8") as f:
122
  source_lines = [line.strip() for line in f if line.strip()]
 
46
  _URL_MAIN = _URL + "bisect/"
47
  _URL_CHALLENGE = _URL + "bisect_challenge/"
48
 
 
49
  _URLs = {
50
  datasets.Split.TRAIN: {
51
  "src": _URL_MAIN + "train.src.gz",
 
77
 
78
  BUILDER_CONFIGS = [
79
  datasets.BuilderConfig(
80
+ name="en",
81
  version=VERSION,
82
+ description="English data described in the BiSECT paper",
83
+ ),
84
+ datasets.BuilderConfig(
85
+ name="de",
86
+ version=VERSION,
87
+ description="German data described in the BiSECT paper",
88
+ ),
89
+ datasets.BuilderConfig(
90
+ name="es",
91
+ version=VERSION,
92
+ description="Spanish data described in the BiSECT paper",
93
+ ),
94
+ datasets.BuilderConfig(
95
+ name="fr",
96
+ version=VERSION,
97
+ description="French data described in the BiSECT paper",
98
+ ),
99
  ]
100
 
101
+ DEFAULT_CONFIG_NAME = "en"
102
 
103
  def _info(self):
104
  return datasets.DatasetInfo(
 
117
 
118
  def _split_generators(self, dl_manager):
119
  """Returns SplitGenerators."""
120
+ if self.config.name == "en":
121
+ data_dir = dl_manager.download_and_extract(_URLs)
122
+ return [
123
+ datasets.SplitGenerator(
124
+ name=split_name,
125
+ gen_kwargs={"filepath": data_dir[split_name], "split": split_name},
126
+ )
127
+ for split_name in data_dir
128
+ ]
129
+ else:
130
+ lang = self.config.name
131
+ url = _URL + "bisect_multilingual/" + f"bisect_{lang}.gz"
132
+ data_dir = dl_manager.download_and_extract(url)
133
+
134
+ return [
135
+ datasets.SplitGenerator(
136
+ name=f"{split}_{lang}",
137
+ gen_kwargs={
138
+ "filepath": os.path.join(data_dir, lang),
139
+ "split": split,
140
+ },
141
+ )
142
+ for split in (
143
+ datasets.Split.TRAIN,
144
+ datasets.Split.VALIDATION,
145
+ datasets.Split.TEST,
146
+ )
147
+ ]
148
 
149
  def _generate_examples(self, filepath, split):
150
  """Yields examples as (key, example) tuples."""
151
 
152
+ if self.config.name == "en":
153
+ source_filepath = filepath["src"]
154
+ target_filepath = filepath["dst"]
155
+ else:
156
+ source_filepath = os.path.join(filepath, f"{split}.complex")
157
+ target_filepath = os.path.join(filepath, f"{split}.simple")
158
 
159
  with open(source_filepath, encoding="utf-8") as f:
160
  source_lines = [line.strip() for line in f if line.strip()]