Miquel Esplà Gomis commited on
Commit
73d6df6
1 Parent(s): 8e5d604

Adapting parallel_data to new metadata

Browse files
Files changed (1) hide show
  1. parallel_data.py +58 -9
parallel_data.py CHANGED
@@ -47,7 +47,8 @@ _URL = {
47
  "development": "https://object.pouta.csc.fi/Tatoeba-Challenge-devtest/dev.tar",
48
  }
49
 
50
- _LanguagePairs = [ "en-bg", "en-is", "en-sq", "en-mt", "en-mk", "en-sl", "en-tr" ]
 
51
  #_LanguagePairs = [ "en-bs", "en-bg", "en-is", "en-hr", "en-sq", "en-mt", "en-mk", "en-cnr", "en-sr", "en-sl", "en-tr" ]
52
 
53
  _LICENSE = "cc0"
@@ -80,10 +81,34 @@ class MaCoCu_parallel(datasets.GeneratorBasedBuilder):
80
  return datasets.DatasetInfo(
81
  description=_DESCRIPTION,
82
  features=datasets.Features({
83
- "sourceLang": datasets.Value("string"),
84
- "targetlang": datasets.Value("string"),
85
- "sourceString": datasets.Value("string"),
86
- "targetString": datasets.Value("string")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }),
88
  homepage=_HOMEPAGE,
89
  citation=_CITATION,
@@ -107,9 +132,33 @@ class MaCoCu_parallel(datasets.GeneratorBasedBuilder):
107
  if id_ == 0:
108
  continue
109
  yield id_, {
110
- "sourceLang": row[0],
111
- "targetlang": row[1],
112
- "sourceString": row[2],
113
- "targetString": row[3]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
 
 
47
  "development": "https://object.pouta.csc.fi/Tatoeba-Challenge-devtest/dev.tar",
48
  }
49
 
50
+ _LanguagePairs = [ "en-is" ]
51
+ #_LanguagePairs = [ "en-bg", "en-is", "en-sq", "en-mt", "en-mk", "en-sl", "en-tr" ]
52
  #_LanguagePairs = [ "en-bs", "en-bg", "en-is", "en-hr", "en-sq", "en-mt", "en-mk", "en-cnr", "en-sr", "en-sl", "en-tr" ]
53
 
54
  _LICENSE = "cc0"
 
81
  return datasets.DatasetInfo(
82
  description=_DESCRIPTION,
83
  features=datasets.Features({
84
+ "src_url": datasets.Value("string"),
85
+ "trg_url": datasets.Value("string"),
86
+ "src_text": datasets.Value("string"),
87
+ "trg_text": datasets.Value("string"),
88
+ "bleualign_score": datasets.Value("string"),
89
+ "src_deferred_hash": datasets.Value("string"),
90
+ "trg_deferred_hash": datasets.Value("string"),
91
+ "src_paragraph_id": datasets.Value("string"),
92
+ "trg_paragraph_id": datasets.Value("string"),
93
+ "src_doc_title": datasets.Value("string"),
94
+ "trg_doc_title": datasets.Value("string"),
95
+ "src_crawl_date": datasets.Value("string"),
96
+ "trg_crawl_date": datasets.Value("string"),
97
+ "src_file_type": datasets.Value("string"),
98
+ "trg_file_type": datasets.Value("string"),
99
+ "src_boilerplate": datasets.Value("string"),
100
+ "trg_boilerplate": datasets.Value("string"),
101
+ "src_heading_html_tag": datasets.Value("string"),
102
+ "trg_heading_html_tag": datasets.Value("string"),
103
+ "bifixer_hash": datasets.Value("string"),
104
+ "bifixer_score": datasets.Value("string"),
105
+ "bicleaner_ai_score": datasets.Value("string"),
106
+ "biroamer_entities_detected": datasets.Value("string"),
107
+ "dsi": datasets.Value("string"),
108
+ "translation_direction": datasets.Value("string"),
109
+ "en_document_level_variant": datasets.Value("string"),
110
+ "domain_en": datasets.Value("string"),
111
+ "en_domain_level_variant": datasets.Value("string")
112
  }),
113
  homepage=_HOMEPAGE,
114
  citation=_CITATION,
 
132
  if id_ == 0:
133
  continue
134
  yield id_, {
135
+ "src_url": row[0],
136
+ "trg_url": row[1],
137
+ "src_text": row[2],
138
+ "trg_text": row[3],
139
+ "bleualign_score": row[4],
140
+ "src_deferred_hash": row[5],
141
+ "trg_deferred_hash": row[6],
142
+ "src_paragraph_id": row[7],
143
+ "trg_paragraph_id": row[8],
144
+ "src_doc_title": row[9],
145
+ "trg_doc_title": row[10],
146
+ "src_crawl_date": row[11],
147
+ "trg_crawl_date": row[12],
148
+ "src_file_type": row[13],
149
+ "trg_file_type": row[14],
150
+ "src_boilerplate": row[15],
151
+ "trg_boilerplate": row[16],
152
+ "src_heading_html_tag": row[17],
153
+ "trg_heading_html_tag": row[18],
154
+ "bifixer_hash": row[19],
155
+ "bifixer_score": row[20],
156
+ "bicleaner_ai_score": row[21],
157
+ "biroamer_entities_detected": row[22],
158
+ "dsi": row[23],
159
+ "translation_direction": row[24],
160
+ "en_document_level_variant": row[25],
161
+ "domain_en": row[26],
162
+ "en_domain_level_variant": row[27]
163
  }
164