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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"nbformat": 4,
|
3 |
+
"nbformat_minor": 0,
|
4 |
+
"metadata": {
|
5 |
+
"colab": {
|
6 |
+
"provenance": [],
|
7 |
+
"machine_shape": "hm"
|
8 |
+
},
|
9 |
+
"kernelspec": {
|
10 |
+
"name": "python3",
|
11 |
+
"display_name": "Python 3"
|
12 |
+
},
|
13 |
+
"language_info": {
|
14 |
+
"name": "python"
|
15 |
+
},
|
16 |
+
"widgets": {
|
17 |
+
"application/vnd.jupyter.widget-state+json": {
|
18 |
+
"566f1e56bfe04c07a27bd4504f2bb854": {
|
19 |
+
"model_module": "@jupyter-widgets/controls",
|
20 |
+
"model_name": "VBoxModel",
|
21 |
+
"model_module_version": "1.5.0",
|
22 |
+
"state": {
|
23 |
+
"_dom_classes": [],
|
24 |
+
"_model_module": "@jupyter-widgets/controls",
|
25 |
+
"_model_module_version": "1.5.0",
|
26 |
+
"_model_name": "VBoxModel",
|
27 |
+
"_view_count": null,
|
28 |
+
"_view_module": "@jupyter-widgets/controls",
|
29 |
+
"_view_module_version": "1.5.0",
|
30 |
+
"_view_name": "VBoxView",
|
31 |
+
"box_style": "",
|
32 |
+
"children": [],
|
33 |
+
"layout": "IPY_MODEL_3eadb00fc21642498e07d71079f74301"
|
34 |
+
}
|
35 |
+
},
|
36 |
+
"fe9df307b35c4b0b918b3bf162cd89fd": {
|
37 |
+
"model_module": "@jupyter-widgets/controls",
|
38 |
+
"model_name": "HTMLModel",
|
39 |
+
"model_module_version": "1.5.0",
|
40 |
+
"state": {
|
41 |
+
"_dom_classes": [],
|
42 |
+
"_model_module": "@jupyter-widgets/controls",
|
43 |
+
"_model_module_version": "1.5.0",
|
44 |
+
"_model_name": "HTMLModel",
|
45 |
+
"_view_count": null,
|
46 |
+
"_view_module": "@jupyter-widgets/controls",
|
47 |
+
"_view_module_version": "1.5.0",
|
48 |
+
"_view_name": "HTMLView",
|
49 |
+
"description": "",
|
50 |
+
"description_tooltip": null,
|
51 |
+
"layout": "IPY_MODEL_6890a72c9a6d4407984cf356cec2e268",
|
52 |
+
"placeholder": "",
|
53 |
+
"style": "IPY_MODEL_3f9e1ff506ce4ff3aab0750a0b948bc3",
|
54 |
+
"value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
|
55 |
+
}
|
56 |
+
},
|
57 |
+
"7ee8cdc19bd2479a9fbc90e8bfc97766": {
|
58 |
+
"model_module": "@jupyter-widgets/controls",
|
59 |
+
"model_name": "PasswordModel",
|
60 |
+
"model_module_version": "1.5.0",
|
61 |
+
"state": {
|
62 |
+
"_dom_classes": [],
|
63 |
+
"_model_module": "@jupyter-widgets/controls",
|
64 |
+
"_model_module_version": "1.5.0",
|
65 |
+
"_model_name": "PasswordModel",
|
66 |
+
"_view_count": null,
|
67 |
+
"_view_module": "@jupyter-widgets/controls",
|
68 |
+
"_view_module_version": "1.5.0",
|
69 |
+
"_view_name": "PasswordView",
|
70 |
+
"continuous_update": true,
|
71 |
+
"description": "Token:",
|
72 |
+
"description_tooltip": null,
|
73 |
+
"disabled": false,
|
74 |
+
"layout": "IPY_MODEL_38f848529f7d4e499583a04fcc23e684",
|
75 |
+
"placeholder": "",
|
76 |
+
"style": "IPY_MODEL_2c473d21b21d444298341cfa2f4955fb",
|
77 |
+
"value": ""
|
78 |
+
}
|
79 |
+
},
|
80 |
+
"26bad56be4854c98bfda174e218b37d5": {
|
81 |
+
"model_module": "@jupyter-widgets/controls",
|
82 |
+
"model_name": "CheckboxModel",
|
83 |
+
"model_module_version": "1.5.0",
|
84 |
+
"state": {
|
85 |
+
"_dom_classes": [],
|
86 |
+
"_model_module": "@jupyter-widgets/controls",
|
87 |
+
"_model_module_version": "1.5.0",
|
88 |
+
"_model_name": "CheckboxModel",
|
89 |
+
"_view_count": null,
|
90 |
+
"_view_module": "@jupyter-widgets/controls",
|
91 |
+
"_view_module_version": "1.5.0",
|
92 |
+
"_view_name": "CheckboxView",
|
93 |
+
"description": "Add token as git credential?",
|
94 |
+
"description_tooltip": null,
|
95 |
+
"disabled": false,
|
96 |
+
"indent": true,
|
97 |
+
"layout": "IPY_MODEL_26acce0feccf44959b87ed3f4306582e",
|
98 |
+
"style": "IPY_MODEL_3a85fa552b65424a8e1bdc1414409433",
|
99 |
+
"value": true
|
100 |
+
}
|
101 |
+
},
|
102 |
+
"2b966741922c4c568f2edfbda93ee2f1": {
|
103 |
+
"model_module": "@jupyter-widgets/controls",
|
104 |
+
"model_name": "ButtonModel",
|
105 |
+
"model_module_version": "1.5.0",
|
106 |
+
"state": {
|
107 |
+
"_dom_classes": [],
|
108 |
+
"_model_module": "@jupyter-widgets/controls",
|
109 |
+
"_model_module_version": "1.5.0",
|
110 |
+
"_model_name": "ButtonModel",
|
111 |
+
"_view_count": null,
|
112 |
+
"_view_module": "@jupyter-widgets/controls",
|
113 |
+
"_view_module_version": "1.5.0",
|
114 |
+
"_view_name": "ButtonView",
|
115 |
+
"button_style": "",
|
116 |
+
"description": "Login",
|
117 |
+
"disabled": false,
|
118 |
+
"icon": "",
|
119 |
+
"layout": "IPY_MODEL_1be4bfddafd14821bc6cc117ae80310c",
|
120 |
+
"style": "IPY_MODEL_ab026ec0e7034f0db99291eae2e2b3ad",
|
121 |
+
"tooltip": ""
|
122 |
+
}
|
123 |
+
},
|
124 |
+
"1d4c8574c05e462bac290aa65c72a955": {
|
125 |
+
"model_module": "@jupyter-widgets/controls",
|
126 |
+
"model_name": "HTMLModel",
|
127 |
+
"model_module_version": "1.5.0",
|
128 |
+
"state": {
|
129 |
+
"_dom_classes": [],
|
130 |
+
"_model_module": "@jupyter-widgets/controls",
|
131 |
+
"_model_module_version": "1.5.0",
|
132 |
+
"_model_name": "HTMLModel",
|
133 |
+
"_view_count": null,
|
134 |
+
"_view_module": "@jupyter-widgets/controls",
|
135 |
+
"_view_module_version": "1.5.0",
|
136 |
+
"_view_name": "HTMLView",
|
137 |
+
"description": "",
|
138 |
+
"description_tooltip": null,
|
139 |
+
"layout": "IPY_MODEL_714707fa2a844c4baeaa457b045bbcac",
|
140 |
+
"placeholder": "",
|
141 |
+
"style": "IPY_MODEL_e964314c2a004fd3b55267d0b0b16625",
|
142 |
+
"value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
|
143 |
+
}
|
144 |
+
},
|
145 |
+
"3eadb00fc21642498e07d71079f74301": {
|
146 |
+
"model_module": "@jupyter-widgets/base",
|
147 |
+
"model_name": "LayoutModel",
|
148 |
+
"model_module_version": "1.2.0",
|
149 |
+
"state": {
|
150 |
+
"_model_module": "@jupyter-widgets/base",
|
151 |
+
"_model_module_version": "1.2.0",
|
152 |
+
"_model_name": "LayoutModel",
|
153 |
+
"_view_count": null,
|
154 |
+
"_view_module": "@jupyter-widgets/base",
|
155 |
+
"_view_module_version": "1.2.0",
|
156 |
+
"_view_name": "LayoutView",
|
157 |
+
"align_content": null,
|
158 |
+
"align_items": "center",
|
159 |
+
"align_self": null,
|
160 |
+
"border": null,
|
161 |
+
"bottom": null,
|
162 |
+
"display": "flex",
|
163 |
+
"flex": null,
|
164 |
+
"flex_flow": "column",
|
165 |
+
"grid_area": null,
|
166 |
+
"grid_auto_columns": null,
|
167 |
+
"grid_auto_flow": null,
|
168 |
+
"grid_auto_rows": null,
|
169 |
+
"grid_column": null,
|
170 |
+
"grid_gap": null,
|
171 |
+
"grid_row": null,
|
172 |
+
"grid_template_areas": null,
|
173 |
+
"grid_template_columns": null,
|
174 |
+
"grid_template_rows": null,
|
175 |
+
"height": null,
|
176 |
+
"justify_content": null,
|
177 |
+
"justify_items": null,
|
178 |
+
"left": null,
|
179 |
+
"margin": null,
|
180 |
+
"max_height": null,
|
181 |
+
"max_width": null,
|
182 |
+
"min_height": null,
|
183 |
+
"min_width": null,
|
184 |
+
"object_fit": null,
|
185 |
+
"object_position": null,
|
186 |
+
"order": null,
|
187 |
+
"overflow": null,
|
188 |
+
"overflow_x": null,
|
189 |
+
"overflow_y": null,
|
190 |
+
"padding": null,
|
191 |
+
"right": null,
|
192 |
+
"top": null,
|
193 |
+
"visibility": null,
|
194 |
+
"width": "50%"
|
195 |
+
}
|
196 |
+
},
|
197 |
+
"6890a72c9a6d4407984cf356cec2e268": {
|
198 |
+
"model_module": "@jupyter-widgets/base",
|
199 |
+
"model_name": "LayoutModel",
|
200 |
+
"model_module_version": "1.2.0",
|
201 |
+
"state": {
|
202 |
+
"_model_module": "@jupyter-widgets/base",
|
203 |
+
"_model_module_version": "1.2.0",
|
204 |
+
"_model_name": "LayoutModel",
|
205 |
+
"_view_count": null,
|
206 |
+
"_view_module": "@jupyter-widgets/base",
|
207 |
+
"_view_module_version": "1.2.0",
|
208 |
+
"_view_name": "LayoutView",
|
209 |
+
"align_content": null,
|
210 |
+
"align_items": null,
|
211 |
+
"align_self": null,
|
212 |
+
"border": null,
|
213 |
+
"bottom": null,
|
214 |
+
"display": null,
|
215 |
+
"flex": null,
|
216 |
+
"flex_flow": null,
|
217 |
+
"grid_area": null,
|
218 |
+
"grid_auto_columns": null,
|
219 |
+
"grid_auto_flow": null,
|
220 |
+
"grid_auto_rows": null,
|
221 |
+
"grid_column": null,
|
222 |
+
"grid_gap": null,
|
223 |
+
"grid_row": null,
|
224 |
+
"grid_template_areas": null,
|
225 |
+
"grid_template_columns": null,
|
226 |
+
"grid_template_rows": null,
|
227 |
+
"height": null,
|
228 |
+
"justify_content": null,
|
229 |
+
"justify_items": null,
|
230 |
+
"left": null,
|
231 |
+
"margin": null,
|
232 |
+
"max_height": null,
|
233 |
+
"max_width": null,
|
234 |
+
"min_height": null,
|
235 |
+
"min_width": null,
|
236 |
+
"object_fit": null,
|
237 |
+
"object_position": null,
|
238 |
+
"order": null,
|
239 |
+
"overflow": null,
|
240 |
+
"overflow_x": null,
|
241 |
+
"overflow_y": null,
|
242 |
+
"padding": null,
|
243 |
+
"right": null,
|
244 |
+
"top": null,
|
245 |
+
"visibility": null,
|
246 |
+
"width": null
|
247 |
+
}
|
248 |
+
},
|
249 |
+
"3f9e1ff506ce4ff3aab0750a0b948bc3": {
|
250 |
+
"model_module": "@jupyter-widgets/controls",
|
251 |
+
"model_name": "DescriptionStyleModel",
|
252 |
+
"model_module_version": "1.5.0",
|
253 |
+
"state": {
|
254 |
+
"_model_module": "@jupyter-widgets/controls",
|
255 |
+
"_model_module_version": "1.5.0",
|
256 |
+
"_model_name": "DescriptionStyleModel",
|
257 |
+
"_view_count": null,
|
258 |
+
"_view_module": "@jupyter-widgets/base",
|
259 |
+
"_view_module_version": "1.2.0",
|
260 |
+
"_view_name": "StyleView",
|
261 |
+
"description_width": ""
|
262 |
+
}
|
263 |
+
},
|
264 |
+
"38f848529f7d4e499583a04fcc23e684": {
|
265 |
+
"model_module": "@jupyter-widgets/base",
|
266 |
+
"model_name": "LayoutModel",
|
267 |
+
"model_module_version": "1.2.0",
|
268 |
+
"state": {
|
269 |
+
"_model_module": "@jupyter-widgets/base",
|
270 |
+
"_model_module_version": "1.2.0",
|
271 |
+
"_model_name": "LayoutModel",
|
272 |
+
"_view_count": null,
|
273 |
+
"_view_module": "@jupyter-widgets/base",
|
274 |
+
"_view_module_version": "1.2.0",
|
275 |
+
"_view_name": "LayoutView",
|
276 |
+
"align_content": null,
|
277 |
+
"align_items": null,
|
278 |
+
"align_self": null,
|
279 |
+
"border": null,
|
280 |
+
"bottom": null,
|
281 |
+
"display": null,
|
282 |
+
"flex": null,
|
283 |
+
"flex_flow": null,
|
284 |
+
"grid_area": null,
|
285 |
+
"grid_auto_columns": null,
|
286 |
+
"grid_auto_flow": null,
|
287 |
+
"grid_auto_rows": null,
|
288 |
+
"grid_column": null,
|
289 |
+
"grid_gap": null,
|
290 |
+
"grid_row": null,
|
291 |
+
"grid_template_areas": null,
|
292 |
+
"grid_template_columns": null,
|
293 |
+
"grid_template_rows": null,
|
294 |
+
"height": null,
|
295 |
+
"justify_content": null,
|
296 |
+
"justify_items": null,
|
297 |
+
"left": null,
|
298 |
+
"margin": null,
|
299 |
+
"max_height": null,
|
300 |
+
"max_width": null,
|
301 |
+
"min_height": null,
|
302 |
+
"min_width": null,
|
303 |
+
"object_fit": null,
|
304 |
+
"object_position": null,
|
305 |
+
"order": null,
|
306 |
+
"overflow": null,
|
307 |
+
"overflow_x": null,
|
308 |
+
"overflow_y": null,
|
309 |
+
"padding": null,
|
310 |
+
"right": null,
|
311 |
+
"top": null,
|
312 |
+
"visibility": null,
|
313 |
+
"width": null
|
314 |
+
}
|
315 |
+
},
|
316 |
+
"2c473d21b21d444298341cfa2f4955fb": {
|
317 |
+
"model_module": "@jupyter-widgets/controls",
|
318 |
+
"model_name": "DescriptionStyleModel",
|
319 |
+
"model_module_version": "1.5.0",
|
320 |
+
"state": {
|
321 |
+
"_model_module": "@jupyter-widgets/controls",
|
322 |
+
"_model_module_version": "1.5.0",
|
323 |
+
"_model_name": "DescriptionStyleModel",
|
324 |
+
"_view_count": null,
|
325 |
+
"_view_module": "@jupyter-widgets/base",
|
326 |
+
"_view_module_version": "1.2.0",
|
327 |
+
"_view_name": "StyleView",
|
328 |
+
"description_width": ""
|
329 |
+
}
|
330 |
+
},
|
331 |
+
"26acce0feccf44959b87ed3f4306582e": {
|
332 |
+
"model_module": "@jupyter-widgets/base",
|
333 |
+
"model_name": "LayoutModel",
|
334 |
+
"model_module_version": "1.2.0",
|
335 |
+
"state": {
|
336 |
+
"_model_module": "@jupyter-widgets/base",
|
337 |
+
"_model_module_version": "1.2.0",
|
338 |
+
"_model_name": "LayoutModel",
|
339 |
+
"_view_count": null,
|
340 |
+
"_view_module": "@jupyter-widgets/base",
|
341 |
+
"_view_module_version": "1.2.0",
|
342 |
+
"_view_name": "LayoutView",
|
343 |
+
"align_content": null,
|
344 |
+
"align_items": null,
|
345 |
+
"align_self": null,
|
346 |
+
"border": null,
|
347 |
+
"bottom": null,
|
348 |
+
"display": null,
|
349 |
+
"flex": null,
|
350 |
+
"flex_flow": null,
|
351 |
+
"grid_area": null,
|
352 |
+
"grid_auto_columns": null,
|
353 |
+
"grid_auto_flow": null,
|
354 |
+
"grid_auto_rows": null,
|
355 |
+
"grid_column": null,
|
356 |
+
"grid_gap": null,
|
357 |
+
"grid_row": null,
|
358 |
+
"grid_template_areas": null,
|
359 |
+
"grid_template_columns": null,
|
360 |
+
"grid_template_rows": null,
|
361 |
+
"height": null,
|
362 |
+
"justify_content": null,
|
363 |
+
"justify_items": null,
|
364 |
+
"left": null,
|
365 |
+
"margin": null,
|
366 |
+
"max_height": null,
|
367 |
+
"max_width": null,
|
368 |
+
"min_height": null,
|
369 |
+
"min_width": null,
|
370 |
+
"object_fit": null,
|
371 |
+
"object_position": null,
|
372 |
+
"order": null,
|
373 |
+
"overflow": null,
|
374 |
+
"overflow_x": null,
|
375 |
+
"overflow_y": null,
|
376 |
+
"padding": null,
|
377 |
+
"right": null,
|
378 |
+
"top": null,
|
379 |
+
"visibility": null,
|
380 |
+
"width": null
|
381 |
+
}
|
382 |
+
},
|
383 |
+
"3a85fa552b65424a8e1bdc1414409433": {
|
384 |
+
"model_module": "@jupyter-widgets/controls",
|
385 |
+
"model_name": "DescriptionStyleModel",
|
386 |
+
"model_module_version": "1.5.0",
|
387 |
+
"state": {
|
388 |
+
"_model_module": "@jupyter-widgets/controls",
|
389 |
+
"_model_module_version": "1.5.0",
|
390 |
+
"_model_name": "DescriptionStyleModel",
|
391 |
+
"_view_count": null,
|
392 |
+
"_view_module": "@jupyter-widgets/base",
|
393 |
+
"_view_module_version": "1.2.0",
|
394 |
+
"_view_name": "StyleView",
|
395 |
+
"description_width": ""
|
396 |
+
}
|
397 |
+
},
|
398 |
+
"1be4bfddafd14821bc6cc117ae80310c": {
|
399 |
+
"model_module": "@jupyter-widgets/base",
|
400 |
+
"model_name": "LayoutModel",
|
401 |
+
"model_module_version": "1.2.0",
|
402 |
+
"state": {
|
403 |
+
"_model_module": "@jupyter-widgets/base",
|
404 |
+
"_model_module_version": "1.2.0",
|
405 |
+
"_model_name": "LayoutModel",
|
406 |
+
"_view_count": null,
|
407 |
+
"_view_module": "@jupyter-widgets/base",
|
408 |
+
"_view_module_version": "1.2.0",
|
409 |
+
"_view_name": "LayoutView",
|
410 |
+
"align_content": null,
|
411 |
+
"align_items": null,
|
412 |
+
"align_self": null,
|
413 |
+
"border": null,
|
414 |
+
"bottom": null,
|
415 |
+
"display": null,
|
416 |
+
"flex": null,
|
417 |
+
"flex_flow": null,
|
418 |
+
"grid_area": null,
|
419 |
+
"grid_auto_columns": null,
|
420 |
+
"grid_auto_flow": null,
|
421 |
+
"grid_auto_rows": null,
|
422 |
+
"grid_column": null,
|
423 |
+
"grid_gap": null,
|
424 |
+
"grid_row": null,
|
425 |
+
"grid_template_areas": null,
|
426 |
+
"grid_template_columns": null,
|
427 |
+
"grid_template_rows": null,
|
428 |
+
"height": null,
|
429 |
+
"justify_content": null,
|
430 |
+
"justify_items": null,
|
431 |
+
"left": null,
|
432 |
+
"margin": null,
|
433 |
+
"max_height": null,
|
434 |
+
"max_width": null,
|
435 |
+
"min_height": null,
|
436 |
+
"min_width": null,
|
437 |
+
"object_fit": null,
|
438 |
+
"object_position": null,
|
439 |
+
"order": null,
|
440 |
+
"overflow": null,
|
441 |
+
"overflow_x": null,
|
442 |
+
"overflow_y": null,
|
443 |
+
"padding": null,
|
444 |
+
"right": null,
|
445 |
+
"top": null,
|
446 |
+
"visibility": null,
|
447 |
+
"width": null
|
448 |
+
}
|
449 |
+
},
|
450 |
+
"ab026ec0e7034f0db99291eae2e2b3ad": {
|
451 |
+
"model_module": "@jupyter-widgets/controls",
|
452 |
+
"model_name": "ButtonStyleModel",
|
453 |
+
"model_module_version": "1.5.0",
|
454 |
+
"state": {
|
455 |
+
"_model_module": "@jupyter-widgets/controls",
|
456 |
+
"_model_module_version": "1.5.0",
|
457 |
+
"_model_name": "ButtonStyleModel",
|
458 |
+
"_view_count": null,
|
459 |
+
"_view_module": "@jupyter-widgets/base",
|
460 |
+
"_view_module_version": "1.2.0",
|
461 |
+
"_view_name": "StyleView",
|
462 |
+
"button_color": null,
|
463 |
+
"font_weight": ""
|
464 |
+
}
|
465 |
+
},
|
466 |
+
"714707fa2a844c4baeaa457b045bbcac": {
|
467 |
+
"model_module": "@jupyter-widgets/base",
|
468 |
+
"model_name": "LayoutModel",
|
469 |
+
"model_module_version": "1.2.0",
|
470 |
+
"state": {
|
471 |
+
"_model_module": "@jupyter-widgets/base",
|
472 |
+
"_model_module_version": "1.2.0",
|
473 |
+
"_model_name": "LayoutModel",
|
474 |
+
"_view_count": null,
|
475 |
+
"_view_module": "@jupyter-widgets/base",
|
476 |
+
"_view_module_version": "1.2.0",
|
477 |
+
"_view_name": "LayoutView",
|
478 |
+
"align_content": null,
|
479 |
+
"align_items": null,
|
480 |
+
"align_self": null,
|
481 |
+
"border": null,
|
482 |
+
"bottom": null,
|
483 |
+
"display": null,
|
484 |
+
"flex": null,
|
485 |
+
"flex_flow": null,
|
486 |
+
"grid_area": null,
|
487 |
+
"grid_auto_columns": null,
|
488 |
+
"grid_auto_flow": null,
|
489 |
+
"grid_auto_rows": null,
|
490 |
+
"grid_column": null,
|
491 |
+
"grid_gap": null,
|
492 |
+
"grid_row": null,
|
493 |
+
"grid_template_areas": null,
|
494 |
+
"grid_template_columns": null,
|
495 |
+
"grid_template_rows": null,
|
496 |
+
"height": null,
|
497 |
+
"justify_content": null,
|
498 |
+
"justify_items": null,
|
499 |
+
"left": null,
|
500 |
+
"margin": null,
|
501 |
+
"max_height": null,
|
502 |
+
"max_width": null,
|
503 |
+
"min_height": null,
|
504 |
+
"min_width": null,
|
505 |
+
"object_fit": null,
|
506 |
+
"object_position": null,
|
507 |
+
"order": null,
|
508 |
+
"overflow": null,
|
509 |
+
"overflow_x": null,
|
510 |
+
"overflow_y": null,
|
511 |
+
"padding": null,
|
512 |
+
"right": null,
|
513 |
+
"top": null,
|
514 |
+
"visibility": null,
|
515 |
+
"width": null
|
516 |
+
}
|
517 |
+
},
|
518 |
+
"e964314c2a004fd3b55267d0b0b16625": {
|
519 |
+
"model_module": "@jupyter-widgets/controls",
|
520 |
+
"model_name": "DescriptionStyleModel",
|
521 |
+
"model_module_version": "1.5.0",
|
522 |
+
"state": {
|
523 |
+
"_model_module": "@jupyter-widgets/controls",
|
524 |
+
"_model_module_version": "1.5.0",
|
525 |
+
"_model_name": "DescriptionStyleModel",
|
526 |
+
"_view_count": null,
|
527 |
+
"_view_module": "@jupyter-widgets/base",
|
528 |
+
"_view_module_version": "1.2.0",
|
529 |
+
"_view_name": "StyleView",
|
530 |
+
"description_width": ""
|
531 |
+
}
|
532 |
+
},
|
533 |
+
"fbc7ee006a24400fa3924ad8e7d99004": {
|
534 |
+
"model_module": "@jupyter-widgets/controls",
|
535 |
+
"model_name": "LabelModel",
|
536 |
+
"model_module_version": "1.5.0",
|
537 |
+
"state": {
|
538 |
+
"_dom_classes": [],
|
539 |
+
"_model_module": "@jupyter-widgets/controls",
|
540 |
+
"_model_module_version": "1.5.0",
|
541 |
+
"_model_name": "LabelModel",
|
542 |
+
"_view_count": null,
|
543 |
+
"_view_module": "@jupyter-widgets/controls",
|
544 |
+
"_view_module_version": "1.5.0",
|
545 |
+
"_view_name": "LabelView",
|
546 |
+
"description": "",
|
547 |
+
"description_tooltip": null,
|
548 |
+
"layout": "IPY_MODEL_cca417ac12bf471681b63a64cf2e36fa",
|
549 |
+
"placeholder": "",
|
550 |
+
"style": "IPY_MODEL_1761d171d49541baaf8cf650e5bba3df",
|
551 |
+
"value": "Connecting..."
|
552 |
+
}
|
553 |
+
},
|
554 |
+
"cca417ac12bf471681b63a64cf2e36fa": {
|
555 |
+
"model_module": "@jupyter-widgets/base",
|
556 |
+
"model_name": "LayoutModel",
|
557 |
+
"model_module_version": "1.2.0",
|
558 |
+
"state": {
|
559 |
+
"_model_module": "@jupyter-widgets/base",
|
560 |
+
"_model_module_version": "1.2.0",
|
561 |
+
"_model_name": "LayoutModel",
|
562 |
+
"_view_count": null,
|
563 |
+
"_view_module": "@jupyter-widgets/base",
|
564 |
+
"_view_module_version": "1.2.0",
|
565 |
+
"_view_name": "LayoutView",
|
566 |
+
"align_content": null,
|
567 |
+
"align_items": null,
|
568 |
+
"align_self": null,
|
569 |
+
"border": null,
|
570 |
+
"bottom": null,
|
571 |
+
"display": null,
|
572 |
+
"flex": null,
|
573 |
+
"flex_flow": null,
|
574 |
+
"grid_area": null,
|
575 |
+
"grid_auto_columns": null,
|
576 |
+
"grid_auto_flow": null,
|
577 |
+
"grid_auto_rows": null,
|
578 |
+
"grid_column": null,
|
579 |
+
"grid_gap": null,
|
580 |
+
"grid_row": null,
|
581 |
+
"grid_template_areas": null,
|
582 |
+
"grid_template_columns": null,
|
583 |
+
"grid_template_rows": null,
|
584 |
+
"height": null,
|
585 |
+
"justify_content": null,
|
586 |
+
"justify_items": null,
|
587 |
+
"left": null,
|
588 |
+
"margin": null,
|
589 |
+
"max_height": null,
|
590 |
+
"max_width": null,
|
591 |
+
"min_height": null,
|
592 |
+
"min_width": null,
|
593 |
+
"object_fit": null,
|
594 |
+
"object_position": null,
|
595 |
+
"order": null,
|
596 |
+
"overflow": null,
|
597 |
+
"overflow_x": null,
|
598 |
+
"overflow_y": null,
|
599 |
+
"padding": null,
|
600 |
+
"right": null,
|
601 |
+
"top": null,
|
602 |
+
"visibility": null,
|
603 |
+
"width": null
|
604 |
+
}
|
605 |
+
},
|
606 |
+
"1761d171d49541baaf8cf650e5bba3df": {
|
607 |
+
"model_module": "@jupyter-widgets/controls",
|
608 |
+
"model_name": "DescriptionStyleModel",
|
609 |
+
"model_module_version": "1.5.0",
|
610 |
+
"state": {
|
611 |
+
"_model_module": "@jupyter-widgets/controls",
|
612 |
+
"_model_module_version": "1.5.0",
|
613 |
+
"_model_name": "DescriptionStyleModel",
|
614 |
+
"_view_count": null,
|
615 |
+
"_view_module": "@jupyter-widgets/base",
|
616 |
+
"_view_module_version": "1.2.0",
|
617 |
+
"_view_name": "StyleView",
|
618 |
+
"description_width": ""
|
619 |
+
}
|
620 |
+
}
|
621 |
+
}
|
622 |
+
}
|
623 |
+
},
|
624 |
+
"cells": [
|
625 |
+
{
|
626 |
+
"cell_type": "code",
|
627 |
+
"execution_count": null,
|
628 |
+
"metadata": {
|
629 |
+
"id": "3lM_v5P9LO_L"
|
630 |
+
},
|
631 |
+
"outputs": [],
|
632 |
+
"source": [
|
633 |
+
"!wget https://downloads.tatoeba.org/exports/sentences.tar.bz2\n",
|
634 |
+
"!wget https://downloads.tatoeba.org/exports/sentences_base.tar.bz2"
|
635 |
+
]
|
636 |
+
},
|
637 |
+
{
|
638 |
+
"cell_type": "code",
|
639 |
+
"source": [
|
640 |
+
"!tar -xfv sentences.tar.bz2\n",
|
641 |
+
"!tar -xfv sentences_base.tar.bz2"
|
642 |
+
],
|
643 |
+
"metadata": {
|
644 |
+
"id": "96Z-fnVPLYvv"
|
645 |
+
},
|
646 |
+
"execution_count": null,
|
647 |
+
"outputs": []
|
648 |
+
},
|
649 |
+
{
|
650 |
+
"cell_type": "code",
|
651 |
+
"source": [
|
652 |
+
"!wc -l sentences.csv\n",
|
653 |
+
"!head sentences.csv\n",
|
654 |
+
"!echo\n",
|
655 |
+
"!wc -l sentences_base.csv\n",
|
656 |
+
"!head sentences_base.csv"
|
657 |
+
],
|
658 |
+
"metadata": {
|
659 |
+
"colab": {
|
660 |
+
"base_uri": "https://localhost:8080/"
|
661 |
+
},
|
662 |
+
"id": "dKKpig4eL4fL",
|
663 |
+
"outputId": "ea2698d1-71ac-4119-ed70-1f870e542025"
|
664 |
+
},
|
665 |
+
"execution_count": null,
|
666 |
+
"outputs": [
|
667 |
+
{
|
668 |
+
"output_type": "stream",
|
669 |
+
"name": "stdout",
|
670 |
+
"text": [
|
671 |
+
"12449826 sentences.csv\n",
|
672 |
+
"1\tcmn\t我們試試看!\n",
|
673 |
+
"2\tcmn\t我该去睡觉了。\n",
|
674 |
+
"3\tcmn\t你在干什麼啊?\n",
|
675 |
+
"4\tcmn\t這是什麼啊?\n",
|
676 |
+
"5\tcmn\t今天是6月18号,也是Muiriel的生日!\n",
|
677 |
+
"6\tcmn\t生日快乐,Muiriel!\n",
|
678 |
+
"7\tcmn\tMuiriel现在20岁了。\n",
|
679 |
+
"8\tcmn\t密码是\"Muiriel\"。\n",
|
680 |
+
"9\tcmn\t我很快就會回來。\n",
|
681 |
+
"10\tcmn\t我不知道。\n",
|
682 |
+
"\n",
|
683 |
+
"12449826 sentences_base.csv\n",
|
684 |
+
"1\t\\N\n",
|
685 |
+
"2\t\\N\n",
|
686 |
+
"3\t\\N\n",
|
687 |
+
"4\t\\N\n",
|
688 |
+
"5\t\\N\n",
|
689 |
+
"6\t\\N\n",
|
690 |
+
"7\t\\N\n",
|
691 |
+
"8\t\\N\n",
|
692 |
+
"9\t\\N\n",
|
693 |
+
"10\t\\N\n"
|
694 |
+
]
|
695 |
+
}
|
696 |
+
]
|
697 |
+
},
|
698 |
+
{
|
699 |
+
"cell_type": "code",
|
700 |
+
"source": [
|
701 |
+
"!pip3 install polars datasets -q"
|
702 |
+
],
|
703 |
+
"metadata": {
|
704 |
+
"id": "HHHmW1CpM6I1"
|
705 |
+
},
|
706 |
+
"execution_count": null,
|
707 |
+
"outputs": []
|
708 |
+
},
|
709 |
+
{
|
710 |
+
"cell_type": "code",
|
711 |
+
"source": [
|
712 |
+
"from polars import Config\n",
|
713 |
+
"\n",
|
714 |
+
"Config.set_fmt_str_lengths(1000)"
|
715 |
+
],
|
716 |
+
"metadata": {
|
717 |
+
"id": "4RA9DsT-hduI"
|
718 |
+
},
|
719 |
+
"execution_count": null,
|
720 |
+
"outputs": []
|
721 |
+
},
|
722 |
+
{
|
723 |
+
"cell_type": "code",
|
724 |
+
"source": [
|
725 |
+
"import polars as pl\n",
|
726 |
+
"\n",
|
727 |
+
"df_sents = pl.read_csv(\"sentences.csv\",\n",
|
728 |
+
" has_header=False,\n",
|
729 |
+
" separator=\"\\t\",\n",
|
730 |
+
" quote_char=\"\",\n",
|
731 |
+
" null_values=\"\\\\N\",\n",
|
732 |
+
" new_columns=[\"ID\", \"Lang\", \"Sentence\"])\n",
|
733 |
+
"\n",
|
734 |
+
"print(df_sents.shape)\n",
|
735 |
+
"\n",
|
736 |
+
"# Drop nulls\n",
|
737 |
+
"df_sents = df_sents.drop_nulls()\n",
|
738 |
+
"print(df_sents.shape)\n",
|
739 |
+
"\n",
|
740 |
+
"df_sents.head()"
|
741 |
+
],
|
742 |
+
"metadata": {
|
743 |
+
"colab": {
|
744 |
+
"base_uri": "https://localhost:8080/",
|
745 |
+
"height": 291
|
746 |
+
},
|
747 |
+
"id": "5pqpIfS9M95r",
|
748 |
+
"outputId": "fc758659-1dbc-4b49-c9d3-29a6dc307429"
|
749 |
+
},
|
750 |
+
"execution_count": null,
|
751 |
+
"outputs": [
|
752 |
+
{
|
753 |
+
"output_type": "stream",
|
754 |
+
"name": "stdout",
|
755 |
+
"text": [
|
756 |
+
"(12449826, 3)\n",
|
757 |
+
"(12449352, 3)\n"
|
758 |
+
]
|
759 |
+
},
|
760 |
+
{
|
761 |
+
"output_type": "execute_result",
|
762 |
+
"data": {
|
763 |
+
"text/plain": [
|
764 |
+
"shape: (5, 3)\n",
|
765 |
+
"┌─────┬──────┬───────────────────────────────────────┐\n",
|
766 |
+
"│ ID ┆ Lang ┆ Sentence │\n",
|
767 |
+
"│ --- ┆ --- ┆ --- │\n",
|
768 |
+
"│ i64 ┆ str ┆ str │\n",
|
769 |
+
"╞═════╪══════╪═══════════════════════════════════════╡\n",
|
770 |
+
"│ 1 ┆ cmn ┆ 我們試試看! │\n",
|
771 |
+
"│ 2 ┆ cmn ┆ 我该去睡觉了。 │\n",
|
772 |
+
"│ 3 ┆ cmn ┆ 你在干什麼啊? │\n",
|
773 |
+
"│ 4 ┆ cmn ┆ 這是什麼啊? │\n",
|
774 |
+
"│ 5 ┆ cmn ┆ 今天是6月18号,也是Muiriel的生日! │\n",
|
775 |
+
"└─────┴──────┴───────────────────────────────────────┘"
|
776 |
+
],
|
777 |
+
"text/html": [
|
778 |
+
"<div><style>\n",
|
779 |
+
".dataframe > thead > tr,\n",
|
780 |
+
".dataframe > tbody > tr {\n",
|
781 |
+
" text-align: right;\n",
|
782 |
+
" white-space: pre-wrap;\n",
|
783 |
+
"}\n",
|
784 |
+
"</style>\n",
|
785 |
+
"<small>shape: (5, 3)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>ID</th><th>Lang</th><th>Sentence</th></tr><tr><td>i64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>1</td><td>"cmn"</td><td>"我們試試看!"</td></tr><tr><td>2</td><td>"cmn"</td><td>"我该去睡觉了。"</td></tr><tr><td>3</td><td>"cmn"</td><td>"你在干什麼啊?"</td></tr><tr><td>4</td><td>"cmn"</td><td>"這是什麼啊?"</td></tr><tr><td>5</td><td>"cmn"</td><td>"今天是6月18号,也是Muiriel的生日!"</td></tr></tbody></table></div>"
|
786 |
+
]
|
787 |
+
},
|
788 |
+
"metadata": {},
|
789 |
+
"execution_count": 2
|
790 |
+
}
|
791 |
+
]
|
792 |
+
},
|
793 |
+
{
|
794 |
+
"cell_type": "code",
|
795 |
+
"source": [
|
796 |
+
"df_mapping = pl.read_csv(\"sentences_base.csv\",\n",
|
797 |
+
" has_header=False,\n",
|
798 |
+
" separator=\"\\t\",\n",
|
799 |
+
" quote_char=\"\",\n",
|
800 |
+
" null_values=\"\\\\N\",\n",
|
801 |
+
" new_columns=[\"ID\", \"id_src\"])\n",
|
802 |
+
"\n",
|
803 |
+
"print(df_mapping.shape)\n",
|
804 |
+
"\n",
|
805 |
+
"# Drop nulls\n",
|
806 |
+
"df_mapping = df_mapping.drop_nulls()\n",
|
807 |
+
"\n",
|
808 |
+
"# Convert to Int\n",
|
809 |
+
"df_mapping = df_mapping.with_columns(\n",
|
810 |
+
" pl.col(\"id_src\").cast(pl.Int64)\n",
|
811 |
+
" )\n",
|
812 |
+
"print(df_mapping.shape)\n",
|
813 |
+
"\n",
|
814 |
+
"df_mapping = df_mapping.filter(\n",
|
815 |
+
" pl.col(\"id_src\") > 0\n",
|
816 |
+
" )\n",
|
817 |
+
"\n",
|
818 |
+
"print(df_mapping.shape)\n",
|
819 |
+
"\n",
|
820 |
+
"df_mapping"
|
821 |
+
],
|
822 |
+
"metadata": {
|
823 |
+
"colab": {
|
824 |
+
"base_uri": "https://localhost:8080/",
|
825 |
+
"height": 497
|
826 |
+
},
|
827 |
+
"id": "MR7DfZHqOl6W",
|
828 |
+
"outputId": "1320a8db-39a6-49c9-d4cb-5e6b5d5f4284"
|
829 |
+
},
|
830 |
+
"execution_count": null,
|
831 |
+
"outputs": [
|
832 |
+
{
|
833 |
+
"output_type": "stream",
|
834 |
+
"name": "stdout",
|
835 |
+
"text": [
|
836 |
+
"(12449826, 2)\n",
|
837 |
+
"(12121285, 2)\n",
|
838 |
+
"(8706605, 2)\n"
|
839 |
+
]
|
840 |
+
},
|
841 |
+
{
|
842 |
+
"output_type": "execute_result",
|
843 |
+
"data": {
|
844 |
+
"text/plain": [
|
845 |
+
"shape: (8_706_605, 2)\n",
|
846 |
+
"┌──────────┬──────────┐\n",
|
847 |
+
"│ ID ┆ id_src │\n",
|
848 |
+
"│ --- ┆ --- │\n",
|
849 |
+
"│ i64 ┆ i64 │\n",
|
850 |
+
"╞══════════╪══════════╡\n",
|
851 |
+
"│ 330930 ┆ 270958 │\n",
|
852 |
+
"│ 330931 ┆ 138554 │\n",
|
853 |
+
"│ 330932 ┆ 56531 │\n",
|
854 |
+
"│ 330933 ┆ 56532 │\n",
|
855 |
+
"│ 330934 ┆ 260636 │\n",
|
856 |
+
"│ … ┆ … │\n",
|
857 |
+
"│ 12910360 ┆ 8433336 │\n",
|
858 |
+
"│ 12910361 ┆ 12909955 │\n",
|
859 |
+
"│ 12910362 ┆ 9518807 │\n",
|
860 |
+
"│ 12910363 ┆ 12910176 │\n",
|
861 |
+
"│ 12910366 ┆ 387265 │\n",
|
862 |
+
"└──────────┴──────────┘"
|
863 |
+
],
|
864 |
+
"text/html": [
|
865 |
+
"<div><style>\n",
|
866 |
+
".dataframe > thead > tr,\n",
|
867 |
+
".dataframe > tbody > tr {\n",
|
868 |
+
" text-align: right;\n",
|
869 |
+
" white-space: pre-wrap;\n",
|
870 |
+
"}\n",
|
871 |
+
"</style>\n",
|
872 |
+
"<small>shape: (8_706_605, 2)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>ID</th><th>id_src</th></tr><tr><td>i64</td><td>i64</td></tr></thead><tbody><tr><td>330930</td><td>270958</td></tr><tr><td>330931</td><td>138554</td></tr><tr><td>330932</td><td>56531</td></tr><tr><td>330933</td><td>56532</td></tr><tr><td>330934</td><td>260636</td></tr><tr><td>…</td><td>…</td></tr><tr><td>12910360</td><td>8433336</td></tr><tr><td>12910361</td><td>12909955</td></tr><tr><td>12910362</td><td>9518807</td></tr><tr><td>12910363</td><td>12910176</td></tr><tr><td>12910366</td><td>387265</td></tr></tbody></table></div>"
|
873 |
+
]
|
874 |
+
},
|
875 |
+
"metadata": {},
|
876 |
+
"execution_count": 3
|
877 |
+
}
|
878 |
+
]
|
879 |
+
},
|
880 |
+
{
|
881 |
+
"cell_type": "code",
|
882 |
+
"source": [
|
883 |
+
"# Join df_sents and df_mapping on the ID column\n",
|
884 |
+
"combined = df_sents.join(df_mapping, on=\"ID\").drop_nulls()\n",
|
885 |
+
"\n",
|
886 |
+
"combined = combined.rename({\"ID\": \"id_tgt\",\n",
|
887 |
+
" \"Lang\": \"lang_tgt\",\n",
|
888 |
+
" \"Sentence\": \"sentence_tgt\"})\n",
|
889 |
+
"print(combined.shape)\n",
|
890 |
+
"combined.head()"
|
891 |
+
],
|
892 |
+
"metadata": {
|
893 |
+
"colab": {
|
894 |
+
"base_uri": "https://localhost:8080/",
|
895 |
+
"height": 273
|
896 |
+
},
|
897 |
+
"id": "XR4q7j0iOmDU",
|
898 |
+
"outputId": "8725730f-d08e-44d0-e55c-fc72012388b3"
|
899 |
+
},
|
900 |
+
"execution_count": null,
|
901 |
+
"outputs": [
|
902 |
+
{
|
903 |
+
"output_type": "stream",
|
904 |
+
"name": "stdout",
|
905 |
+
"text": [
|
906 |
+
"(8706319, 4)\n"
|
907 |
+
]
|
908 |
+
},
|
909 |
+
{
|
910 |
+
"output_type": "execute_result",
|
911 |
+
"data": {
|
912 |
+
"text/plain": [
|
913 |
+
"shape: (5, 4)\n",
|
914 |
+
"┌────────┬──────────┬──────────────────────────────────────────────────────┬────────┐\n",
|
915 |
+
"│ id_tgt ┆ lang_tgt ┆ sentence_tgt ┆ id_src │\n",
|
916 |
+
"│ --- ┆ --- ┆ --- ┆ --- │\n",
|
917 |
+
"│ i64 ┆ str ┆ str ┆ i64 │\n",
|
918 |
+
"╞════════╪══════════╪══════════════════════════════════════════════════════╪════════╡\n",
|
919 |
+
"│ 330930 ┆ fra ┆ Rien ne vaut le sommeil. ┆ 270958 │\n",
|
920 |
+
"│ 330931 ┆ fra ┆ Essayez de faire preuve de patience avec les autres. ┆ 138554 │\n",
|
921 |
+
"│ 330932 ┆ fra ┆ Tous ces œufs ne sont pas frais. ┆ 56531 │\n",
|
922 |
+
"│ 330933 ┆ fra ┆ Aucun de ces œufs n'est frais. ┆ 56532 │\n",
|
923 |
+
"│ 330934 ┆ fra ┆ On m'a nommé d'après lui. ┆ 260636 │\n",
|
924 |
+
"└────────┴──────────┴──────────────────────────────────────────────────────┴────────┘"
|
925 |
+
],
|
926 |
+
"text/html": [
|
927 |
+
"<div><style>\n",
|
928 |
+
".dataframe > thead > tr,\n",
|
929 |
+
".dataframe > tbody > tr {\n",
|
930 |
+
" text-align: right;\n",
|
931 |
+
" white-space: pre-wrap;\n",
|
932 |
+
"}\n",
|
933 |
+
"</style>\n",
|
934 |
+
"<small>shape: (5, 4)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>id_tgt</th><th>lang_tgt</th><th>sentence_tgt</th><th>id_src</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>i64</td></tr></thead><tbody><tr><td>330930</td><td>"fra"</td><td>"Rien ne vaut le sommeil."</td><td>270958</td></tr><tr><td>330931</td><td>"fra"</td><td>"Essayez de faire preuve de patience avec les autres."</td><td>138554</td></tr><tr><td>330932</td><td>"fra"</td><td>"Tous ces œufs ne sont pas frais."</td><td>56531</td></tr><tr><td>330933</td><td>"fra"</td><td>"Aucun de ces œufs n'est frais."</td><td>56532</td></tr><tr><td>330934</td><td>"fra"</td><td>"On m'a nommé d'après lui."</td><td>260636</td></tr></tbody></table></div>"
|
935 |
+
]
|
936 |
+
},
|
937 |
+
"metadata": {},
|
938 |
+
"execution_count": 5
|
939 |
+
}
|
940 |
+
]
|
941 |
+
},
|
942 |
+
{
|
943 |
+
"cell_type": "code",
|
944 |
+
"source": [
|
945 |
+
"# Perform a self-join to fetch the translation sentence\n",
|
946 |
+
"df_translations = combined.join(df_sents.rename({\"ID\": \"id_src\",\n",
|
947 |
+
" \"Lang\": \"lang_src\",\n",
|
948 |
+
" \"Sentence\": \"sentence_src\"}),\n",
|
949 |
+
" left_on=\"id_src\",\n",
|
950 |
+
" right_on=\"id_src\",\n",
|
951 |
+
" how=\"left\"\n",
|
952 |
+
" )\n",
|
953 |
+
"print(df_translations.shape)\n",
|
954 |
+
"\n",
|
955 |
+
"df_translations = df_translations.drop_nulls()\n",
|
956 |
+
"print(df_translations.shape)\n",
|
957 |
+
"\n",
|
958 |
+
"df_translations.head()"
|
959 |
+
],
|
960 |
+
"metadata": {
|
961 |
+
"colab": {
|
962 |
+
"base_uri": "https://localhost:8080/",
|
963 |
+
"height": 291
|
964 |
+
},
|
965 |
+
"id": "pJthsuZBOmGE",
|
966 |
+
"outputId": "c9726637-7622-46df-d987-fdc5e9f0ca68"
|
967 |
+
},
|
968 |
+
"execution_count": null,
|
969 |
+
"outputs": [
|
970 |
+
{
|
971 |
+
"output_type": "stream",
|
972 |
+
"name": "stdout",
|
973 |
+
"text": [
|
974 |
+
"(8706319, 6)\n",
|
975 |
+
"(8651840, 6)\n"
|
976 |
+
]
|
977 |
+
},
|
978 |
+
{
|
979 |
+
"output_type": "execute_result",
|
980 |
+
"data": {
|
981 |
+
"text/plain": [
|
982 |
+
"shape: (5, 6)\n",
|
983 |
+
"┌────────┬──────────┬─────────────────────────────┬────────┬──────────┬────────────────────────────┐\n",
|
984 |
+
"│ id_tgt ┆ lang_tgt ┆ sentence_tgt ┆ id_src ┆ lang_src ┆ sentence_src │\n",
|
985 |
+
"│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │\n",
|
986 |
+
"│ i64 ┆ str ┆ str ┆ i64 ┆ str ┆ str │\n",
|
987 |
+
"╞════════╪══════════╪═════════════════════════════╪════════╪══════════╪════════════════════════════╡\n",
|
988 |
+
"│ 330930 ┆ fra ┆ Rien ne vaut le sommeil. ┆ 270958 ┆ eng ┆ There is nothing like │\n",
|
989 |
+
"│ ┆ ┆ ┆ ┆ ┆ sleep. │\n",
|
990 |
+
"│ 330931 ┆ fra ┆ Essayez de faire preuve de ┆ 138554 ┆ jpn ┆ 他人には辛抱するようにしな │\n",
|
991 |
+
"│ ┆ ┆ patience avec les autres. ┆ ┆ ┆ さい。 │\n",
|
992 |
+
"│ 330932 ┆ fra ┆ Tous ces œufs ne sont pas ┆ 56531 ┆ eng ┆ Not all of these eggs are │\n",
|
993 |
+
"│ ┆ ┆ frais. ┆ ┆ ┆ fresh. │\n",
|
994 |
+
"│ 330933 ┆ fra ┆ Aucun de ces œufs n'est ┆ 56532 ┆ eng ┆ None of these eggs are │\n",
|
995 |
+
"│ ┆ ┆ frais. ┆ ┆ ┆ fresh. │\n",
|
996 |
+
"│ 330934 ┆ fra ┆ On m'a nommé d'après lui. ┆ 260636 ┆ eng ┆ My name was called after │\n",
|
997 |
+
"│ ┆ ┆ ┆ ┆ ┆ his name. │\n",
|
998 |
+
"└────────┴──────────┴─────────────────────────────┴────────┴──────────┴────────────────────────────┘"
|
999 |
+
],
|
1000 |
+
"text/html": [
|
1001 |
+
"<div><style>\n",
|
1002 |
+
".dataframe > thead > tr,\n",
|
1003 |
+
".dataframe > tbody > tr {\n",
|
1004 |
+
" text-align: right;\n",
|
1005 |
+
" white-space: pre-wrap;\n",
|
1006 |
+
"}\n",
|
1007 |
+
"</style>\n",
|
1008 |
+
"<small>shape: (5, 6)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>id_tgt</th><th>lang_tgt</th><th>sentence_tgt</th><th>id_src</th><th>lang_src</th><th>sentence_src</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>i64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>330930</td><td>"fra"</td><td>"Rien ne vaut le sommeil."</td><td>270958</td><td>"eng"</td><td>"There is nothing like sleep."</td></tr><tr><td>330931</td><td>"fra"</td><td>"Essayez de faire preuve de patience avec les autres."</td><td>138554</td><td>"jpn"</td><td>"他人には辛抱するようにしなさい。"</td></tr><tr><td>330932</td><td>"fra"</td><td>"Tous ces œufs ne sont pas frais."</td><td>56531</td><td>"eng"</td><td>"Not all of these eggs are fresh."</td></tr><tr><td>330933</td><td>"fra"</td><td>"Aucun de ces œufs n'est frais."</td><td>56532</td><td>"eng"</td><td>"None of these eggs are fresh."</td></tr><tr><td>330934</td><td>"fra"</td><td>"On m'a nommé d'après lui."</td><td>260636</td><td>"eng"</td><td>"My name was called after his name."</td></tr></tbody></table></div>"
|
1009 |
+
]
|
1010 |
+
},
|
1011 |
+
"metadata": {},
|
1012 |
+
"execution_count": 6
|
1013 |
+
}
|
1014 |
+
]
|
1015 |
+
},
|
1016 |
+
{
|
1017 |
+
"cell_type": "code",
|
1018 |
+
"source": [
|
1019 |
+
"df_translations = df_translations.unique().sort(\"lang_src\")\n",
|
1020 |
+
"print(df_translations.shape)\n",
|
1021 |
+
"\n",
|
1022 |
+
"df_translations = df_translations.select(\n",
|
1023 |
+
" [\n",
|
1024 |
+
" \"id_src\", \"lang_src\", \"sentence_src\", # Source columns\n",
|
1025 |
+
" \"id_tgt\", \"lang_tgt\", \"sentence_tgt\" # Target columns\n",
|
1026 |
+
"]\n",
|
1027 |
+
")\n",
|
1028 |
+
"df_translations"
|
1029 |
+
],
|
1030 |
+
"metadata": {
|
1031 |
+
"colab": {
|
1032 |
+
"base_uri": "https://localhost:8080/",
|
1033 |
+
"height": 478
|
1034 |
+
},
|
1035 |
+
"id": "cIYeWv5NOnG5",
|
1036 |
+
"outputId": "dd363c6e-9990-468d-d6f2-9176213f582c"
|
1037 |
+
},
|
1038 |
+
"execution_count": null,
|
1039 |
+
"outputs": [
|
1040 |
+
{
|
1041 |
+
"output_type": "stream",
|
1042 |
+
"name": "stdout",
|
1043 |
+
"text": [
|
1044 |
+
"(8651840, 6)\n"
|
1045 |
+
]
|
1046 |
+
},
|
1047 |
+
{
|
1048 |
+
"output_type": "execute_result",
|
1049 |
+
"data": {
|
1050 |
+
"text/plain": [
|
1051 |
+
"shape: (8_651_840, 6)\n",
|
1052 |
+
"┌──────────┬──────────┬───────────────────────────┬──────────┬──────────┬──────────────────────────┐\n",
|
1053 |
+
"│ id_src ┆ lang_src ┆ sentence_src ┆ id_tgt ┆ lang_tgt ┆ sentence_tgt │\n",
|
1054 |
+
"│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │\n",
|
1055 |
+
"│ i64 ┆ str ┆ str ┆ i64 ┆ str ┆ str │\n",
|
1056 |
+
"╞══════════╪══════════╪═══════════════════════════╪══════════╪══════════╪══════════════════════════╡\n",
|
1057 |
+
"│ 12894830 ┆ abk ┆ Апсихологиатә ԥхасҭа ┆ 12894930 ┆ eng ┆ There’s no psychological │\n",
|
1058 |
+
"│ ┆ ┆ ыҟаӡам. ┆ ┆ ┆ harm. │\n",
|
1059 |
+
"│ 12894830 ┆ abk ┆ Апсихологиатә ԥхасҭа ┆ 12894928 ┆ eng ┆ There is no │\n",
|
1060 |
+
"│ ┆ ┆ ыҟаӡам. ┆ ┆ ┆ psychological damage. │\n",
|
1061 |
+
"│ 2481698 ┆ abk ┆ Сара ашә сфоит. ┆ 4110864 ┆ yue ┆ 我食芝士。 │\n",
|
1062 |
+
"│ 2481698 ┆ abk ┆ Сара ашә сфоит. ┆ 3863883 ┆ ita ┆ Mangio formaggio. │\n",
|
1063 |
+
"│ 499353 ┆ acm ┆ واحد اسمه هنري كال يريد ┆ 3013431 ┆ tur ┆ Adı Henry olan biri sizi │\n",
|
1064 |
+
"│ ┆ ┆ يشوفك. ┆ ┆ ┆ görmek istedi. │\n",
|
1065 |
+
"│ … ┆ … ┆ … ┆ … ┆ … ┆ … │\n",
|
1066 |
+
"│ 12160925 ┆ zza ┆ Mi xo rê vizêrî ┆ 12330372 ┆ kmr ┆ Min do ji xwe re │\n",
|
1067 |
+
"│ ┆ ┆ komputerêka newîye ┆ ┆ ┆ kompîtureke nû kirî. │\n",
|
1068 |
+
"│ ┆ ┆ herînaye. ┆ ┆ ┆ │\n",
|
1069 |
+
"│ 9144120 ┆ zza ┆ Ti senîn î? ┆ 9244449 ┆ zza ┆ Ti senîn a? │\n",
|
1070 |
+
"│ 9144133 ┆ zza ┆ Ti kamca de bîyî? ┆ 9244408 ┆ zza ┆ Ti kamca de bîya? │\n",
|
1071 |
+
"│ 9394349 ┆ zza ┆ Va dür bo, bınê hardi de ┆ 9509054 ┆ tur ┆ Uzakta olsun da toprağın │\n",
|
1072 |
+
"│ ┆ ┆ mebo! ┆ ┆ ┆ altında olmasın. │\n",
|
1073 |
+
"│ 9394313 ┆ zza ┆ Uyo ke sarri rê rameno, ┆ 9509052 ┆ tur ┆ Başkaları için ekip │\n",
|
1074 |
+
"│ ┆ ┆ sarri rê çineno; rozê ┆ ┆ ┆ başkaları için biçen │\n",
|
1075 |
+
"│ ┆ ┆ yena ke vergi ra vêsan, ┆ ┆ ┆ kişi gün gelir kurttan │\n",
|
1076 |
+
"│ ┆ ┆ morri ra vıran maneno! ┆ ┆ ┆ aç, yılandan çıplak │\n",
|
1077 |
+
"│ ┆ ┆ ┆ ┆ ┆ kalır. │\n",
|
1078 |
+
"└──────────┴──────────┴───────────────────────────┴──────────┴──────────┴──────────────────────────┘"
|
1079 |
+
],
|
1080 |
+
"text/html": [
|
1081 |
+
"<div><style>\n",
|
1082 |
+
".dataframe > thead > tr,\n",
|
1083 |
+
".dataframe > tbody > tr {\n",
|
1084 |
+
" text-align: right;\n",
|
1085 |
+
" white-space: pre-wrap;\n",
|
1086 |
+
"}\n",
|
1087 |
+
"</style>\n",
|
1088 |
+
"<small>shape: (8_651_840, 6)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>id_src</th><th>lang_src</th><th>sentence_src</th><th>id_tgt</th><th>lang_tgt</th><th>sentence_tgt</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>i64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>12894830</td><td>"abk"</td><td>"Апсихологиатә ԥхасҭа ыҟаӡам."</td><td>12894930</td><td>"eng"</td><td>"There’s no psychological harm."</td></tr><tr><td>12894830</td><td>"abk"</td><td>"Апсихологиатә ԥхасҭа ыҟаӡам."</td><td>12894928</td><td>"eng"</td><td>"There is no psychological damage."</td></tr><tr><td>2481698</td><td>"abk"</td><td>"Сара ашә сфоит."</td><td>4110864</td><td>"yue"</td><td>"我食芝士。"</td></tr><tr><td>2481698</td><td>"abk"</td><td>"Сара ашә сфоит."</td><td>3863883</td><td>"ita"</td><td>"Mangio formaggio."</td></tr><tr><td>499353</td><td>"acm"</td><td>"واحد اسمه هنري كال يريد يشوفك."</td><td>3013431</td><td>"tur"</td><td>"Adı Henry olan biri sizi görmek istedi."</td></tr><tr><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td></tr><tr><td>12160925</td><td>"zza"</td><td>"Mi xo rê vizêrî komputerêka newîye herînaye."</td><td>12330372</td><td>"kmr"</td><td>"Min do ji xwe re kompîtureke nû kirî."</td></tr><tr><td>9144120</td><td>"zza"</td><td>"Ti senîn î?"</td><td>9244449</td><td>"zza"</td><td>"Ti senîn a?"</td></tr><tr><td>9144133</td><td>"zza"</td><td>"Ti kamca de bîyî?"</td><td>9244408</td><td>"zza"</td><td>"Ti kamca de bîya?"</td></tr><tr><td>9394349</td><td>"zza"</td><td>"Va dür bo, bınê hardi de mebo!"</td><td>9509054</td><td>"tur"</td><td>"Uzakta olsun da toprağın altında olmasın."</td></tr><tr><td>9394313</td><td>"zza"</td><td>"Uyo ke sarri rê rameno, sarri rê çineno; rozê yena ke vergi ra vêsan, morri ra vıran maneno!"</td><td>9509052</td><td>"tur"</td><td>"Başkaları için ekip başkaları için biçen kişi gün gelir kurttan aç, yılandan çıplak kalır."</td></tr></tbody></table></div>"
|
1089 |
+
]
|
1090 |
+
},
|
1091 |
+
"metadata": {},
|
1092 |
+
"execution_count": 7
|
1093 |
+
}
|
1094 |
+
]
|
1095 |
+
},
|
1096 |
+
{
|
1097 |
+
"cell_type": "code",
|
1098 |
+
"source": [
|
1099 |
+
"# Remove rows with the same language\n",
|
1100 |
+
"df_translations = df_translations.filter(\n",
|
1101 |
+
" (pl.col(\"lang_src\") != pl.col(\"lang_tgt\"))\n",
|
1102 |
+
")\n",
|
1103 |
+
"print(df_translations.shape)\n",
|
1104 |
+
"\n",
|
1105 |
+
"df_translations"
|
1106 |
+
],
|
1107 |
+
"metadata": {
|
1108 |
+
"colab": {
|
1109 |
+
"base_uri": "https://localhost:8080/",
|
1110 |
+
"height": 478
|
1111 |
+
},
|
1112 |
+
"id": "OATanct6MWiz",
|
1113 |
+
"outputId": "574a10b9-5fb3-441b-bf07-dc3b6a64d398"
|
1114 |
+
},
|
1115 |
+
"execution_count": null,
|
1116 |
+
"outputs": [
|
1117 |
+
{
|
1118 |
+
"output_type": "stream",
|
1119 |
+
"name": "stdout",
|
1120 |
+
"text": [
|
1121 |
+
"(8547819, 6)\n"
|
1122 |
+
]
|
1123 |
+
},
|
1124 |
+
{
|
1125 |
+
"output_type": "execute_result",
|
1126 |
+
"data": {
|
1127 |
+
"text/plain": [
|
1128 |
+
"shape: (8_547_819, 6)\n",
|
1129 |
+
"┌──────────┬──────────┬───────────────────────────┬──────────┬──────────┬──────────────────────────┐\n",
|
1130 |
+
"│ id_src ┆ lang_src ┆ sentence_src ┆ id_tgt ┆ lang_tgt ┆ sentence_tgt │\n",
|
1131 |
+
"│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │\n",
|
1132 |
+
"│ i64 ┆ str ┆ str ┆ i64 ┆ str ┆ str │\n",
|
1133 |
+
"╞══════════╪══════════╪═══════════════════════════╪══════════╪══════════╪══════════════════════════╡\n",
|
1134 |
+
"│ 12894830 ┆ abk ┆ Апсихологиатә ԥхасҭа ┆ 12894930 ┆ eng ┆ There’s no psychological │\n",
|
1135 |
+
"│ ┆ ┆ ыҟаӡам. ┆ ┆ ┆ harm. │\n",
|
1136 |
+
"│ 12894830 ┆ abk ┆ Апсихологиатә ԥхасҭа ┆ 12894928 ┆ eng ┆ There is no │\n",
|
1137 |
+
"│ ┆ ┆ ыҟаӡам. ┆ ┆ ┆ psychological damage. │\n",
|
1138 |
+
"│ 2481698 ┆ abk ┆ Сара ашә сфоит. ┆ 4110864 ┆ yue ┆ 我食芝士。 │\n",
|
1139 |
+
"│ 2481698 ┆ abk ┆ Сара ашә сфоит. ┆ 3863883 ┆ ita ┆ Mangio formaggio. │\n",
|
1140 |
+
"│ 499353 ┆ acm ┆ واحد اسمه هنري كال يريد ┆ 3013431 ┆ tur ┆ Adı Henry olan biri sizi │\n",
|
1141 |
+
"│ ┆ ┆ يشوفك. ┆ ┆ ┆ görmek istedi. │\n",
|
1142 |
+
"│ … ┆ … ┆ … ┆ … ┆ … ┆ … │\n",
|
1143 |
+
"│ 11891630 ┆ zza ┆ Embaza mi goşt ra hes ┆ 11915379 ┆ tur ┆ Arkadaşım eti sever. │\n",
|
1144 |
+
"│ ┆ ┆ kena. ┆ ┆ ┆ │\n",
|
1145 |
+
"│ 6096269 ┆ zza ┆ Bejné lajekî dergo. ┆ 8140003 ┆ tur ┆ Çocuğun boyu uzundur. │\n",
|
1146 |
+
"│ 12160925 ┆ zza ┆ Mi xo rê vizêrî ┆ 12330372 ┆ kmr ┆ Min do ji xwe re │\n",
|
1147 |
+
"│ ┆ ┆ komputerêka newîye ┆ ┆ ┆ kompîtureke nû kirî. │\n",
|
1148 |
+
"│ ┆ ┆ herînaye. ┆ ┆ ┆ │\n",
|
1149 |
+
"│ 9394349 ┆ zza ┆ Va dür bo, bınê hardi de ┆ 9509054 ┆ tur ┆ Uzakta olsun da toprağın │\n",
|
1150 |
+
"│ ┆ ┆ mebo! ┆ ┆ ┆ altında olmasın. │\n",
|
1151 |
+
"│ 9394313 ┆ zza ┆ Uyo ke sarri rê rameno, ┆ 9509052 ┆ tur ┆ Başkaları için ekip │\n",
|
1152 |
+
"│ ┆ ┆ sarri rê çineno; rozê ┆ ┆ ┆ başkaları için biçen │\n",
|
1153 |
+
"│ ┆ ┆ yena ke vergi ra vêsan, ┆ ┆ ┆ kişi gün gelir kurttan │\n",
|
1154 |
+
"│ ┆ ┆ morri ra vıran maneno! ┆ ┆ ┆ aç, yılandan çıplak │\n",
|
1155 |
+
"│ ┆ ┆ ┆ ┆ ┆ kalır. │\n",
|
1156 |
+
"└──────────┴──────────┴───────────────────────────┴──────────┴──────────┴──────────────────────────┘"
|
1157 |
+
],
|
1158 |
+
"text/html": [
|
1159 |
+
"<div><style>\n",
|
1160 |
+
".dataframe > thead > tr,\n",
|
1161 |
+
".dataframe > tbody > tr {\n",
|
1162 |
+
" text-align: right;\n",
|
1163 |
+
" white-space: pre-wrap;\n",
|
1164 |
+
"}\n",
|
1165 |
+
"</style>\n",
|
1166 |
+
"<small>shape: (8_547_819, 6)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>id_src</th><th>lang_src</th><th>sentence_src</th><th>id_tgt</th><th>lang_tgt</th><th>sentence_tgt</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>i64</td><td>str</td><td>str</td></tr></thead><tbody><tr><td>12894830</td><td>"abk"</td><td>"Апсихологиатә ԥхасҭа ыҟаӡам."</td><td>12894930</td><td>"eng"</td><td>"There’s no psychological harm."</td></tr><tr><td>12894830</td><td>"abk"</td><td>"Апсихологиатә ԥхасҭа ыҟаӡам."</td><td>12894928</td><td>"eng"</td><td>"There is no psychological damage."</td></tr><tr><td>2481698</td><td>"abk"</td><td>"Сара ашә сфоит."</td><td>4110864</td><td>"yue"</td><td>"我食芝士。"</td></tr><tr><td>2481698</td><td>"abk"</td><td>"Сара ашә сфоит."</td><td>3863883</td><td>"ita"</td><td>"Mangio formaggio."</td></tr><tr><td>499353</td><td>"acm"</td><td>"واحد اسمه هنري كال يريد يشوفك."</td><td>3013431</td><td>"tur"</td><td>"Adı Henry olan biri sizi görmek istedi."</td></tr><tr><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td></tr><tr><td>11891630</td><td>"zza"</td><td>"Embaza mi goşt ra hes kena."</td><td>11915379</td><td>"tur"</td><td>"Arkadaşım eti sever."</td></tr><tr><td>6096269</td><td>"zza"</td><td>"Bejné lajekî dergo."</td><td>8140003</td><td>"tur"</td><td>"Çocuğun boyu uzundur."</td></tr><tr><td>12160925</td><td>"zza"</td><td>"Mi xo rê vizêrî komputerêka newîye herînaye."</td><td>12330372</td><td>"kmr"</td><td>"Min do ji xwe re kompîtureke nû kirî."</td></tr><tr><td>9394349</td><td>"zza"</td><td>"Va dür bo, bınê hardi de mebo!"</td><td>9509054</td><td>"tur"</td><td>"Uzakta olsun da toprağın altında olmasın."</td></tr><tr><td>9394313</td><td>"zza"</td><td>"Uyo ke sarri rê rameno, sarri rê çineno; rozê yena ke vergi ra vêsan, morri ra vıran maneno!"</td><td>9509052</td><td>"tur"</td><td>"Başkaları için ekip başkaları için biçen kişi gün gelir kurttan aç, yılandan çıplak kalır."</td></tr></tbody></table></div>"
|
1167 |
+
]
|
1168 |
+
},
|
1169 |
+
"metadata": {},
|
1170 |
+
"execution_count": 8
|
1171 |
+
}
|
1172 |
+
]
|
1173 |
+
},
|
1174 |
+
{
|
1175 |
+
"cell_type": "code",
|
1176 |
+
"source": [
|
1177 |
+
"# Create a lang_pair column and sort it to be able to filter based on it later\n",
|
1178 |
+
"\n",
|
1179 |
+
"df_translations = df_translations.with_columns(\n",
|
1180 |
+
" pl.concat_list([pl.col(\"lang_src\"), pl.col(\"lang_tgt\")]).alias(\"lang_pair\")\n",
|
1181 |
+
")\n",
|
1182 |
+
"\n",
|
1183 |
+
"df_translations = df_translations.with_columns(\n",
|
1184 |
+
" pl.col(\"lang_pair\").list.sort()\n",
|
1185 |
+
")\n",
|
1186 |
+
"\n",
|
1187 |
+
"df_translations"
|
1188 |
+
],
|
1189 |
+
"metadata": {
|
1190 |
+
"colab": {
|
1191 |
+
"base_uri": "https://localhost:8080/",
|
1192 |
+
"height": 530
|
1193 |
+
},
|
1194 |
+
"id": "FZJLUGVSK1Dr",
|
1195 |
+
"outputId": "f4a8283d-47bc-48d7-9653-122e58dd1de0"
|
1196 |
+
},
|
1197 |
+
"execution_count": null,
|
1198 |
+
"outputs": [
|
1199 |
+
{
|
1200 |
+
"output_type": "execute_result",
|
1201 |
+
"data": {
|
1202 |
+
"text/plain": [
|
1203 |
+
"shape: (8_547_819, 7)\n",
|
1204 |
+
"┌──────────┬──────────┬──────────────────┬──────────┬──────────┬────────────────��─┬────────────────┐\n",
|
1205 |
+
"│ id_src ┆ lang_src ┆ sentence_src ┆ id_tgt ┆ lang_tgt ┆ sentence_tgt ┆ lang_pair │\n",
|
1206 |
+
"│ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │\n",
|
1207 |
+
"│ i64 ┆ str ┆ str ┆ i64 ┆ str ┆ str ┆ list[str] │\n",
|
1208 |
+
"╞══════════╪══════════╪══════════════════╪══════════╪══════════╪══════════════════╪════════════════╡\n",
|
1209 |
+
"│ 12894830 ┆ abk ┆ Апсихологиатә ┆ 12894930 ┆ eng ┆ There’s no ┆ [\"abk\", \"eng\"] │\n",
|
1210 |
+
"│ ┆ ┆ ԥхасҭа ыҟаӡам. ┆ ┆ ┆ psychological ┆ │\n",
|
1211 |
+
"│ ┆ ┆ ┆ ┆ ┆ harm. ┆ │\n",
|
1212 |
+
"│ 12894830 ┆ abk ┆ Апсихологиатә ┆ 12894928 ┆ eng ┆ There is no ┆ [\"abk\", \"eng\"] │\n",
|
1213 |
+
"│ ┆ ┆ ԥхасҭа ыҟаӡам. ┆ ┆ ┆ psychological ┆ │\n",
|
1214 |
+
"│ ┆ ┆ ┆ ┆ ┆ damage. ┆ │\n",
|
1215 |
+
"│ 2481698 ┆ abk ┆ Сара ашә сфоит. ┆ 4110864 ┆ yue ┆ 我食芝士。 ┆ [\"abk\", \"yue\"] │\n",
|
1216 |
+
"│ 2481698 ┆ abk ┆ Сара ашә сфоит. ┆ 3863883 ┆ ita ┆ Mangio ┆ [\"abk\", \"ita\"] │\n",
|
1217 |
+
"│ ┆ ┆ ┆ ┆ ┆ formaggio. ┆ │\n",
|
1218 |
+
"│ 499353 ┆ acm ┆ واحد اسمه هنري ┆ 3013431 ┆ tur ┆ Adı Henry olan ┆ [\"acm\", \"tur\"] │\n",
|
1219 |
+
"│ ┆ ┆ كال يريد يشوفك. ┆ ┆ ┆ biri sizi görmek ┆ │\n",
|
1220 |
+
"│ ┆ ┆ ┆ ┆ ┆ istedi. ┆ │\n",
|
1221 |
+
"│ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │\n",
|
1222 |
+
"│ 11891630 ┆ zza ┆ Embaza mi goşt ┆ 11915379 ┆ tur ┆ Arkadaşım eti ┆ [\"tur\", \"zza\"] │\n",
|
1223 |
+
"│ ┆ ┆ ra hes kena. ┆ ┆ ┆ sever. ┆ │\n",
|
1224 |
+
"│ 6096269 ┆ zza ┆ Bejné lajekî ┆ 8140003 ┆ tur ┆ Çocuğun boyu ┆ [\"tur\", \"zza\"] │\n",
|
1225 |
+
"│ ┆ ┆ dergo. ┆ ┆ ┆ uzundur. ┆ │\n",
|
1226 |
+
"│ 12160925 ┆ zza ┆ Mi xo rê vizêrî ┆ 12330372 ┆ kmr ┆ Min do ji xwe re ┆ [\"kmr\", \"zza\"] │\n",
|
1227 |
+
"│ ┆ ┆ komputerêka ┆ ┆ ┆ kompîtureke nû ┆ │\n",
|
1228 |
+
"│ ┆ ┆ newîye herînaye. ┆ ┆ ┆ kirî. ┆ │\n",
|
1229 |
+
"│ 9394349 ┆ zza ┆ Va dür bo, bınê ┆ 9509054 ┆ tur ┆ Uzakta olsun da ┆ [\"tur\", \"zza\"] │\n",
|
1230 |
+
"│ ┆ ┆ hardi de mebo! ┆ ┆ ┆ toprağın altında ┆ │\n",
|
1231 |
+
"│ ┆ ┆ ┆ ┆ ┆ olmasın. ┆ │\n",
|
1232 |
+
"│ 9394313 ┆ zza ┆ Uyo ke sarri rê ┆ 9509052 ┆ tur ┆ Başkaları için ┆ [\"tur\", \"zza\"] │\n",
|
1233 |
+
"│ ┆ ┆ rameno, sarri rê ┆ ┆ ┆ ekip başkaları ┆ │\n",
|
1234 |
+
"│ ┆ ┆ çineno; rozê ┆ ┆ ┆ için biçen kişi ┆ │\n",
|
1235 |
+
"│ ┆ ┆ yena ke vergi ra ┆ ┆ ┆ gün gelir ┆ │\n",
|
1236 |
+
"│ ┆ ┆ vêsan, morri ra ┆ ┆ ┆ kurttan aç, ┆ │\n",
|
1237 |
+
"│ ┆ ┆ vıran maneno! ┆ ┆ ┆ yılandan çıplak ┆ │\n",
|
1238 |
+
"│ ┆ ┆ ┆ ┆ ┆ kalır. ┆ │\n",
|
1239 |
+
"└──────────┴──────────┴──────────────────┴──────────┴──────────┴──────────────────┴────────────────┘"
|
1240 |
+
],
|
1241 |
+
"text/html": [
|
1242 |
+
"<div><style>\n",
|
1243 |
+
".dataframe > thead > tr,\n",
|
1244 |
+
".dataframe > tbody > tr {\n",
|
1245 |
+
" text-align: right;\n",
|
1246 |
+
" white-space: pre-wrap;\n",
|
1247 |
+
"}\n",
|
1248 |
+
"</style>\n",
|
1249 |
+
"<small>shape: (8_547_819, 7)</small><table border=\"1\" class=\"dataframe\"><thead><tr><th>id_src</th><th>lang_src</th><th>sentence_src</th><th>id_tgt</th><th>lang_tgt</th><th>sentence_tgt</th><th>lang_pair</th></tr><tr><td>i64</td><td>str</td><td>str</td><td>i64</td><td>str</td><td>str</td><td>list[str]</td></tr></thead><tbody><tr><td>12894830</td><td>"abk"</td><td>"Апсихологиатә ԥхасҭа ыҟаӡам."</td><td>12894930</td><td>"eng"</td><td>"There’s no psychological harm."</td><td>["abk", "eng"]</td></tr><tr><td>12894830</td><td>"abk"</td><td>"Апсихологиатә ԥхасҭа ыҟаӡам."</td><td>12894928</td><td>"eng"</td><td>"There is no psychological damage."</td><td>["abk", "eng"]</td></tr><tr><td>2481698</td><td>"abk"</td><td>"Сара ашә сфоит."</td><td>4110864</td><td>"yue"</td><td>"我食芝士。"</td><td>["abk", "yue"]</td></tr><tr><td>2481698</td><td>"abk"</td><td>"Сара ашә сфоит."</td><td>3863883</td><td>"ita"</td><td>"Mangio formaggio."</td><td>["abk", "ita"]</td></tr><tr><td>499353</td><td>"acm"</td><td>"واحد اسمه هنري كال يريد يشوفك."</td><td>3013431</td><td>"tur"</td><td>"Adı Henry olan biri sizi görmek istedi."</td><td>["acm", "tur"]</td></tr><tr><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td><td>…</td></tr><tr><td>11891630</td><td>"zza"</td><td>"Embaza mi goşt ra hes kena."</td><td>11915379</td><td>"tur"</td><td>"Arkadaşım eti sever."</td><td>["tur", "zza"]</td></tr><tr><td>6096269</td><td>"zza"</td><td>"Bejné lajekî dergo."</td><td>8140003</td><td>"tur"</td><td>"Çocuğun boyu uzundur."</td><td>["tur", "zza"]</td></tr><tr><td>12160925</td><td>"zza"</td><td>"Mi xo rê vizêrî komputerêka newîye herînaye."</td><td>12330372</td><td>"kmr"</td><td>"Min do ji xwe re kompîtureke nû kirî."</td><td>["kmr", "zza"]</td></tr><tr><td>9394349</td><td>"zza"</td><td>"Va dür bo, bınê hardi de mebo!"</td><td>9509054</td><td>"tur"</td><td>"Uzakta olsun da toprağın altında olmasın."</td><td>["tur", "zza"]</td></tr><tr><td>9394313</td><td>"zza"</td><td>"Uyo ke sarri rê rameno, sarri rê çineno; rozê yena ke vergi ra vêsan, morri ra vıran maneno!"</td><td>9509052</td><td>"tur"</td><td>"Başkaları için ekip başkaları için biçen kişi gün gelir kurttan aç, yılandan çıplak kalır."</td><td>["tur", "zza"]</td></tr></tbody></table></div>"
|
1250 |
+
]
|
1251 |
+
},
|
1252 |
+
"metadata": {},
|
1253 |
+
"execution_count": 9
|
1254 |
+
}
|
1255 |
+
]
|
1256 |
+
},
|
1257 |
+
{
|
1258 |
+
"cell_type": "markdown",
|
1259 |
+
"source": [
|
1260 |
+
"# Upload to HF Hub"
|
1261 |
+
],
|
1262 |
+
"metadata": {
|
1263 |
+
"id": "cyCyXckg2xOH"
|
1264 |
+
}
|
1265 |
+
},
|
1266 |
+
{
|
1267 |
+
"cell_type": "code",
|
1268 |
+
"source": [
|
1269 |
+
"from datasets import Dataset\n",
|
1270 |
+
"\n",
|
1271 |
+
"data_dict = df_translations.to_dict(as_series=False)\n",
|
1272 |
+
"\n",
|
1273 |
+
"dataset = Dataset.from_dict(data_dict)\n",
|
1274 |
+
"\n",
|
1275 |
+
"dataset"
|
1276 |
+
],
|
1277 |
+
"metadata": {
|
1278 |
+
"id": "Nr-2gaGe2wfs",
|
1279 |
+
"colab": {
|
1280 |
+
"base_uri": "https://localhost:8080/"
|
1281 |
+
},
|
1282 |
+
"outputId": "f2f2ecbf-661e-449e-9438-bda73953a7d7"
|
1283 |
+
},
|
1284 |
+
"execution_count": null,
|
1285 |
+
"outputs": [
|
1286 |
+
{
|
1287 |
+
"output_type": "execute_result",
|
1288 |
+
"data": {
|
1289 |
+
"text/plain": [
|
1290 |
+
"Dataset({\n",
|
1291 |
+
" features: ['id_src', 'lang_src', 'sentence_src', 'id_tgt', 'lang_tgt', 'sentence_tgt', 'lang_pair'],\n",
|
1292 |
+
" num_rows: 8547819\n",
|
1293 |
+
"})"
|
1294 |
+
]
|
1295 |
+
},
|
1296 |
+
"metadata": {},
|
1297 |
+
"execution_count": 13
|
1298 |
+
}
|
1299 |
+
]
|
1300 |
+
},
|
1301 |
+
{
|
1302 |
+
"cell_type": "code",
|
1303 |
+
"source": [
|
1304 |
+
"from huggingface_hub import notebook_login\n",
|
1305 |
+
"\n",
|
1306 |
+
"notebook_login()"
|
1307 |
+
],
|
1308 |
+
"metadata": {
|
1309 |
+
"colab": {
|
1310 |
+
"base_uri": "https://localhost:8080/",
|
1311 |
+
"height": 17,
|
1312 |
+
"referenced_widgets": [
|
1313 |
+
"566f1e56bfe04c07a27bd4504f2bb854",
|
1314 |
+
"fe9df307b35c4b0b918b3bf162cd89fd",
|
1315 |
+
"7ee8cdc19bd2479a9fbc90e8bfc97766",
|
1316 |
+
"26bad56be4854c98bfda174e218b37d5",
|
1317 |
+
"2b966741922c4c568f2edfbda93ee2f1",
|
1318 |
+
"1d4c8574c05e462bac290aa65c72a955",
|
1319 |
+
"3eadb00fc21642498e07d71079f74301",
|
1320 |
+
"6890a72c9a6d4407984cf356cec2e268",
|
1321 |
+
"3f9e1ff506ce4ff3aab0750a0b948bc3",
|
1322 |
+
"38f848529f7d4e499583a04fcc23e684",
|
1323 |
+
"2c473d21b21d444298341cfa2f4955fb",
|
1324 |
+
"26acce0feccf44959b87ed3f4306582e",
|
1325 |
+
"3a85fa552b65424a8e1bdc1414409433",
|
1326 |
+
"1be4bfddafd14821bc6cc117ae80310c",
|
1327 |
+
"ab026ec0e7034f0db99291eae2e2b3ad",
|
1328 |
+
"714707fa2a844c4baeaa457b045bbcac",
|
1329 |
+
"e964314c2a004fd3b55267d0b0b16625",
|
1330 |
+
"fbc7ee006a24400fa3924ad8e7d99004",
|
1331 |
+
"cca417ac12bf471681b63a64cf2e36fa",
|
1332 |
+
"1761d171d49541baaf8cf650e5bba3df"
|
1333 |
+
]
|
1334 |
+
},
|
1335 |
+
"id": "wpl_44bxUdsb",
|
1336 |
+
"outputId": "9e5c2a6d-2121-4aee-e275-16797c6006a6"
|
1337 |
+
},
|
1338 |
+
"execution_count": null,
|
1339 |
+
"outputs": [
|
1340 |
+
{
|
1341 |
+
"output_type": "display_data",
|
1342 |
+
"data": {
|
1343 |
+
"text/plain": [
|
1344 |
+
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
|
1345 |
+
],
|
1346 |
+
"application/vnd.jupyter.widget-view+json": {
|
1347 |
+
"version_major": 2,
|
1348 |
+
"version_minor": 0,
|
1349 |
+
"model_id": "566f1e56bfe04c07a27bd4504f2bb854"
|
1350 |
+
}
|
1351 |
+
},
|
1352 |
+
"metadata": {}
|
1353 |
+
}
|
1354 |
+
]
|
1355 |
+
},
|
1356 |
+
{
|
1357 |
+
"cell_type": "code",
|
1358 |
+
"source": [
|
1359 |
+
"commit_message = \"Tatoeba Translations\"\n",
|
1360 |
+
"commit_description=\"Tatoeba Multilingual Translations\"\n",
|
1361 |
+
"\n",
|
1362 |
+
"dataset.push_to_hub(\"ymoslem/Tatoeba-Translations\",\n",
|
1363 |
+
" data_dir=\"data\",\n",
|
1364 |
+
" private=True,\n",
|
1365 |
+
" commit_message=commit_message,\n",
|
1366 |
+
" commit_description=commit_description,\n",
|
1367 |
+
" )"
|
1368 |
+
],
|
1369 |
+
"metadata": {
|
1370 |
+
"id": "EnrSKJDo26Fz"
|
1371 |
+
},
|
1372 |
+
"execution_count": null,
|
1373 |
+
"outputs": []
|
1374 |
+
}
|
1375 |
+
]
|
1376 |
+
}
|