hpprc commited on
Commit
a712b0f
1 Parent(s): 92bf1ff
Files changed (1) hide show
  1. en-ja-align.py +3 -3
en-ja-align.py CHANGED
@@ -126,7 +126,7 @@ class EnJaAlignDataset(ds.GeneratorBasedBuilder):
126
  if self.config.name == "default":
127
  features = ds.Features(
128
  {
129
- "id": ds.Value("int64"),
130
  "en": ds.Value("string"),
131
  "ja": ds.Value("string"),
132
  "source": ds.Value("string"),
@@ -164,12 +164,12 @@ class EnJaAlignDataset(ds.GeneratorBasedBuilder):
164
  return text
165
 
166
  def _generate_examples(self, paths: List[Path]):
167
- idx = 0
168
-
169
  for path in paths:
 
170
  texts_en, texts_ja = parse_html_table(path)
171
  for text_en, text_ja in zip(texts_en, texts_ja, strict=True):
172
  row = {
 
173
  "en": self._preprocess_en(text_en),
174
  "ja": self._preprocess_ja(text_ja),
175
  "source": path.name,
 
126
  if self.config.name == "default":
127
  features = ds.Features(
128
  {
129
+ "id": ds.Value("string"),
130
  "en": ds.Value("string"),
131
  "ja": ds.Value("string"),
132
  "source": ds.Value("string"),
 
164
  return text
165
 
166
  def _generate_examples(self, paths: List[Path]):
 
 
167
  for path in paths:
168
+ idx = 0
169
  texts_en, texts_ja = parse_html_table(path)
170
  for text_en, text_ja in zip(texts_en, texts_ja, strict=True):
171
  row = {
172
+ "id": f"{path.name}/{idx}",
173
  "en": self._preprocess_en(text_en),
174
  "ja": self._preprocess_ja(text_ja),
175
  "source": path.name,