bbaaaa commited on
Commit
c9a9415
1 Parent(s): 8a92538

Update iwslt14-de-en.py

Browse files
Files changed (1) hide show
  1. iwslt14-de-en.py +7 -10
iwslt14-de-en.py CHANGED
@@ -47,7 +47,7 @@ _CITATION = """\
47
  }
48
  """
49
 
50
- REPO_URL = "https://huggingface.co/datasets/bbaaaa/iwslt14-de-en/resolve/main/"
51
  URL = REPO_URL + "data/de-en.zip"
52
 
53
 
@@ -100,7 +100,6 @@ class IWSLT2017(datasets.GeneratorBasedBuilder):
100
  bi_url = URL
101
  dl_dir = dl_manager.download_and_extract(bi_url)
102
  data_dir = os.path.join(dl_dir, f"{source}-{target}")
103
- years = [2010, 2011, 2012]
104
  return [
105
  datasets.SplitGenerator(
106
  name=datasets.Split.TRAIN,
@@ -108,13 +107,13 @@ class IWSLT2017(datasets.GeneratorBasedBuilder):
108
  "source_files": [
109
  os.path.join(
110
  data_dir,
111
- f"train.tags.{self.config.pair}.{source}",
112
  )
113
  ],
114
  "target_files": [
115
  os.path.join(
116
  data_dir,
117
- f"train.tags.{self.config.pair}.{target}",
118
  )
119
  ],
120
  },
@@ -125,16 +124,14 @@ class IWSLT2017(datasets.GeneratorBasedBuilder):
125
  "source_files": [
126
  os.path.join(
127
  data_dir,
128
- f"IWSLT14.TED.tst{year}.{self.config.pair}.{source}.xml",
129
  )
130
- for year in years
131
  ],
132
  "target_files": [
133
  os.path.join(
134
  data_dir,
135
- f"IWSLT14.TED.tst{year}.{self.config.pair}.{target}.xml",
136
  )
137
- for year in years
138
  ],
139
  },
140
  ),
@@ -144,13 +141,13 @@ class IWSLT2017(datasets.GeneratorBasedBuilder):
144
  "source_files": [
145
  os.path.join(
146
  data_dir,
147
- f"IWSLT14.TED.dev2010.{self.config.pair}.{source}.xml",
148
  )
149
  ],
150
  "target_files": [
151
  os.path.join(
152
  data_dir,
153
- f"IWSLT14.TED.dev2010.{self.config.pair}.{target}.xml",
154
  )
155
  ],
156
  },
 
47
  }
48
  """
49
 
50
+ REPO_URL = "https://huggingface.co/datasets/bbaaaa/iwslt14-de-en-preprocess/resolve/main/"
51
  URL = REPO_URL + "data/de-en.zip"
52
 
53
 
 
100
  bi_url = URL
101
  dl_dir = dl_manager.download_and_extract(bi_url)
102
  data_dir = os.path.join(dl_dir, f"{source}-{target}")
 
103
  return [
104
  datasets.SplitGenerator(
105
  name=datasets.Split.TRAIN,
 
107
  "source_files": [
108
  os.path.join(
109
  data_dir,
110
+ f"train.{source}",
111
  )
112
  ],
113
  "target_files": [
114
  os.path.join(
115
  data_dir,
116
+ f"train.{target}",
117
  )
118
  ],
119
  },
 
124
  "source_files": [
125
  os.path.join(
126
  data_dir,
127
+ f"test.{source}",
128
  )
 
129
  ],
130
  "target_files": [
131
  os.path.join(
132
  data_dir,
133
+ f"test.{target}",
134
  )
 
135
  ],
136
  },
137
  ),
 
141
  "source_files": [
142
  os.path.join(
143
  data_dir,
144
+ f"valid.{source}",
145
  )
146
  ],
147
  "target_files": [
148
  os.path.join(
149
  data_dir,
150
+ f"valid.{target}",
151
  )
152
  ],
153
  },