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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": []
7
+ },
8
+ "kernelspec": {
9
+ "name": "python3",
10
+ "display_name": "Python 3"
11
+ },
12
+ "language_info": {
13
+ "name": "python"
14
+ },
15
+ "widgets": {
16
+ "application/vnd.jupyter.widget-state+json": {
17
+ "ddefb3129871463c9c5ed9a3701bdaa3": {
18
+ "model_module": "@jupyter-widgets/controls",
19
+ "model_name": "HBoxModel",
20
+ "model_module_version": "1.5.0",
21
+ "state": {
22
+ "_dom_classes": [],
23
+ "_model_module": "@jupyter-widgets/controls",
24
+ "_model_module_version": "1.5.0",
25
+ "_model_name": "HBoxModel",
26
+ "_view_count": null,
27
+ "_view_module": "@jupyter-widgets/controls",
28
+ "_view_module_version": "1.5.0",
29
+ "_view_name": "HBoxView",
30
+ "box_style": "",
31
+ "children": [
32
+ "IPY_MODEL_0b9c1ac1832c4adc84d8b0777bed779d",
33
+ "IPY_MODEL_be96b3ea50b14568a635ec2c2dbb54d1",
34
+ "IPY_MODEL_2521f37bd5ca4ca485407e2a4e48b74d"
35
+ ],
36
+ "layout": "IPY_MODEL_8cae0d12ae6e4f5bb7aa3b7d02973b9f"
37
+ }
38
+ },
39
+ "0b9c1ac1832c4adc84d8b0777bed779d": {
40
+ "model_module": "@jupyter-widgets/controls",
41
+ "model_name": "HTMLModel",
42
+ "model_module_version": "1.5.0",
43
+ "state": {
44
+ "_dom_classes": [],
45
+ "_model_module": "@jupyter-widgets/controls",
46
+ "_model_module_version": "1.5.0",
47
+ "_model_name": "HTMLModel",
48
+ "_view_count": null,
49
+ "_view_module": "@jupyter-widgets/controls",
50
+ "_view_module_version": "1.5.0",
51
+ "_view_name": "HTMLView",
52
+ "description": "",
53
+ "description_tooltip": null,
54
+ "layout": "IPY_MODEL_c530d758dc804f8389d55be661def1bd",
55
+ "placeholder": "​",
56
+ "style": "IPY_MODEL_6c06b784368248cb95d529a2f381e61f",
57
+ "value": "tokenizer_config.json: 100%"
58
+ }
59
+ },
60
+ "be96b3ea50b14568a635ec2c2dbb54d1": {
61
+ "model_module": "@jupyter-widgets/controls",
62
+ "model_name": "FloatProgressModel",
63
+ "model_module_version": "1.5.0",
64
+ "state": {
65
+ "_dom_classes": [],
66
+ "_model_module": "@jupyter-widgets/controls",
67
+ "_model_module_version": "1.5.0",
68
+ "_model_name": "FloatProgressModel",
69
+ "_view_count": null,
70
+ "_view_module": "@jupyter-widgets/controls",
71
+ "_view_module_version": "1.5.0",
72
+ "_view_name": "ProgressView",
73
+ "bar_style": "success",
74
+ "description": "",
75
+ "description_tooltip": null,
76
+ "layout": "IPY_MODEL_c390d81abd054ad6aa561c181e5137a7",
77
+ "max": 48,
78
+ "min": 0,
79
+ "orientation": "horizontal",
80
+ "style": "IPY_MODEL_bdfa68bfab2943079b550365125a371f",
81
+ "value": 48
82
+ }
83
+ },
84
+ "2521f37bd5ca4ca485407e2a4e48b74d": {
85
+ "model_module": "@jupyter-widgets/controls",
86
+ "model_name": "HTMLModel",
87
+ "model_module_version": "1.5.0",
88
+ "state": {
89
+ "_dom_classes": [],
90
+ "_model_module": "@jupyter-widgets/controls",
91
+ "_model_module_version": "1.5.0",
92
+ "_model_name": "HTMLModel",
93
+ "_view_count": null,
94
+ "_view_module": "@jupyter-widgets/controls",
95
+ "_view_module_version": "1.5.0",
96
+ "_view_name": "HTMLView",
97
+ "description": "",
98
+ "description_tooltip": null,
99
+ "layout": "IPY_MODEL_3bc32ad1603043b7a5cc0d1a48ccd95f",
100
+ "placeholder": "​",
101
+ "style": "IPY_MODEL_e293cb963b814885adda4c0adfeb2608",
102
+ "value": " 48.0/48.0 [00:00<00:00, 1.65kB/s]"
103
+ }
104
+ },
105
+ "8cae0d12ae6e4f5bb7aa3b7d02973b9f": {
106
+ "model_module": "@jupyter-widgets/base",
107
+ "model_name": "LayoutModel",
108
+ "model_module_version": "1.2.0",
109
+ "state": {
110
+ "_model_module": "@jupyter-widgets/base",
111
+ "_model_module_version": "1.2.0",
112
+ "_model_name": "LayoutModel",
113
+ "_view_count": null,
114
+ "_view_module": "@jupyter-widgets/base",
115
+ "_view_module_version": "1.2.0",
116
+ "_view_name": "LayoutView",
117
+ "align_content": null,
118
+ "align_items": null,
119
+ "align_self": null,
120
+ "border": null,
121
+ "bottom": null,
122
+ "display": null,
123
+ "flex": null,
124
+ "flex_flow": null,
125
+ "grid_area": null,
126
+ "grid_auto_columns": null,
127
+ "grid_auto_flow": null,
128
+ "grid_auto_rows": null,
129
+ "grid_column": null,
130
+ "grid_gap": null,
131
+ "grid_row": null,
132
+ "grid_template_areas": null,
133
+ "grid_template_columns": null,
134
+ "grid_template_rows": null,
135
+ "height": null,
136
+ "justify_content": null,
137
+ "justify_items": null,
138
+ "left": null,
139
+ "margin": null,
140
+ "max_height": null,
141
+ "max_width": null,
142
+ "min_height": null,
143
+ "min_width": null,
144
+ "object_fit": null,
145
+ "object_position": null,
146
+ "order": null,
147
+ "overflow": null,
148
+ "overflow_x": null,
149
+ "overflow_y": null,
150
+ "padding": null,
151
+ "right": null,
152
+ "top": null,
153
+ "visibility": null,
154
+ "width": null
155
+ }
156
+ },
157
+ "c530d758dc804f8389d55be661def1bd": {
158
+ "model_module": "@jupyter-widgets/base",
159
+ "model_name": "LayoutModel",
160
+ "model_module_version": "1.2.0",
161
+ "state": {
162
+ "_model_module": "@jupyter-widgets/base",
163
+ "_model_module_version": "1.2.0",
164
+ "_model_name": "LayoutModel",
165
+ "_view_count": null,
166
+ "_view_module": "@jupyter-widgets/base",
167
+ "_view_module_version": "1.2.0",
168
+ "_view_name": "LayoutView",
169
+ "align_content": null,
170
+ "align_items": null,
171
+ "align_self": null,
172
+ "border": null,
173
+ "bottom": null,
174
+ "display": null,
175
+ "flex": null,
176
+ "flex_flow": null,
177
+ "grid_area": null,
178
+ "grid_auto_columns": null,
179
+ "grid_auto_flow": null,
180
+ "grid_auto_rows": null,
181
+ "grid_column": null,
182
+ "grid_gap": null,
183
+ "grid_row": null,
184
+ "grid_template_areas": null,
185
+ "grid_template_columns": null,
186
+ "grid_template_rows": null,
187
+ "height": null,
188
+ "justify_content": null,
189
+ "justify_items": null,
190
+ "left": null,
191
+ "margin": null,
192
+ "max_height": null,
193
+ "max_width": null,
194
+ "min_height": null,
195
+ "min_width": null,
196
+ "object_fit": null,
197
+ "object_position": null,
198
+ "order": null,
199
+ "overflow": null,
200
+ "overflow_x": null,
201
+ "overflow_y": null,
202
+ "padding": null,
203
+ "right": null,
204
+ "top": null,
205
+ "visibility": null,
206
+ "width": null
207
+ }
208
+ },
209
+ "6c06b784368248cb95d529a2f381e61f": {
210
+ "model_module": "@jupyter-widgets/controls",
211
+ "model_name": "DescriptionStyleModel",
212
+ "model_module_version": "1.5.0",
213
+ "state": {
214
+ "_model_module": "@jupyter-widgets/controls",
215
+ "_model_module_version": "1.5.0",
216
+ "_model_name": "DescriptionStyleModel",
217
+ "_view_count": null,
218
+ "_view_module": "@jupyter-widgets/base",
219
+ "_view_module_version": "1.2.0",
220
+ "_view_name": "StyleView",
221
+ "description_width": ""
222
+ }
223
+ },
224
+ "c390d81abd054ad6aa561c181e5137a7": {
225
+ "model_module": "@jupyter-widgets/base",
226
+ "model_name": "LayoutModel",
227
+ "model_module_version": "1.2.0",
228
+ "state": {
229
+ "_model_module": "@jupyter-widgets/base",
230
+ "_model_module_version": "1.2.0",
231
+ "_model_name": "LayoutModel",
232
+ "_view_count": null,
233
+ "_view_module": "@jupyter-widgets/base",
234
+ "_view_module_version": "1.2.0",
235
+ "_view_name": "LayoutView",
236
+ "align_content": null,
237
+ "align_items": null,
238
+ "align_self": null,
239
+ "border": null,
240
+ "bottom": null,
241
+ "display": null,
242
+ "flex": null,
243
+ "flex_flow": null,
244
+ "grid_area": null,
245
+ "grid_auto_columns": null,
246
+ "grid_auto_flow": null,
247
+ "grid_auto_rows": null,
248
+ "grid_column": null,
249
+ "grid_gap": null,
250
+ "grid_row": null,
251
+ "grid_template_areas": null,
252
+ "grid_template_columns": null,
253
+ "grid_template_rows": null,
254
+ "height": null,
255
+ "justify_content": null,
256
+ "justify_items": null,
257
+ "left": null,
258
+ "margin": null,
259
+ "max_height": null,
260
+ "max_width": null,
261
+ "min_height": null,
262
+ "min_width": null,
263
+ "object_fit": null,
264
+ "object_position": null,
265
+ "order": null,
266
+ "overflow": null,
267
+ "overflow_x": null,
268
+ "overflow_y": null,
269
+ "padding": null,
270
+ "right": null,
271
+ "top": null,
272
+ "visibility": null,
273
+ "width": null
274
+ }
275
+ },
276
+ "bdfa68bfab2943079b550365125a371f": {
277
+ "model_module": "@jupyter-widgets/controls",
278
+ "model_name": "ProgressStyleModel",
279
+ "model_module_version": "1.5.0",
280
+ "state": {
281
+ "_model_module": "@jupyter-widgets/controls",
282
+ "_model_module_version": "1.5.0",
283
+ "_model_name": "ProgressStyleModel",
284
+ "_view_count": null,
285
+ "_view_module": "@jupyter-widgets/base",
286
+ "_view_module_version": "1.2.0",
287
+ "_view_name": "StyleView",
288
+ "bar_color": null,
289
+ "description_width": ""
290
+ }
291
+ },
292
+ "3bc32ad1603043b7a5cc0d1a48ccd95f": {
293
+ "model_module": "@jupyter-widgets/base",
294
+ "model_name": "LayoutModel",
295
+ "model_module_version": "1.2.0",
296
+ "state": {
297
+ "_model_module": "@jupyter-widgets/base",
298
+ "_model_module_version": "1.2.0",
299
+ "_model_name": "LayoutModel",
300
+ "_view_count": null,
301
+ "_view_module": "@jupyter-widgets/base",
302
+ "_view_module_version": "1.2.0",
303
+ "_view_name": "LayoutView",
304
+ "align_content": null,
305
+ "align_items": null,
306
+ "align_self": null,
307
+ "border": null,
308
+ "bottom": null,
309
+ "display": null,
310
+ "flex": null,
311
+ "flex_flow": null,
312
+ "grid_area": null,
313
+ "grid_auto_columns": null,
314
+ "grid_auto_flow": null,
315
+ "grid_auto_rows": null,
316
+ "grid_column": null,
317
+ "grid_gap": null,
318
+ "grid_row": null,
319
+ "grid_template_areas": null,
320
+ "grid_template_columns": null,
321
+ "grid_template_rows": null,
322
+ "height": null,
323
+ "justify_content": null,
324
+ "justify_items": null,
325
+ "left": null,
326
+ "margin": null,
327
+ "max_height": null,
328
+ "max_width": null,
329
+ "min_height": null,
330
+ "min_width": null,
331
+ "object_fit": null,
332
+ "object_position": null,
333
+ "order": null,
334
+ "overflow": null,
335
+ "overflow_x": null,
336
+ "overflow_y": null,
337
+ "padding": null,
338
+ "right": null,
339
+ "top": null,
340
+ "visibility": null,
341
+ "width": null
342
+ }
343
+ },
344
+ "e293cb963b814885adda4c0adfeb2608": {
345
+ "model_module": "@jupyter-widgets/controls",
346
+ "model_name": "DescriptionStyleModel",
347
+ "model_module_version": "1.5.0",
348
+ "state": {
349
+ "_model_module": "@jupyter-widgets/controls",
350
+ "_model_module_version": "1.5.0",
351
+ "_model_name": "DescriptionStyleModel",
352
+ "_view_count": null,
353
+ "_view_module": "@jupyter-widgets/base",
354
+ "_view_module_version": "1.2.0",
355
+ "_view_name": "StyleView",
356
+ "description_width": ""
357
+ }
358
+ },
359
+ "a0725c2e950f42b291e89f9c05ec5a9b": {
360
+ "model_module": "@jupyter-widgets/controls",
361
+ "model_name": "HBoxModel",
362
+ "model_module_version": "1.5.0",
363
+ "state": {
364
+ "_dom_classes": [],
365
+ "_model_module": "@jupyter-widgets/controls",
366
+ "_model_module_version": "1.5.0",
367
+ "_model_name": "HBoxModel",
368
+ "_view_count": null,
369
+ "_view_module": "@jupyter-widgets/controls",
370
+ "_view_module_version": "1.5.0",
371
+ "_view_name": "HBoxView",
372
+ "box_style": "",
373
+ "children": [
374
+ "IPY_MODEL_ae1374bdc51a49f1aae30c920ef51597",
375
+ "IPY_MODEL_1f765d6a82aa46cc9feb7192181384fb",
376
+ "IPY_MODEL_234bdb28557e45479683365647347ba7"
377
+ ],
378
+ "layout": "IPY_MODEL_929e85dc4e4f4e69b54034baad90fddb"
379
+ }
380
+ },
381
+ "ae1374bdc51a49f1aae30c920ef51597": {
382
+ "model_module": "@jupyter-widgets/controls",
383
+ "model_name": "HTMLModel",
384
+ "model_module_version": "1.5.0",
385
+ "state": {
386
+ "_dom_classes": [],
387
+ "_model_module": "@jupyter-widgets/controls",
388
+ "_model_module_version": "1.5.0",
389
+ "_model_name": "HTMLModel",
390
+ "_view_count": null,
391
+ "_view_module": "@jupyter-widgets/controls",
392
+ "_view_module_version": "1.5.0",
393
+ "_view_name": "HTMLView",
394
+ "description": "",
395
+ "description_tooltip": null,
396
+ "layout": "IPY_MODEL_a3827fe07a8941559d7561327acd2728",
397
+ "placeholder": "​",
398
+ "style": "IPY_MODEL_ea6dcccdd28c440aa40f4b456665eeea",
399
+ "value": "vocab.txt: 100%"
400
+ }
401
+ },
402
+ "1f765d6a82aa46cc9feb7192181384fb": {
403
+ "model_module": "@jupyter-widgets/controls",
404
+ "model_name": "FloatProgressModel",
405
+ "model_module_version": "1.5.0",
406
+ "state": {
407
+ "_dom_classes": [],
408
+ "_model_module": "@jupyter-widgets/controls",
409
+ "_model_module_version": "1.5.0",
410
+ "_model_name": "FloatProgressModel",
411
+ "_view_count": null,
412
+ "_view_module": "@jupyter-widgets/controls",
413
+ "_view_module_version": "1.5.0",
414
+ "_view_name": "ProgressView",
415
+ "bar_style": "success",
416
+ "description": "",
417
+ "description_tooltip": null,
418
+ "layout": "IPY_MODEL_d92445027c434585b08b0823d4f5caef",
419
+ "max": 231508,
420
+ "min": 0,
421
+ "orientation": "horizontal",
422
+ "style": "IPY_MODEL_2417e2ee32f8428a870b3a6aa655901e",
423
+ "value": 231508
424
+ }
425
+ },
426
+ "234bdb28557e45479683365647347ba7": {
427
+ "model_module": "@jupyter-widgets/controls",
428
+ "model_name": "HTMLModel",
429
+ "model_module_version": "1.5.0",
430
+ "state": {
431
+ "_dom_classes": [],
432
+ "_model_module": "@jupyter-widgets/controls",
433
+ "_model_module_version": "1.5.0",
434
+ "_model_name": "HTMLModel",
435
+ "_view_count": null,
436
+ "_view_module": "@jupyter-widgets/controls",
437
+ "_view_module_version": "1.5.0",
438
+ "_view_name": "HTMLView",
439
+ "description": "",
440
+ "description_tooltip": null,
441
+ "layout": "IPY_MODEL_59c7ce3011e644d4b1ab0e7a253f2832",
442
+ "placeholder": "​",
443
+ "style": "IPY_MODEL_505b6e76012c413aaadfc8d356f70106",
444
+ "value": " 232k/232k [00:00<00:00, 2.95MB/s]"
445
+ }
446
+ },
447
+ "929e85dc4e4f4e69b54034baad90fddb": {
448
+ "model_module": "@jupyter-widgets/base",
449
+ "model_name": "LayoutModel",
450
+ "model_module_version": "1.2.0",
451
+ "state": {
452
+ "_model_module": "@jupyter-widgets/base",
453
+ "_model_module_version": "1.2.0",
454
+ "_model_name": "LayoutModel",
455
+ "_view_count": null,
456
+ "_view_module": "@jupyter-widgets/base",
457
+ "_view_module_version": "1.2.0",
458
+ "_view_name": "LayoutView",
459
+ "align_content": null,
460
+ "align_items": null,
461
+ "align_self": null,
462
+ "border": null,
463
+ "bottom": null,
464
+ "display": null,
465
+ "flex": null,
466
+ "flex_flow": null,
467
+ "grid_area": null,
468
+ "grid_auto_columns": null,
469
+ "grid_auto_flow": null,
470
+ "grid_auto_rows": null,
471
+ "grid_column": null,
472
+ "grid_gap": null,
473
+ "grid_row": null,
474
+ "grid_template_areas": null,
475
+ "grid_template_columns": null,
476
+ "grid_template_rows": null,
477
+ "height": null,
478
+ "justify_content": null,
479
+ "justify_items": null,
480
+ "left": null,
481
+ "margin": null,
482
+ "max_height": null,
483
+ "max_width": null,
484
+ "min_height": null,
485
+ "min_width": null,
486
+ "object_fit": null,
487
+ "object_position": null,
488
+ "order": null,
489
+ "overflow": null,
490
+ "overflow_x": null,
491
+ "overflow_y": null,
492
+ "padding": null,
493
+ "right": null,
494
+ "top": null,
495
+ "visibility": null,
496
+ "width": null
497
+ }
498
+ },
499
+ "a3827fe07a8941559d7561327acd2728": {
500
+ "model_module": "@jupyter-widgets/base",
501
+ "model_name": "LayoutModel",
502
+ "model_module_version": "1.2.0",
503
+ "state": {
504
+ "_model_module": "@jupyter-widgets/base",
505
+ "_model_module_version": "1.2.0",
506
+ "_model_name": "LayoutModel",
507
+ "_view_count": null,
508
+ "_view_module": "@jupyter-widgets/base",
509
+ "_view_module_version": "1.2.0",
510
+ "_view_name": "LayoutView",
511
+ "align_content": null,
512
+ "align_items": null,
513
+ "align_self": null,
514
+ "border": null,
515
+ "bottom": null,
516
+ "display": null,
517
+ "flex": null,
518
+ "flex_flow": null,
519
+ "grid_area": null,
520
+ "grid_auto_columns": null,
521
+ "grid_auto_flow": null,
522
+ "grid_auto_rows": null,
523
+ "grid_column": null,
524
+ "grid_gap": null,
525
+ "grid_row": null,
526
+ "grid_template_areas": null,
527
+ "grid_template_columns": null,
528
+ "grid_template_rows": null,
529
+ "height": null,
530
+ "justify_content": null,
531
+ "justify_items": null,
532
+ "left": null,
533
+ "margin": null,
534
+ "max_height": null,
535
+ "max_width": null,
536
+ "min_height": null,
537
+ "min_width": null,
538
+ "object_fit": null,
539
+ "object_position": null,
540
+ "order": null,
541
+ "overflow": null,
542
+ "overflow_x": null,
543
+ "overflow_y": null,
544
+ "padding": null,
545
+ "right": null,
546
+ "top": null,
547
+ "visibility": null,
548
+ "width": null
549
+ }
550
+ },
551
+ "ea6dcccdd28c440aa40f4b456665eeea": {
552
+ "model_module": "@jupyter-widgets/controls",
553
+ "model_name": "DescriptionStyleModel",
554
+ "model_module_version": "1.5.0",
555
+ "state": {
556
+ "_model_module": "@jupyter-widgets/controls",
557
+ "_model_module_version": "1.5.0",
558
+ "_model_name": "DescriptionStyleModel",
559
+ "_view_count": null,
560
+ "_view_module": "@jupyter-widgets/base",
561
+ "_view_module_version": "1.2.0",
562
+ "_view_name": "StyleView",
563
+ "description_width": ""
564
+ }
565
+ },
566
+ "d92445027c434585b08b0823d4f5caef": {
567
+ "model_module": "@jupyter-widgets/base",
568
+ "model_name": "LayoutModel",
569
+ "model_module_version": "1.2.0",
570
+ "state": {
571
+ "_model_module": "@jupyter-widgets/base",
572
+ "_model_module_version": "1.2.0",
573
+ "_model_name": "LayoutModel",
574
+ "_view_count": null,
575
+ "_view_module": "@jupyter-widgets/base",
576
+ "_view_module_version": "1.2.0",
577
+ "_view_name": "LayoutView",
578
+ "align_content": null,
579
+ "align_items": null,
580
+ "align_self": null,
581
+ "border": null,
582
+ "bottom": null,
583
+ "display": null,
584
+ "flex": null,
585
+ "flex_flow": null,
586
+ "grid_area": null,
587
+ "grid_auto_columns": null,
588
+ "grid_auto_flow": null,
589
+ "grid_auto_rows": null,
590
+ "grid_column": null,
591
+ "grid_gap": null,
592
+ "grid_row": null,
593
+ "grid_template_areas": null,
594
+ "grid_template_columns": null,
595
+ "grid_template_rows": null,
596
+ "height": null,
597
+ "justify_content": null,
598
+ "justify_items": null,
599
+ "left": null,
600
+ "margin": null,
601
+ "max_height": null,
602
+ "max_width": null,
603
+ "min_height": null,
604
+ "min_width": null,
605
+ "object_fit": null,
606
+ "object_position": null,
607
+ "order": null,
608
+ "overflow": null,
609
+ "overflow_x": null,
610
+ "overflow_y": null,
611
+ "padding": null,
612
+ "right": null,
613
+ "top": null,
614
+ "visibility": null,
615
+ "width": null
616
+ }
617
+ },
618
+ "2417e2ee32f8428a870b3a6aa655901e": {
619
+ "model_module": "@jupyter-widgets/controls",
620
+ "model_name": "ProgressStyleModel",
621
+ "model_module_version": "1.5.0",
622
+ "state": {
623
+ "_model_module": "@jupyter-widgets/controls",
624
+ "_model_module_version": "1.5.0",
625
+ "_model_name": "ProgressStyleModel",
626
+ "_view_count": null,
627
+ "_view_module": "@jupyter-widgets/base",
628
+ "_view_module_version": "1.2.0",
629
+ "_view_name": "StyleView",
630
+ "bar_color": null,
631
+ "description_width": ""
632
+ }
633
+ },
634
+ "59c7ce3011e644d4b1ab0e7a253f2832": {
635
+ "model_module": "@jupyter-widgets/base",
636
+ "model_name": "LayoutModel",
637
+ "model_module_version": "1.2.0",
638
+ "state": {
639
+ "_model_module": "@jupyter-widgets/base",
640
+ "_model_module_version": "1.2.0",
641
+ "_model_name": "LayoutModel",
642
+ "_view_count": null,
643
+ "_view_module": "@jupyter-widgets/base",
644
+ "_view_module_version": "1.2.0",
645
+ "_view_name": "LayoutView",
646
+ "align_content": null,
647
+ "align_items": null,
648
+ "align_self": null,
649
+ "border": null,
650
+ "bottom": null,
651
+ "display": null,
652
+ "flex": null,
653
+ "flex_flow": null,
654
+ "grid_area": null,
655
+ "grid_auto_columns": null,
656
+ "grid_auto_flow": null,
657
+ "grid_auto_rows": null,
658
+ "grid_column": null,
659
+ "grid_gap": null,
660
+ "grid_row": null,
661
+ "grid_template_areas": null,
662
+ "grid_template_columns": null,
663
+ "grid_template_rows": null,
664
+ "height": null,
665
+ "justify_content": null,
666
+ "justify_items": null,
667
+ "left": null,
668
+ "margin": null,
669
+ "max_height": null,
670
+ "max_width": null,
671
+ "min_height": null,
672
+ "min_width": null,
673
+ "object_fit": null,
674
+ "object_position": null,
675
+ "order": null,
676
+ "overflow": null,
677
+ "overflow_x": null,
678
+ "overflow_y": null,
679
+ "padding": null,
680
+ "right": null,
681
+ "top": null,
682
+ "visibility": null,
683
+ "width": null
684
+ }
685
+ },
686
+ "505b6e76012c413aaadfc8d356f70106": {
687
+ "model_module": "@jupyter-widgets/controls",
688
+ "model_name": "DescriptionStyleModel",
689
+ "model_module_version": "1.5.0",
690
+ "state": {
691
+ "_model_module": "@jupyter-widgets/controls",
692
+ "_model_module_version": "1.5.0",
693
+ "_model_name": "DescriptionStyleModel",
694
+ "_view_count": null,
695
+ "_view_module": "@jupyter-widgets/base",
696
+ "_view_module_version": "1.2.0",
697
+ "_view_name": "StyleView",
698
+ "description_width": ""
699
+ }
700
+ },
701
+ "b9f13091017440fda5333457ed78e3af": {
702
+ "model_module": "@jupyter-widgets/controls",
703
+ "model_name": "HBoxModel",
704
+ "model_module_version": "1.5.0",
705
+ "state": {
706
+ "_dom_classes": [],
707
+ "_model_module": "@jupyter-widgets/controls",
708
+ "_model_module_version": "1.5.0",
709
+ "_model_name": "HBoxModel",
710
+ "_view_count": null,
711
+ "_view_module": "@jupyter-widgets/controls",
712
+ "_view_module_version": "1.5.0",
713
+ "_view_name": "HBoxView",
714
+ "box_style": "",
715
+ "children": [
716
+ "IPY_MODEL_e9522478fcff46adb3e6d89a816570de",
717
+ "IPY_MODEL_fb1e4b52bb124c68859993b127830828",
718
+ "IPY_MODEL_609ec4e2fcab46ae98a69d29237344c0"
719
+ ],
720
+ "layout": "IPY_MODEL_14d0c0e1fa884f9cba15fa842c96943b"
721
+ }
722
+ },
723
+ "e9522478fcff46adb3e6d89a816570de": {
724
+ "model_module": "@jupyter-widgets/controls",
725
+ "model_name": "HTMLModel",
726
+ "model_module_version": "1.5.0",
727
+ "state": {
728
+ "_dom_classes": [],
729
+ "_model_module": "@jupyter-widgets/controls",
730
+ "_model_module_version": "1.5.0",
731
+ "_model_name": "HTMLModel",
732
+ "_view_count": null,
733
+ "_view_module": "@jupyter-widgets/controls",
734
+ "_view_module_version": "1.5.0",
735
+ "_view_name": "HTMLView",
736
+ "description": "",
737
+ "description_tooltip": null,
738
+ "layout": "IPY_MODEL_9f33f8f425dd474594ee9e2eafbbc815",
739
+ "placeholder": "​",
740
+ "style": "IPY_MODEL_9b677f233cd84ba4bd3afe61190e1f49",
741
+ "value": "tokenizer.json: 100%"
742
+ }
743
+ },
744
+ "fb1e4b52bb124c68859993b127830828": {
745
+ "model_module": "@jupyter-widgets/controls",
746
+ "model_name": "FloatProgressModel",
747
+ "model_module_version": "1.5.0",
748
+ "state": {
749
+ "_dom_classes": [],
750
+ "_model_module": "@jupyter-widgets/controls",
751
+ "_model_module_version": "1.5.0",
752
+ "_model_name": "FloatProgressModel",
753
+ "_view_count": null,
754
+ "_view_module": "@jupyter-widgets/controls",
755
+ "_view_module_version": "1.5.0",
756
+ "_view_name": "ProgressView",
757
+ "bar_style": "success",
758
+ "description": "",
759
+ "description_tooltip": null,
760
+ "layout": "IPY_MODEL_9d0feae1b964477283d0fc610bbc347c",
761
+ "max": 466062,
762
+ "min": 0,
763
+ "orientation": "horizontal",
764
+ "style": "IPY_MODEL_a50de7d14a734da283d7d640cb66f10e",
765
+ "value": 466062
766
+ }
767
+ },
768
+ "609ec4e2fcab46ae98a69d29237344c0": {
769
+ "model_module": "@jupyter-widgets/controls",
770
+ "model_name": "HTMLModel",
771
+ "model_module_version": "1.5.0",
772
+ "state": {
773
+ "_dom_classes": [],
774
+ "_model_module": "@jupyter-widgets/controls",
775
+ "_model_module_version": "1.5.0",
776
+ "_model_name": "HTMLModel",
777
+ "_view_count": null,
778
+ "_view_module": "@jupyter-widgets/controls",
779
+ "_view_module_version": "1.5.0",
780
+ "_view_name": "HTMLView",
781
+ "description": "",
782
+ "description_tooltip": null,
783
+ "layout": "IPY_MODEL_caadefbbfde043838ab85ae5803d75dd",
784
+ "placeholder": "​",
785
+ "style": "IPY_MODEL_a93a6fc08ab340f5b5e2bf0d216ebb58",
786
+ "value": " 466k/466k [00:00<00:00, 6.91MB/s]"
787
+ }
788
+ },
789
+ "14d0c0e1fa884f9cba15fa842c96943b": {
790
+ "model_module": "@jupyter-widgets/base",
791
+ "model_name": "LayoutModel",
792
+ "model_module_version": "1.2.0",
793
+ "state": {
794
+ "_model_module": "@jupyter-widgets/base",
795
+ "_model_module_version": "1.2.0",
796
+ "_model_name": "LayoutModel",
797
+ "_view_count": null,
798
+ "_view_module": "@jupyter-widgets/base",
799
+ "_view_module_version": "1.2.0",
800
+ "_view_name": "LayoutView",
801
+ "align_content": null,
802
+ "align_items": null,
803
+ "align_self": null,
804
+ "border": null,
805
+ "bottom": null,
806
+ "display": null,
807
+ "flex": null,
808
+ "flex_flow": null,
809
+ "grid_area": null,
810
+ "grid_auto_columns": null,
811
+ "grid_auto_flow": null,
812
+ "grid_auto_rows": null,
813
+ "grid_column": null,
814
+ "grid_gap": null,
815
+ "grid_row": null,
816
+ "grid_template_areas": null,
817
+ "grid_template_columns": null,
818
+ "grid_template_rows": null,
819
+ "height": null,
820
+ "justify_content": null,
821
+ "justify_items": null,
822
+ "left": null,
823
+ "margin": null,
824
+ "max_height": null,
825
+ "max_width": null,
826
+ "min_height": null,
827
+ "min_width": null,
828
+ "object_fit": null,
829
+ "object_position": null,
830
+ "order": null,
831
+ "overflow": null,
832
+ "overflow_x": null,
833
+ "overflow_y": null,
834
+ "padding": null,
835
+ "right": null,
836
+ "top": null,
837
+ "visibility": null,
838
+ "width": null
839
+ }
840
+ },
841
+ "9f33f8f425dd474594ee9e2eafbbc815": {
842
+ "model_module": "@jupyter-widgets/base",
843
+ "model_name": "LayoutModel",
844
+ "model_module_version": "1.2.0",
845
+ "state": {
846
+ "_model_module": "@jupyter-widgets/base",
847
+ "_model_module_version": "1.2.0",
848
+ "_model_name": "LayoutModel",
849
+ "_view_count": null,
850
+ "_view_module": "@jupyter-widgets/base",
851
+ "_view_module_version": "1.2.0",
852
+ "_view_name": "LayoutView",
853
+ "align_content": null,
854
+ "align_items": null,
855
+ "align_self": null,
856
+ "border": null,
857
+ "bottom": null,
858
+ "display": null,
859
+ "flex": null,
860
+ "flex_flow": null,
861
+ "grid_area": null,
862
+ "grid_auto_columns": null,
863
+ "grid_auto_flow": null,
864
+ "grid_auto_rows": null,
865
+ "grid_column": null,
866
+ "grid_gap": null,
867
+ "grid_row": null,
868
+ "grid_template_areas": null,
869
+ "grid_template_columns": null,
870
+ "grid_template_rows": null,
871
+ "height": null,
872
+ "justify_content": null,
873
+ "justify_items": null,
874
+ "left": null,
875
+ "margin": null,
876
+ "max_height": null,
877
+ "max_width": null,
878
+ "min_height": null,
879
+ "min_width": null,
880
+ "object_fit": null,
881
+ "object_position": null,
882
+ "order": null,
883
+ "overflow": null,
884
+ "overflow_x": null,
885
+ "overflow_y": null,
886
+ "padding": null,
887
+ "right": null,
888
+ "top": null,
889
+ "visibility": null,
890
+ "width": null
891
+ }
892
+ },
893
+ "9b677f233cd84ba4bd3afe61190e1f49": {
894
+ "model_module": "@jupyter-widgets/controls",
895
+ "model_name": "DescriptionStyleModel",
896
+ "model_module_version": "1.5.0",
897
+ "state": {
898
+ "_model_module": "@jupyter-widgets/controls",
899
+ "_model_module_version": "1.5.0",
900
+ "_model_name": "DescriptionStyleModel",
901
+ "_view_count": null,
902
+ "_view_module": "@jupyter-widgets/base",
903
+ "_view_module_version": "1.2.0",
904
+ "_view_name": "StyleView",
905
+ "description_width": ""
906
+ }
907
+ },
908
+ "9d0feae1b964477283d0fc610bbc347c": {
909
+ "model_module": "@jupyter-widgets/base",
910
+ "model_name": "LayoutModel",
911
+ "model_module_version": "1.2.0",
912
+ "state": {
913
+ "_model_module": "@jupyter-widgets/base",
914
+ "_model_module_version": "1.2.0",
915
+ "_model_name": "LayoutModel",
916
+ "_view_count": null,
917
+ "_view_module": "@jupyter-widgets/base",
918
+ "_view_module_version": "1.2.0",
919
+ "_view_name": "LayoutView",
920
+ "align_content": null,
921
+ "align_items": null,
922
+ "align_self": null,
923
+ "border": null,
924
+ "bottom": null,
925
+ "display": null,
926
+ "flex": null,
927
+ "flex_flow": null,
928
+ "grid_area": null,
929
+ "grid_auto_columns": null,
930
+ "grid_auto_flow": null,
931
+ "grid_auto_rows": null,
932
+ "grid_column": null,
933
+ "grid_gap": null,
934
+ "grid_row": null,
935
+ "grid_template_areas": null,
936
+ "grid_template_columns": null,
937
+ "grid_template_rows": null,
938
+ "height": null,
939
+ "justify_content": null,
940
+ "justify_items": null,
941
+ "left": null,
942
+ "margin": null,
943
+ "max_height": null,
944
+ "max_width": null,
945
+ "min_height": null,
946
+ "min_width": null,
947
+ "object_fit": null,
948
+ "object_position": null,
949
+ "order": null,
950
+ "overflow": null,
951
+ "overflow_x": null,
952
+ "overflow_y": null,
953
+ "padding": null,
954
+ "right": null,
955
+ "top": null,
956
+ "visibility": null,
957
+ "width": null
958
+ }
959
+ },
960
+ "a50de7d14a734da283d7d640cb66f10e": {
961
+ "model_module": "@jupyter-widgets/controls",
962
+ "model_name": "ProgressStyleModel",
963
+ "model_module_version": "1.5.0",
964
+ "state": {
965
+ "_model_module": "@jupyter-widgets/controls",
966
+ "_model_module_version": "1.5.0",
967
+ "_model_name": "ProgressStyleModel",
968
+ "_view_count": null,
969
+ "_view_module": "@jupyter-widgets/base",
970
+ "_view_module_version": "1.2.0",
971
+ "_view_name": "StyleView",
972
+ "bar_color": null,
973
+ "description_width": ""
974
+ }
975
+ },
976
+ "caadefbbfde043838ab85ae5803d75dd": {
977
+ "model_module": "@jupyter-widgets/base",
978
+ "model_name": "LayoutModel",
979
+ "model_module_version": "1.2.0",
980
+ "state": {
981
+ "_model_module": "@jupyter-widgets/base",
982
+ "_model_module_version": "1.2.0",
983
+ "_model_name": "LayoutModel",
984
+ "_view_count": null,
985
+ "_view_module": "@jupyter-widgets/base",
986
+ "_view_module_version": "1.2.0",
987
+ "_view_name": "LayoutView",
988
+ "align_content": null,
989
+ "align_items": null,
990
+ "align_self": null,
991
+ "border": null,
992
+ "bottom": null,
993
+ "display": null,
994
+ "flex": null,
995
+ "flex_flow": null,
996
+ "grid_area": null,
997
+ "grid_auto_columns": null,
998
+ "grid_auto_flow": null,
999
+ "grid_auto_rows": null,
1000
+ "grid_column": null,
1001
+ "grid_gap": null,
1002
+ "grid_row": null,
1003
+ "grid_template_areas": null,
1004
+ "grid_template_columns": null,
1005
+ "grid_template_rows": null,
1006
+ "height": null,
1007
+ "justify_content": null,
1008
+ "justify_items": null,
1009
+ "left": null,
1010
+ "margin": null,
1011
+ "max_height": null,
1012
+ "max_width": null,
1013
+ "min_height": null,
1014
+ "min_width": null,
1015
+ "object_fit": null,
1016
+ "object_position": null,
1017
+ "order": null,
1018
+ "overflow": null,
1019
+ "overflow_x": null,
1020
+ "overflow_y": null,
1021
+ "padding": null,
1022
+ "right": null,
1023
+ "top": null,
1024
+ "visibility": null,
1025
+ "width": null
1026
+ }
1027
+ },
1028
+ "a93a6fc08ab340f5b5e2bf0d216ebb58": {
1029
+ "model_module": "@jupyter-widgets/controls",
1030
+ "model_name": "DescriptionStyleModel",
1031
+ "model_module_version": "1.5.0",
1032
+ "state": {
1033
+ "_model_module": "@jupyter-widgets/controls",
1034
+ "_model_module_version": "1.5.0",
1035
+ "_model_name": "DescriptionStyleModel",
1036
+ "_view_count": null,
1037
+ "_view_module": "@jupyter-widgets/base",
1038
+ "_view_module_version": "1.2.0",
1039
+ "_view_name": "StyleView",
1040
+ "description_width": ""
1041
+ }
1042
+ },
1043
+ "e91997d6840d4d418abe7360591b85d3": {
1044
+ "model_module": "@jupyter-widgets/controls",
1045
+ "model_name": "HBoxModel",
1046
+ "model_module_version": "1.5.0",
1047
+ "state": {
1048
+ "_dom_classes": [],
1049
+ "_model_module": "@jupyter-widgets/controls",
1050
+ "_model_module_version": "1.5.0",
1051
+ "_model_name": "HBoxModel",
1052
+ "_view_count": null,
1053
+ "_view_module": "@jupyter-widgets/controls",
1054
+ "_view_module_version": "1.5.0",
1055
+ "_view_name": "HBoxView",
1056
+ "box_style": "",
1057
+ "children": [
1058
+ "IPY_MODEL_f3e81276e34c472a93f4082a0a4cf40b",
1059
+ "IPY_MODEL_c5a7d924c9454d1dbbea1e871b726304",
1060
+ "IPY_MODEL_7a82951125aa488699701536e5ec79aa"
1061
+ ],
1062
+ "layout": "IPY_MODEL_ef285b6d299a4c2c917dc21368781e2a"
1063
+ }
1064
+ },
1065
+ "f3e81276e34c472a93f4082a0a4cf40b": {
1066
+ "model_module": "@jupyter-widgets/controls",
1067
+ "model_name": "HTMLModel",
1068
+ "model_module_version": "1.5.0",
1069
+ "state": {
1070
+ "_dom_classes": [],
1071
+ "_model_module": "@jupyter-widgets/controls",
1072
+ "_model_module_version": "1.5.0",
1073
+ "_model_name": "HTMLModel",
1074
+ "_view_count": null,
1075
+ "_view_module": "@jupyter-widgets/controls",
1076
+ "_view_module_version": "1.5.0",
1077
+ "_view_name": "HTMLView",
1078
+ "description": "",
1079
+ "description_tooltip": null,
1080
+ "layout": "IPY_MODEL_b565b4084a5040c695f09724dae638d3",
1081
+ "placeholder": "​",
1082
+ "style": "IPY_MODEL_460d501977644071a6799ffcff1fb681",
1083
+ "value": "config.json: 100%"
1084
+ }
1085
+ },
1086
+ "c5a7d924c9454d1dbbea1e871b726304": {
1087
+ "model_module": "@jupyter-widgets/controls",
1088
+ "model_name": "FloatProgressModel",
1089
+ "model_module_version": "1.5.0",
1090
+ "state": {
1091
+ "_dom_classes": [],
1092
+ "_model_module": "@jupyter-widgets/controls",
1093
+ "_model_module_version": "1.5.0",
1094
+ "_model_name": "FloatProgressModel",
1095
+ "_view_count": null,
1096
+ "_view_module": "@jupyter-widgets/controls",
1097
+ "_view_module_version": "1.5.0",
1098
+ "_view_name": "ProgressView",
1099
+ "bar_style": "success",
1100
+ "description": "",
1101
+ "description_tooltip": null,
1102
+ "layout": "IPY_MODEL_fd211d5a988c4793b9e9d3ab35bc808b",
1103
+ "max": 570,
1104
+ "min": 0,
1105
+ "orientation": "horizontal",
1106
+ "style": "IPY_MODEL_8217b519e3b8469997cdc9746b0c5701",
1107
+ "value": 570
1108
+ }
1109
+ },
1110
+ "7a82951125aa488699701536e5ec79aa": {
1111
+ "model_module": "@jupyter-widgets/controls",
1112
+ "model_name": "HTMLModel",
1113
+ "model_module_version": "1.5.0",
1114
+ "state": {
1115
+ "_dom_classes": [],
1116
+ "_model_module": "@jupyter-widgets/controls",
1117
+ "_model_module_version": "1.5.0",
1118
+ "_model_name": "HTMLModel",
1119
+ "_view_count": null,
1120
+ "_view_module": "@jupyter-widgets/controls",
1121
+ "_view_module_version": "1.5.0",
1122
+ "_view_name": "HTMLView",
1123
+ "description": "",
1124
+ "description_tooltip": null,
1125
+ "layout": "IPY_MODEL_ceed087de35a40f182abfe3d5e067395",
1126
+ "placeholder": "​",
1127
+ "style": "IPY_MODEL_a42e41fa377c49ba9bf79ba1bc2c97b6",
1128
+ "value": " 570/570 [00:00<00:00, 32.8kB/s]"
1129
+ }
1130
+ },
1131
+ "ef285b6d299a4c2c917dc21368781e2a": {
1132
+ "model_module": "@jupyter-widgets/base",
1133
+ "model_name": "LayoutModel",
1134
+ "model_module_version": "1.2.0",
1135
+ "state": {
1136
+ "_model_module": "@jupyter-widgets/base",
1137
+ "_model_module_version": "1.2.0",
1138
+ "_model_name": "LayoutModel",
1139
+ "_view_count": null,
1140
+ "_view_module": "@jupyter-widgets/base",
1141
+ "_view_module_version": "1.2.0",
1142
+ "_view_name": "LayoutView",
1143
+ "align_content": null,
1144
+ "align_items": null,
1145
+ "align_self": null,
1146
+ "border": null,
1147
+ "bottom": null,
1148
+ "display": null,
1149
+ "flex": null,
1150
+ "flex_flow": null,
1151
+ "grid_area": null,
1152
+ "grid_auto_columns": null,
1153
+ "grid_auto_flow": null,
1154
+ "grid_auto_rows": null,
1155
+ "grid_column": null,
1156
+ "grid_gap": null,
1157
+ "grid_row": null,
1158
+ "grid_template_areas": null,
1159
+ "grid_template_columns": null,
1160
+ "grid_template_rows": null,
1161
+ "height": null,
1162
+ "justify_content": null,
1163
+ "justify_items": null,
1164
+ "left": null,
1165
+ "margin": null,
1166
+ "max_height": null,
1167
+ "max_width": null,
1168
+ "min_height": null,
1169
+ "min_width": null,
1170
+ "object_fit": null,
1171
+ "object_position": null,
1172
+ "order": null,
1173
+ "overflow": null,
1174
+ "overflow_x": null,
1175
+ "overflow_y": null,
1176
+ "padding": null,
1177
+ "right": null,
1178
+ "top": null,
1179
+ "visibility": null,
1180
+ "width": null
1181
+ }
1182
+ },
1183
+ "b565b4084a5040c695f09724dae638d3": {
1184
+ "model_module": "@jupyter-widgets/base",
1185
+ "model_name": "LayoutModel",
1186
+ "model_module_version": "1.2.0",
1187
+ "state": {
1188
+ "_model_module": "@jupyter-widgets/base",
1189
+ "_model_module_version": "1.2.0",
1190
+ "_model_name": "LayoutModel",
1191
+ "_view_count": null,
1192
+ "_view_module": "@jupyter-widgets/base",
1193
+ "_view_module_version": "1.2.0",
1194
+ "_view_name": "LayoutView",
1195
+ "align_content": null,
1196
+ "align_items": null,
1197
+ "align_self": null,
1198
+ "border": null,
1199
+ "bottom": null,
1200
+ "display": null,
1201
+ "flex": null,
1202
+ "flex_flow": null,
1203
+ "grid_area": null,
1204
+ "grid_auto_columns": null,
1205
+ "grid_auto_flow": null,
1206
+ "grid_auto_rows": null,
1207
+ "grid_column": null,
1208
+ "grid_gap": null,
1209
+ "grid_row": null,
1210
+ "grid_template_areas": null,
1211
+ "grid_template_columns": null,
1212
+ "grid_template_rows": null,
1213
+ "height": null,
1214
+ "justify_content": null,
1215
+ "justify_items": null,
1216
+ "left": null,
1217
+ "margin": null,
1218
+ "max_height": null,
1219
+ "max_width": null,
1220
+ "min_height": null,
1221
+ "min_width": null,
1222
+ "object_fit": null,
1223
+ "object_position": null,
1224
+ "order": null,
1225
+ "overflow": null,
1226
+ "overflow_x": null,
1227
+ "overflow_y": null,
1228
+ "padding": null,
1229
+ "right": null,
1230
+ "top": null,
1231
+ "visibility": null,
1232
+ "width": null
1233
+ }
1234
+ },
1235
+ "460d501977644071a6799ffcff1fb681": {
1236
+ "model_module": "@jupyter-widgets/controls",
1237
+ "model_name": "DescriptionStyleModel",
1238
+ "model_module_version": "1.5.0",
1239
+ "state": {
1240
+ "_model_module": "@jupyter-widgets/controls",
1241
+ "_model_module_version": "1.5.0",
1242
+ "_model_name": "DescriptionStyleModel",
1243
+ "_view_count": null,
1244
+ "_view_module": "@jupyter-widgets/base",
1245
+ "_view_module_version": "1.2.0",
1246
+ "_view_name": "StyleView",
1247
+ "description_width": ""
1248
+ }
1249
+ },
1250
+ "fd211d5a988c4793b9e9d3ab35bc808b": {
1251
+ "model_module": "@jupyter-widgets/base",
1252
+ "model_name": "LayoutModel",
1253
+ "model_module_version": "1.2.0",
1254
+ "state": {
1255
+ "_model_module": "@jupyter-widgets/base",
1256
+ "_model_module_version": "1.2.0",
1257
+ "_model_name": "LayoutModel",
1258
+ "_view_count": null,
1259
+ "_view_module": "@jupyter-widgets/base",
1260
+ "_view_module_version": "1.2.0",
1261
+ "_view_name": "LayoutView",
1262
+ "align_content": null,
1263
+ "align_items": null,
1264
+ "align_self": null,
1265
+ "border": null,
1266
+ "bottom": null,
1267
+ "display": null,
1268
+ "flex": null,
1269
+ "flex_flow": null,
1270
+ "grid_area": null,
1271
+ "grid_auto_columns": null,
1272
+ "grid_auto_flow": null,
1273
+ "grid_auto_rows": null,
1274
+ "grid_column": null,
1275
+ "grid_gap": null,
1276
+ "grid_row": null,
1277
+ "grid_template_areas": null,
1278
+ "grid_template_columns": null,
1279
+ "grid_template_rows": null,
1280
+ "height": null,
1281
+ "justify_content": null,
1282
+ "justify_items": null,
1283
+ "left": null,
1284
+ "margin": null,
1285
+ "max_height": null,
1286
+ "max_width": null,
1287
+ "min_height": null,
1288
+ "min_width": null,
1289
+ "object_fit": null,
1290
+ "object_position": null,
1291
+ "order": null,
1292
+ "overflow": null,
1293
+ "overflow_x": null,
1294
+ "overflow_y": null,
1295
+ "padding": null,
1296
+ "right": null,
1297
+ "top": null,
1298
+ "visibility": null,
1299
+ "width": null
1300
+ }
1301
+ },
1302
+ "8217b519e3b8469997cdc9746b0c5701": {
1303
+ "model_module": "@jupyter-widgets/controls",
1304
+ "model_name": "ProgressStyleModel",
1305
+ "model_module_version": "1.5.0",
1306
+ "state": {
1307
+ "_model_module": "@jupyter-widgets/controls",
1308
+ "_model_module_version": "1.5.0",
1309
+ "_model_name": "ProgressStyleModel",
1310
+ "_view_count": null,
1311
+ "_view_module": "@jupyter-widgets/base",
1312
+ "_view_module_version": "1.2.0",
1313
+ "_view_name": "StyleView",
1314
+ "bar_color": null,
1315
+ "description_width": ""
1316
+ }
1317
+ },
1318
+ "ceed087de35a40f182abfe3d5e067395": {
1319
+ "model_module": "@jupyter-widgets/base",
1320
+ "model_name": "LayoutModel",
1321
+ "model_module_version": "1.2.0",
1322
+ "state": {
1323
+ "_model_module": "@jupyter-widgets/base",
1324
+ "_model_module_version": "1.2.0",
1325
+ "_model_name": "LayoutModel",
1326
+ "_view_count": null,
1327
+ "_view_module": "@jupyter-widgets/base",
1328
+ "_view_module_version": "1.2.0",
1329
+ "_view_name": "LayoutView",
1330
+ "align_content": null,
1331
+ "align_items": null,
1332
+ "align_self": null,
1333
+ "border": null,
1334
+ "bottom": null,
1335
+ "display": null,
1336
+ "flex": null,
1337
+ "flex_flow": null,
1338
+ "grid_area": null,
1339
+ "grid_auto_columns": null,
1340
+ "grid_auto_flow": null,
1341
+ "grid_auto_rows": null,
1342
+ "grid_column": null,
1343
+ "grid_gap": null,
1344
+ "grid_row": null,
1345
+ "grid_template_areas": null,
1346
+ "grid_template_columns": null,
1347
+ "grid_template_rows": null,
1348
+ "height": null,
1349
+ "justify_content": null,
1350
+ "justify_items": null,
1351
+ "left": null,
1352
+ "margin": null,
1353
+ "max_height": null,
1354
+ "max_width": null,
1355
+ "min_height": null,
1356
+ "min_width": null,
1357
+ "object_fit": null,
1358
+ "object_position": null,
1359
+ "order": null,
1360
+ "overflow": null,
1361
+ "overflow_x": null,
1362
+ "overflow_y": null,
1363
+ "padding": null,
1364
+ "right": null,
1365
+ "top": null,
1366
+ "visibility": null,
1367
+ "width": null
1368
+ }
1369
+ },
1370
+ "a42e41fa377c49ba9bf79ba1bc2c97b6": {
1371
+ "model_module": "@jupyter-widgets/controls",
1372
+ "model_name": "DescriptionStyleModel",
1373
+ "model_module_version": "1.5.0",
1374
+ "state": {
1375
+ "_model_module": "@jupyter-widgets/controls",
1376
+ "_model_module_version": "1.5.0",
1377
+ "_model_name": "DescriptionStyleModel",
1378
+ "_view_count": null,
1379
+ "_view_module": "@jupyter-widgets/base",
1380
+ "_view_module_version": "1.2.0",
1381
+ "_view_name": "StyleView",
1382
+ "description_width": ""
1383
+ }
1384
+ },
1385
+ "532e8a53c3034fbf8bff74ade2735a09": {
1386
+ "model_module": "@jupyter-widgets/controls",
1387
+ "model_name": "HBoxModel",
1388
+ "model_module_version": "1.5.0",
1389
+ "state": {
1390
+ "_dom_classes": [],
1391
+ "_model_module": "@jupyter-widgets/controls",
1392
+ "_model_module_version": "1.5.0",
1393
+ "_model_name": "HBoxModel",
1394
+ "_view_count": null,
1395
+ "_view_module": "@jupyter-widgets/controls",
1396
+ "_view_module_version": "1.5.0",
1397
+ "_view_name": "HBoxView",
1398
+ "box_style": "",
1399
+ "children": [
1400
+ "IPY_MODEL_ccb24460a8904e068420d793de8c189a",
1401
+ "IPY_MODEL_fce108786e0746b2b63d0dca8e4f621a",
1402
+ "IPY_MODEL_d06bac10f54a4e58961a7cf803bafbb3"
1403
+ ],
1404
+ "layout": "IPY_MODEL_726ea14f0b85482580d4e4e429eabe95"
1405
+ }
1406
+ },
1407
+ "ccb24460a8904e068420d793de8c189a": {
1408
+ "model_module": "@jupyter-widgets/controls",
1409
+ "model_name": "HTMLModel",
1410
+ "model_module_version": "1.5.0",
1411
+ "state": {
1412
+ "_dom_classes": [],
1413
+ "_model_module": "@jupyter-widgets/controls",
1414
+ "_model_module_version": "1.5.0",
1415
+ "_model_name": "HTMLModel",
1416
+ "_view_count": null,
1417
+ "_view_module": "@jupyter-widgets/controls",
1418
+ "_view_module_version": "1.5.0",
1419
+ "_view_name": "HTMLView",
1420
+ "description": "",
1421
+ "description_tooltip": null,
1422
+ "layout": "IPY_MODEL_4a1efe610d4a441591a939ea2f04892c",
1423
+ "placeholder": "​",
1424
+ "style": "IPY_MODEL_5917d8cacc0a4a04a4f174cad6fc2c6e",
1425
+ "value": "model.safetensors: 100%"
1426
+ }
1427
+ },
1428
+ "fce108786e0746b2b63d0dca8e4f621a": {
1429
+ "model_module": "@jupyter-widgets/controls",
1430
+ "model_name": "FloatProgressModel",
1431
+ "model_module_version": "1.5.0",
1432
+ "state": {
1433
+ "_dom_classes": [],
1434
+ "_model_module": "@jupyter-widgets/controls",
1435
+ "_model_module_version": "1.5.0",
1436
+ "_model_name": "FloatProgressModel",
1437
+ "_view_count": null,
1438
+ "_view_module": "@jupyter-widgets/controls",
1439
+ "_view_module_version": "1.5.0",
1440
+ "_view_name": "ProgressView",
1441
+ "bar_style": "success",
1442
+ "description": "",
1443
+ "description_tooltip": null,
1444
+ "layout": "IPY_MODEL_e69e2012919547ef931f240217ebf9de",
1445
+ "max": 440449768,
1446
+ "min": 0,
1447
+ "orientation": "horizontal",
1448
+ "style": "IPY_MODEL_1f5bba1e68e7409199bff8c891f09198",
1449
+ "value": 440449768
1450
+ }
1451
+ },
1452
+ "d06bac10f54a4e58961a7cf803bafbb3": {
1453
+ "model_module": "@jupyter-widgets/controls",
1454
+ "model_name": "HTMLModel",
1455
+ "model_module_version": "1.5.0",
1456
+ "state": {
1457
+ "_dom_classes": [],
1458
+ "_model_module": "@jupyter-widgets/controls",
1459
+ "_model_module_version": "1.5.0",
1460
+ "_model_name": "HTMLModel",
1461
+ "_view_count": null,
1462
+ "_view_module": "@jupyter-widgets/controls",
1463
+ "_view_module_version": "1.5.0",
1464
+ "_view_name": "HTMLView",
1465
+ "description": "",
1466
+ "description_tooltip": null,
1467
+ "layout": "IPY_MODEL_f23222411b9b446caeb1d7232a8d5167",
1468
+ "placeholder": "​",
1469
+ "style": "IPY_MODEL_906298a990754176b6c7fae7a8f9d468",
1470
+ "value": " 440M/440M [00:02<00:00, 246MB/s]"
1471
+ }
1472
+ },
1473
+ "726ea14f0b85482580d4e4e429eabe95": {
1474
+ "model_module": "@jupyter-widgets/base",
1475
+ "model_name": "LayoutModel",
1476
+ "model_module_version": "1.2.0",
1477
+ "state": {
1478
+ "_model_module": "@jupyter-widgets/base",
1479
+ "_model_module_version": "1.2.0",
1480
+ "_model_name": "LayoutModel",
1481
+ "_view_count": null,
1482
+ "_view_module": "@jupyter-widgets/base",
1483
+ "_view_module_version": "1.2.0",
1484
+ "_view_name": "LayoutView",
1485
+ "align_content": null,
1486
+ "align_items": null,
1487
+ "align_self": null,
1488
+ "border": null,
1489
+ "bottom": null,
1490
+ "display": null,
1491
+ "flex": null,
1492
+ "flex_flow": null,
1493
+ "grid_area": null,
1494
+ "grid_auto_columns": null,
1495
+ "grid_auto_flow": null,
1496
+ "grid_auto_rows": null,
1497
+ "grid_column": null,
1498
+ "grid_gap": null,
1499
+ "grid_row": null,
1500
+ "grid_template_areas": null,
1501
+ "grid_template_columns": null,
1502
+ "grid_template_rows": null,
1503
+ "height": null,
1504
+ "justify_content": null,
1505
+ "justify_items": null,
1506
+ "left": null,
1507
+ "margin": null,
1508
+ "max_height": null,
1509
+ "max_width": null,
1510
+ "min_height": null,
1511
+ "min_width": null,
1512
+ "object_fit": null,
1513
+ "object_position": null,
1514
+ "order": null,
1515
+ "overflow": null,
1516
+ "overflow_x": null,
1517
+ "overflow_y": null,
1518
+ "padding": null,
1519
+ "right": null,
1520
+ "top": null,
1521
+ "visibility": null,
1522
+ "width": null
1523
+ }
1524
+ },
1525
+ "4a1efe610d4a441591a939ea2f04892c": {
1526
+ "model_module": "@jupyter-widgets/base",
1527
+ "model_name": "LayoutModel",
1528
+ "model_module_version": "1.2.0",
1529
+ "state": {
1530
+ "_model_module": "@jupyter-widgets/base",
1531
+ "_model_module_version": "1.2.0",
1532
+ "_model_name": "LayoutModel",
1533
+ "_view_count": null,
1534
+ "_view_module": "@jupyter-widgets/base",
1535
+ "_view_module_version": "1.2.0",
1536
+ "_view_name": "LayoutView",
1537
+ "align_content": null,
1538
+ "align_items": null,
1539
+ "align_self": null,
1540
+ "border": null,
1541
+ "bottom": null,
1542
+ "display": null,
1543
+ "flex": null,
1544
+ "flex_flow": null,
1545
+ "grid_area": null,
1546
+ "grid_auto_columns": null,
1547
+ "grid_auto_flow": null,
1548
+ "grid_auto_rows": null,
1549
+ "grid_column": null,
1550
+ "grid_gap": null,
1551
+ "grid_row": null,
1552
+ "grid_template_areas": null,
1553
+ "grid_template_columns": null,
1554
+ "grid_template_rows": null,
1555
+ "height": null,
1556
+ "justify_content": null,
1557
+ "justify_items": null,
1558
+ "left": null,
1559
+ "margin": null,
1560
+ "max_height": null,
1561
+ "max_width": null,
1562
+ "min_height": null,
1563
+ "min_width": null,
1564
+ "object_fit": null,
1565
+ "object_position": null,
1566
+ "order": null,
1567
+ "overflow": null,
1568
+ "overflow_x": null,
1569
+ "overflow_y": null,
1570
+ "padding": null,
1571
+ "right": null,
1572
+ "top": null,
1573
+ "visibility": null,
1574
+ "width": null
1575
+ }
1576
+ },
1577
+ "5917d8cacc0a4a04a4f174cad6fc2c6e": {
1578
+ "model_module": "@jupyter-widgets/controls",
1579
+ "model_name": "DescriptionStyleModel",
1580
+ "model_module_version": "1.5.0",
1581
+ "state": {
1582
+ "_model_module": "@jupyter-widgets/controls",
1583
+ "_model_module_version": "1.5.0",
1584
+ "_model_name": "DescriptionStyleModel",
1585
+ "_view_count": null,
1586
+ "_view_module": "@jupyter-widgets/base",
1587
+ "_view_module_version": "1.2.0",
1588
+ "_view_name": "StyleView",
1589
+ "description_width": ""
1590
+ }
1591
+ },
1592
+ "e69e2012919547ef931f240217ebf9de": {
1593
+ "model_module": "@jupyter-widgets/base",
1594
+ "model_name": "LayoutModel",
1595
+ "model_module_version": "1.2.0",
1596
+ "state": {
1597
+ "_model_module": "@jupyter-widgets/base",
1598
+ "_model_module_version": "1.2.0",
1599
+ "_model_name": "LayoutModel",
1600
+ "_view_count": null,
1601
+ "_view_module": "@jupyter-widgets/base",
1602
+ "_view_module_version": "1.2.0",
1603
+ "_view_name": "LayoutView",
1604
+ "align_content": null,
1605
+ "align_items": null,
1606
+ "align_self": null,
1607
+ "border": null,
1608
+ "bottom": null,
1609
+ "display": null,
1610
+ "flex": null,
1611
+ "flex_flow": null,
1612
+ "grid_area": null,
1613
+ "grid_auto_columns": null,
1614
+ "grid_auto_flow": null,
1615
+ "grid_auto_rows": null,
1616
+ "grid_column": null,
1617
+ "grid_gap": null,
1618
+ "grid_row": null,
1619
+ "grid_template_areas": null,
1620
+ "grid_template_columns": null,
1621
+ "grid_template_rows": null,
1622
+ "height": null,
1623
+ "justify_content": null,
1624
+ "justify_items": null,
1625
+ "left": null,
1626
+ "margin": null,
1627
+ "max_height": null,
1628
+ "max_width": null,
1629
+ "min_height": null,
1630
+ "min_width": null,
1631
+ "object_fit": null,
1632
+ "object_position": null,
1633
+ "order": null,
1634
+ "overflow": null,
1635
+ "overflow_x": null,
1636
+ "overflow_y": null,
1637
+ "padding": null,
1638
+ "right": null,
1639
+ "top": null,
1640
+ "visibility": null,
1641
+ "width": null
1642
+ }
1643
+ },
1644
+ "1f5bba1e68e7409199bff8c891f09198": {
1645
+ "model_module": "@jupyter-widgets/controls",
1646
+ "model_name": "ProgressStyleModel",
1647
+ "model_module_version": "1.5.0",
1648
+ "state": {
1649
+ "_model_module": "@jupyter-widgets/controls",
1650
+ "_model_module_version": "1.5.0",
1651
+ "_model_name": "ProgressStyleModel",
1652
+ "_view_count": null,
1653
+ "_view_module": "@jupyter-widgets/base",
1654
+ "_view_module_version": "1.2.0",
1655
+ "_view_name": "StyleView",
1656
+ "bar_color": null,
1657
+ "description_width": ""
1658
+ }
1659
+ },
1660
+ "f23222411b9b446caeb1d7232a8d5167": {
1661
+ "model_module": "@jupyter-widgets/base",
1662
+ "model_name": "LayoutModel",
1663
+ "model_module_version": "1.2.0",
1664
+ "state": {
1665
+ "_model_module": "@jupyter-widgets/base",
1666
+ "_model_module_version": "1.2.0",
1667
+ "_model_name": "LayoutModel",
1668
+ "_view_count": null,
1669
+ "_view_module": "@jupyter-widgets/base",
1670
+ "_view_module_version": "1.2.0",
1671
+ "_view_name": "LayoutView",
1672
+ "align_content": null,
1673
+ "align_items": null,
1674
+ "align_self": null,
1675
+ "border": null,
1676
+ "bottom": null,
1677
+ "display": null,
1678
+ "flex": null,
1679
+ "flex_flow": null,
1680
+ "grid_area": null,
1681
+ "grid_auto_columns": null,
1682
+ "grid_auto_flow": null,
1683
+ "grid_auto_rows": null,
1684
+ "grid_column": null,
1685
+ "grid_gap": null,
1686
+ "grid_row": null,
1687
+ "grid_template_areas": null,
1688
+ "grid_template_columns": null,
1689
+ "grid_template_rows": null,
1690
+ "height": null,
1691
+ "justify_content": null,
1692
+ "justify_items": null,
1693
+ "left": null,
1694
+ "margin": null,
1695
+ "max_height": null,
1696
+ "max_width": null,
1697
+ "min_height": null,
1698
+ "min_width": null,
1699
+ "object_fit": null,
1700
+ "object_position": null,
1701
+ "order": null,
1702
+ "overflow": null,
1703
+ "overflow_x": null,
1704
+ "overflow_y": null,
1705
+ "padding": null,
1706
+ "right": null,
1707
+ "top": null,
1708
+ "visibility": null,
1709
+ "width": null
1710
+ }
1711
+ },
1712
+ "906298a990754176b6c7fae7a8f9d468": {
1713
+ "model_module": "@jupyter-widgets/controls",
1714
+ "model_name": "DescriptionStyleModel",
1715
+ "model_module_version": "1.5.0",
1716
+ "state": {
1717
+ "_model_module": "@jupyter-widgets/controls",
1718
+ "_model_module_version": "1.5.0",
1719
+ "_model_name": "DescriptionStyleModel",
1720
+ "_view_count": null,
1721
+ "_view_module": "@jupyter-widgets/base",
1722
+ "_view_module_version": "1.2.0",
1723
+ "_view_name": "StyleView",
1724
+ "description_width": ""
1725
+ }
1726
+ }
1727
+ }
1728
+ }
1729
+ },
1730
+ "cells": [
1731
+ {
1732
+ "cell_type": "markdown",
1733
+ "source": [
1734
+ "#Problem Statement\n",
1735
+ "**The goal is to automatically tag and analyze tweets for entities like people, companies, locations, and more, without relying on hashtags. Named Entity Recognition (NER) will identify and classify these entities. This project could enhance social media analysis, targeted marketing, and trend tracking.**\n",
1736
+ "\n",
1737
+ "#Applications\n",
1738
+ "- **Social Media Monitoring: Analyze trending topics and public sentiment.**\n",
1739
+ "- **Targeted Advertising: Identify key topics for better ad targeting.**\n",
1740
+ "- **Trend Detection: Recognize shifts in interest around entities, like companies or locations.**"
1741
+ ],
1742
+ "metadata": {
1743
+ "id": "kArLsCUJfp2W"
1744
+ }
1745
+ },
1746
+ {
1747
+ "cell_type": "markdown",
1748
+ "source": [
1749
+ "# Import Libraries and Download Data"
1750
+ ],
1751
+ "metadata": {
1752
+ "id": "WwZnZunUgCo6"
1753
+ }
1754
+ },
1755
+ {
1756
+ "cell_type": "code",
1757
+ "source": [
1758
+ "import pandas as pd\n",
1759
+ "import numpy as np\n",
1760
+ "import torch\n",
1761
+ "from transformers import BertTokenizer, TFBertForTokenClassification\n",
1762
+ "from sklearn.metrics import accuracy_score, classification_report, confusion_matrix\n",
1763
+ "from sklearn.model_selection import train_test_split\n",
1764
+ "import gdown\n",
1765
+ "\n",
1766
+ "# Download dataset from Google Drive folder link\n",
1767
+ "url = 'https://drive.google.com/drive/folders/14IgdWzzpjp166rhNhp9UFenjUp_czaGo?usp=share_link'\n",
1768
+ "gdown.download_folder(url, quiet=True)"
1769
+ ],
1770
+ "metadata": {
1771
+ "colab": {
1772
+ "base_uri": "https://localhost:8080/"
1773
+ },
1774
+ "id": "K3gCb47re60Q",
1775
+ "outputId": "c26cea26-8f85-44c9-b88a-0832e3cc46a7"
1776
+ },
1777
+ "execution_count": null,
1778
+ "outputs": [
1779
+ {
1780
+ "output_type": "execute_result",
1781
+ "data": {
1782
+ "text/plain": [
1783
+ "['/content/Datasets/wnut 16.txt.conll',\n",
1784
+ " '/content/Datasets/wnut 16test.txt.conll']"
1785
+ ]
1786
+ },
1787
+ "metadata": {},
1788
+ "execution_count": 1
1789
+ }
1790
+ ]
1791
+ },
1792
+ {
1793
+ "cell_type": "markdown",
1794
+ "source": [
1795
+ "# Data Loading and Exploration\n",
1796
+ "**Load the CoNLL-format data file, where each word is labeled line by line. Sentences are separated by empty lines.**"
1797
+ ],
1798
+ "metadata": {
1799
+ "id": "U8DQ9w8pgJ-c"
1800
+ }
1801
+ },
1802
+ {
1803
+ "cell_type": "code",
1804
+ "source": [
1805
+ "def load_data(file_path):\n",
1806
+ " sentences = []\n",
1807
+ " labels = []\n",
1808
+ " sentence = []\n",
1809
+ " label = []\n",
1810
+ " with open(file_path, 'r') as file:\n",
1811
+ " for line in file:\n",
1812
+ " if line.strip(): # Non-empty line\n",
1813
+ " word, tag = line.strip().split()\n",
1814
+ " sentence.append(word)\n",
1815
+ " label.append(tag)\n",
1816
+ " else: # Empty line indicates end of a sentence\n",
1817
+ " sentences.append(sentence)\n",
1818
+ " labels.append(label)\n",
1819
+ " sentence = []\n",
1820
+ " label = []\n",
1821
+ " # Append the last sentence if the file doesn’t end with a blank line\n",
1822
+ " if sentence:\n",
1823
+ " sentences.append(sentence)\n",
1824
+ " labels.append(label)\n",
1825
+ " return sentences, labels\n",
1826
+ "\n",
1827
+ "train_file_path = '/content/wnut 16.txt.conll'\n",
1828
+ "test_file_path = '/content/wnut 16test.txt.conll'\n",
1829
+ "train_sentences, train_labels = load_data(train_file_path)\n",
1830
+ "test_sentences, test_labels = load_data(test_file_path)\n"
1831
+ ],
1832
+ "metadata": {
1833
+ "id": "ObuxjRf-esiV"
1834
+ },
1835
+ "execution_count": null,
1836
+ "outputs": []
1837
+ },
1838
+ {
1839
+ "cell_type": "markdown",
1840
+ "source": [
1841
+ "# Exploratory Data Analysis (EDA)\n",
1842
+ "\n",
1843
+ "1. **Checking the structure of the data**\n",
1844
+ "\n",
1845
+ "Print a few sample sentences and labels to understand the structure"
1846
+ ],
1847
+ "metadata": {
1848
+ "id": "Rs4P-JCqgUbI"
1849
+ }
1850
+ },
1851
+ {
1852
+ "cell_type": "code",
1853
+ "source": [
1854
+ "print(\"Sample sentence:\", train_sentences[0])\n",
1855
+ "print(\"Sample labels:\", train_labels[0])"
1856
+ ],
1857
+ "metadata": {
1858
+ "id": "o1cIpQf0esez",
1859
+ "outputId": "73055cfc-73a3-4a14-9af4-a6d50ccc54e4",
1860
+ "colab": {
1861
+ "base_uri": "https://localhost:8080/"
1862
+ }
1863
+ },
1864
+ "execution_count": null,
1865
+ "outputs": [
1866
+ {
1867
+ "output_type": "stream",
1868
+ "name": "stdout",
1869
+ "text": [
1870
+ "Sample sentence: ['@SammieLynnsMom', '@tg10781', 'they', 'will', 'be', 'all', 'done', 'by', 'Sunday', 'trust', 'me', '*wink*']\n",
1871
+ "Sample labels: ['O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'O']\n"
1872
+ ]
1873
+ }
1874
+ ]
1875
+ },
1876
+ {
1877
+ "cell_type": "code",
1878
+ "source": [
1879
+ "# Check unique labels\n",
1880
+ "unique_labels = set(label for labels in train_labels for label in labels)\n",
1881
+ "print(\"Unique labels:\", unique_labels)"
1882
+ ],
1883
+ "metadata": {
1884
+ "id": "OjLxXt99escy",
1885
+ "outputId": "01ca4f72-41fa-4486-b157-0c51a64922d5",
1886
+ "colab": {
1887
+ "base_uri": "https://localhost:8080/"
1888
+ }
1889
+ },
1890
+ "execution_count": null,
1891
+ "outputs": [
1892
+ {
1893
+ "output_type": "stream",
1894
+ "name": "stdout",
1895
+ "text": [
1896
+ "Unique labels: {'I-facility', 'I-person', 'B-sportsteam', 'B-other', 'B-product', 'B-facility', 'B-geo-loc', 'O', 'B-musicartist', 'I-movie', 'I-musicartist', 'I-company', 'I-product', 'I-geo-loc', 'B-tvshow', 'B-company', 'B-movie', 'B-person', 'I-tvshow', 'I-sportsteam', 'I-other'}\n"
1897
+ ]
1898
+ }
1899
+ ]
1900
+ },
1901
+ {
1902
+ "cell_type": "markdown",
1903
+ "source": [
1904
+ "**2. Summary Statistics**\n",
1905
+ "\n",
1906
+ "Calculate basic statistics like the average sentence length and label distribution."
1907
+ ],
1908
+ "metadata": {
1909
+ "id": "3jdiK2M5gwUc"
1910
+ }
1911
+ },
1912
+ {
1913
+ "cell_type": "code",
1914
+ "source": [
1915
+ "sentence_lengths = [len(sentence) for sentence in train_sentences]\n",
1916
+ "print(\"Average sentence length:\", np.mean(sentence_lengths))\n",
1917
+ "print(\"Label distribution:\", pd.Series([lbl for labels in train_labels for lbl in labels]).value_counts())\n"
1918
+ ],
1919
+ "metadata": {
1920
+ "id": "KA9WSmajgr2P",
1921
+ "outputId": "77979eb0-54f5-4de4-9acb-e2c6ae9b4d90",
1922
+ "colab": {
1923
+ "base_uri": "https://localhost:8080/"
1924
+ }
1925
+ },
1926
+ "execution_count": null,
1927
+ "outputs": [
1928
+ {
1929
+ "output_type": "stream",
1930
+ "name": "stdout",
1931
+ "text": [
1932
+ "Average sentence length: 19.41060985797828\n",
1933
+ "Label distribution: O 44007\n",
1934
+ "B-person 449\n",
1935
+ "I-other 320\n",
1936
+ "B-geo-loc 276\n",
1937
+ "B-other 225\n",
1938
+ "I-person 215\n",
1939
+ "B-company 171\n",
1940
+ "I-facility 105\n",
1941
+ "B-facility 104\n",
1942
+ "B-product 97\n",
1943
+ "I-product 80\n",
1944
+ "I-musicartist 61\n",
1945
+ "B-musicartist 55\n",
1946
+ "B-sportsteam 51\n",
1947
+ "I-geo-loc 49\n",
1948
+ "I-movie 46\n",
1949
+ "I-company 36\n",
1950
+ "B-movie 34\n",
1951
+ "B-tvshow 34\n",
1952
+ "I-tvshow 31\n",
1953
+ "I-sportsteam 23\n",
1954
+ "Name: count, dtype: int64\n"
1955
+ ]
1956
+ }
1957
+ ]
1958
+ },
1959
+ {
1960
+ "cell_type": "markdown",
1961
+ "source": [
1962
+ "# Data Preprocessing\n"
1963
+ ],
1964
+ "metadata": {
1965
+ "id": "I5Lt4OmthS9k"
1966
+ }
1967
+ },
1968
+ {
1969
+ "cell_type": "code",
1970
+ "source": [
1971
+ "# Initialize tokenizer\n",
1972
+ "tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')"
1973
+ ],
1974
+ "metadata": {
1975
+ "id": "g0WOl51Bl-_b",
1976
+ "outputId": "c475d302-616f-45d7-f9a6-7234c97748ef",
1977
+ "colab": {
1978
+ "base_uri": "https://localhost:8080/",
1979
+ "height": 269,
1980
+ "referenced_widgets": [
1981
+ "ddefb3129871463c9c5ed9a3701bdaa3",
1982
+ "0b9c1ac1832c4adc84d8b0777bed779d",
1983
+ "be96b3ea50b14568a635ec2c2dbb54d1",
1984
+ "2521f37bd5ca4ca485407e2a4e48b74d",
1985
+ "8cae0d12ae6e4f5bb7aa3b7d02973b9f",
1986
+ "c530d758dc804f8389d55be661def1bd",
1987
+ "6c06b784368248cb95d529a2f381e61f",
1988
+ "c390d81abd054ad6aa561c181e5137a7",
1989
+ "bdfa68bfab2943079b550365125a371f",
1990
+ "3bc32ad1603043b7a5cc0d1a48ccd95f",
1991
+ "e293cb963b814885adda4c0adfeb2608",
1992
+ "a0725c2e950f42b291e89f9c05ec5a9b",
1993
+ "ae1374bdc51a49f1aae30c920ef51597",
1994
+ "1f765d6a82aa46cc9feb7192181384fb",
1995
+ "234bdb28557e45479683365647347ba7",
1996
+ "929e85dc4e4f4e69b54034baad90fddb",
1997
+ "a3827fe07a8941559d7561327acd2728",
1998
+ "ea6dcccdd28c440aa40f4b456665eeea",
1999
+ "d92445027c434585b08b0823d4f5caef",
2000
+ "2417e2ee32f8428a870b3a6aa655901e",
2001
+ "59c7ce3011e644d4b1ab0e7a253f2832",
2002
+ "505b6e76012c413aaadfc8d356f70106",
2003
+ "b9f13091017440fda5333457ed78e3af",
2004
+ "e9522478fcff46adb3e6d89a816570de",
2005
+ "fb1e4b52bb124c68859993b127830828",
2006
+ "609ec4e2fcab46ae98a69d29237344c0",
2007
+ "14d0c0e1fa884f9cba15fa842c96943b",
2008
+ "9f33f8f425dd474594ee9e2eafbbc815",
2009
+ "9b677f233cd84ba4bd3afe61190e1f49",
2010
+ "9d0feae1b964477283d0fc610bbc347c",
2011
+ "a50de7d14a734da283d7d640cb66f10e",
2012
+ "caadefbbfde043838ab85ae5803d75dd",
2013
+ "a93a6fc08ab340f5b5e2bf0d216ebb58",
2014
+ "e91997d6840d4d418abe7360591b85d3",
2015
+ "f3e81276e34c472a93f4082a0a4cf40b",
2016
+ "c5a7d924c9454d1dbbea1e871b726304",
2017
+ "7a82951125aa488699701536e5ec79aa",
2018
+ "ef285b6d299a4c2c917dc21368781e2a",
2019
+ "b565b4084a5040c695f09724dae638d3",
2020
+ "460d501977644071a6799ffcff1fb681",
2021
+ "fd211d5a988c4793b9e9d3ab35bc808b",
2022
+ "8217b519e3b8469997cdc9746b0c5701",
2023
+ "ceed087de35a40f182abfe3d5e067395",
2024
+ "a42e41fa377c49ba9bf79ba1bc2c97b6"
2025
+ ]
2026
+ }
2027
+ },
2028
+ "execution_count": null,
2029
+ "outputs": [
2030
+ {
2031
+ "output_type": "stream",
2032
+ "name": "stderr",
2033
+ "text": [
2034
+ "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
2035
+ "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
2036
+ "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
2037
+ "You will be able to reuse this secret in all of your notebooks.\n",
2038
+ "Please note that authentication is recommended but still optional to access public models or datasets.\n",
2039
+ " warnings.warn(\n"
2040
+ ]
2041
+ },
2042
+ {
2043
+ "output_type": "display_data",
2044
+ "data": {
2045
+ "text/plain": [
2046
+ "tokenizer_config.json: 0%| | 0.00/48.0 [00:00<?, ?B/s]"
2047
+ ],
2048
+ "application/vnd.jupyter.widget-view+json": {
2049
+ "version_major": 2,
2050
+ "version_minor": 0,
2051
+ "model_id": "ddefb3129871463c9c5ed9a3701bdaa3"
2052
+ }
2053
+ },
2054
+ "metadata": {}
2055
+ },
2056
+ {
2057
+ "output_type": "display_data",
2058
+ "data": {
2059
+ "text/plain": [
2060
+ "vocab.txt: 0%| | 0.00/232k [00:00<?, ?B/s]"
2061
+ ],
2062
+ "application/vnd.jupyter.widget-view+json": {
2063
+ "version_major": 2,
2064
+ "version_minor": 0,
2065
+ "model_id": "a0725c2e950f42b291e89f9c05ec5a9b"
2066
+ }
2067
+ },
2068
+ "metadata": {}
2069
+ },
2070
+ {
2071
+ "output_type": "display_data",
2072
+ "data": {
2073
+ "text/plain": [
2074
+ "tokenizer.json: 0%| | 0.00/466k [00:00<?, ?B/s]"
2075
+ ],
2076
+ "application/vnd.jupyter.widget-view+json": {
2077
+ "version_major": 2,
2078
+ "version_minor": 0,
2079
+ "model_id": "b9f13091017440fda5333457ed78e3af"
2080
+ }
2081
+ },
2082
+ "metadata": {}
2083
+ },
2084
+ {
2085
+ "output_type": "display_data",
2086
+ "data": {
2087
+ "text/plain": [
2088
+ "config.json: 0%| | 0.00/570 [00:00<?, ?B/s]"
2089
+ ],
2090
+ "application/vnd.jupyter.widget-view+json": {
2091
+ "version_major": 2,
2092
+ "version_minor": 0,
2093
+ "model_id": "e91997d6840d4d418abe7360591b85d3"
2094
+ }
2095
+ },
2096
+ "metadata": {}
2097
+ }
2098
+ ]
2099
+ },
2100
+ {
2101
+ "cell_type": "code",
2102
+ "source": [
2103
+ "# Convert labels to integers\n",
2104
+ "label_map = {label: i for i, label in enumerate(unique_labels)}\n",
2105
+ "num_labels = len(unique_labels)\n",
2106
+ "\n",
2107
+ "\n",
2108
+ "def encode_sentences(sentences, labels, tokenizer, max_length=128):\n",
2109
+ " input_ids = []\n",
2110
+ " attention_masks = []\n",
2111
+ " label_ids = []\n",
2112
+ "\n",
2113
+ " for sent, label in zip(sentences, labels):\n",
2114
+ "\n",
2115
+ "\n",
2116
+ " # Tokenize sentence\n",
2117
+ " encoded_dict = tokenizer.encode_plus(\n",
2118
+ " sent,\n",
2119
+ " add_special_tokens=True,\n",
2120
+ " max_length=max_length,\n",
2121
+ " padding='max_length',\n",
2122
+ " truncation=True,\n",
2123
+ " return_attention_mask=True,\n",
2124
+ " return_tensors='pt'\n",
2125
+ " )\n",
2126
+ "\n",
2127
+ " input_ids.append(encoded_dict['input_ids'])\n",
2128
+ " attention_masks.append(encoded_dict['attention_mask'])\n",
2129
+ "\n",
2130
+ " # Encode labels\n",
2131
+ " label_id = [label_map[l] for l in label]\n",
2132
+ " label_id += [0] * (max_length - len(label_id)) # Pad labels\n",
2133
+ " label_ids.append(label_id)\n",
2134
+ "\n",
2135
+ " return torch.cat(input_ids, dim=0), torch.cat(attention_masks, dim=0), torch.tensor(label_ids)\n",
2136
+ "\n"
2137
+ ],
2138
+ "metadata": {
2139
+ "id": "Q0kEYZmRn38Q"
2140
+ },
2141
+ "execution_count": null,
2142
+ "outputs": []
2143
+ },
2144
+ {
2145
+ "cell_type": "code",
2146
+ "source": [
2147
+ "train_inputs, train_masks, train_labels = encode_sentences(train_sentences, train_labels, tokenizer)\n",
2148
+ "test_inputs, test_masks, test_labels = encode_sentences(test_sentences, test_labels, tokenizer)"
2149
+ ],
2150
+ "metadata": {
2151
+ "id": "TKS0EWOvonYM"
2152
+ },
2153
+ "execution_count": null,
2154
+ "outputs": []
2155
+ },
2156
+ {
2157
+ "cell_type": "code",
2158
+ "source": [
2159
+ "# Initialize model\n",
2160
+ "model = TFBertForTokenClassification.from_pretrained('bert-base-uncased', num_labels=num_labels)"
2161
+ ],
2162
+ "metadata": {
2163
+ "id": "8zWhPZ7Zo9A-",
2164
+ "colab": {
2165
+ "base_uri": "https://localhost:8080/",
2166
+ "height": 138,
2167
+ "referenced_widgets": [
2168
+ "532e8a53c3034fbf8bff74ade2735a09",
2169
+ "ccb24460a8904e068420d793de8c189a",
2170
+ "fce108786e0746b2b63d0dca8e4f621a",
2171
+ "d06bac10f54a4e58961a7cf803bafbb3",
2172
+ "726ea14f0b85482580d4e4e429eabe95",
2173
+ "4a1efe610d4a441591a939ea2f04892c",
2174
+ "5917d8cacc0a4a04a4f174cad6fc2c6e",
2175
+ "e69e2012919547ef931f240217ebf9de",
2176
+ "1f5bba1e68e7409199bff8c891f09198",
2177
+ "f23222411b9b446caeb1d7232a8d5167",
2178
+ "906298a990754176b6c7fae7a8f9d468"
2179
+ ]
2180
+ },
2181
+ "outputId": "0da09090-40bf-40fa-e102-fb59394c28f5"
2182
+ },
2183
+ "execution_count": null,
2184
+ "outputs": [
2185
+ {
2186
+ "output_type": "display_data",
2187
+ "data": {
2188
+ "text/plain": [
2189
+ "model.safetensors: 0%| | 0.00/440M [00:00<?, ?B/s]"
2190
+ ],
2191
+ "application/vnd.jupyter.widget-view+json": {
2192
+ "version_major": 2,
2193
+ "version_minor": 0,
2194
+ "model_id": "532e8a53c3034fbf8bff74ade2735a09"
2195
+ }
2196
+ },
2197
+ "metadata": {}
2198
+ },
2199
+ {
2200
+ "output_type": "stream",
2201
+ "name": "stderr",
2202
+ "text": [
2203
+ "All PyTorch model weights were used when initializing TFBertForTokenClassification.\n",
2204
+ "\n",
2205
+ "Some weights or buffers of the TF 2.0 model TFBertForTokenClassification were not initialized from the PyTorch model and are newly initialized: ['classifier.weight', 'classifier.bias']\n",
2206
+ "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
2207
+ ]
2208
+ }
2209
+ ]
2210
+ },
2211
+ {
2212
+ "cell_type": "code",
2213
+ "source": [
2214
+ "import tensorflow as tf\n",
2215
+ "\n",
2216
+ "# Train model\n",
2217
+ "device = \"/gpu:0\" if tf.test.is_gpu_available() else \"/cpu:0\"\n"
2218
+ ],
2219
+ "metadata": {
2220
+ "id": "3zCjjhQB0E0l",
2221
+ "colab": {
2222
+ "base_uri": "https://localhost:8080/"
2223
+ },
2224
+ "outputId": "5e5674db-04da-43af-816c-096478b9bdfa"
2225
+ },
2226
+ "execution_count": null,
2227
+ "outputs": [
2228
+ {
2229
+ "output_type": "stream",
2230
+ "name": "stderr",
2231
+ "text": [
2232
+ "WARNING:tensorflow:From <ipython-input-10-9f79c7da56f4>:4: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.\n",
2233
+ "Instructions for updating:\n",
2234
+ "Use `tf.config.list_physical_devices('GPU')` instead.\n"
2235
+ ]
2236
+ }
2237
+ ]
2238
+ },
2239
+ {
2240
+ "cell_type": "code",
2241
+ "source": [
2242
+ "# Compile model\n",
2243
+ "model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=1e-5),\n",
2244
+ " loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),\n",
2245
+ " metrics=['accuracy'])"
2246
+ ],
2247
+ "metadata": {
2248
+ "id": "Tc6UXMdC06fe"
2249
+ },
2250
+ "execution_count": null,
2251
+ "outputs": []
2252
+ },
2253
+ {
2254
+ "cell_type": "code",
2255
+ "source": [
2256
+ "# Train model\n",
2257
+ "train_inputs = tf.convert_to_tensor(train_inputs)\n",
2258
+ "train_labels = tf.convert_to_tensor(train_labels)\n",
2259
+ "test_inputs = tf.convert_to_tensor(test_inputs)\n",
2260
+ "test_labels = tf.convert_to_tensor(test_labels)\n"
2261
+ ],
2262
+ "metadata": {
2263
+ "id": "gP5hGicY2v-D"
2264
+ },
2265
+ "execution_count": null,
2266
+ "outputs": []
2267
+ },
2268
+ {
2269
+ "cell_type": "code",
2270
+ "source": [
2271
+ "# Train model\n",
2272
+ "model.fit(train_inputs, train_labels, epochs=5, batch_size=32, validation_data=(test_inputs, test_labels))"
2273
+ ],
2274
+ "metadata": {
2275
+ "colab": {
2276
+ "base_uri": "https://localhost:8080/"
2277
+ },
2278
+ "id": "T2H_GNIC8dqg",
2279
+ "outputId": "f0b97a20-7dd4-422e-c827-69a76fcaad4e"
2280
+ },
2281
+ "execution_count": null,
2282
+ "outputs": [
2283
+ {
2284
+ "output_type": "stream",
2285
+ "name": "stdout",
2286
+ "text": [
2287
+ "Epoch 1/5\n",
2288
+ "1/1 [==============================] - 4s 4s/step - loss: 1.2786 - accuracy: 0.9453 - val_loss: 1.1207 - val_accuracy: 0.9062\n",
2289
+ "Epoch 2/5\n",
2290
+ "1/1 [==============================] - 4s 4s/step - loss: 1.0599 - accuracy: 0.9453 - val_loss: 0.9593 - val_accuracy: 0.9062\n",
2291
+ "Epoch 3/5\n",
2292
+ "1/1 [==============================] - 4s 4s/step - loss: 0.9132 - accuracy: 0.9453 - val_loss: 0.8314 - val_accuracy: 0.9062\n",
2293
+ "Epoch 4/5\n",
2294
+ "1/1 [==============================] - 3s 3s/step - loss: 0.7635 - accuracy: 0.9453 - val_loss: 0.7333 - val_accuracy: 0.9062\n",
2295
+ "Epoch 5/5\n",
2296
+ "1/1 [==============================] - 3s 3s/step - loss: 0.6473 - accuracy: 0.9531 - val_loss: 0.6603 - val_accuracy: 0.9062\n"
2297
+ ]
2298
+ },
2299
+ {
2300
+ "output_type": "execute_result",
2301
+ "data": {
2302
+ "text/plain": [
2303
+ "<tf_keras.src.callbacks.History at 0x7d8bb65de560>"
2304
+ ]
2305
+ },
2306
+ "metadata": {},
2307
+ "execution_count": 18
2308
+ }
2309
+ ]
2310
+ },
2311
+ {
2312
+ "cell_type": "code",
2313
+ "source": [
2314
+ "# Evaluate model\n",
2315
+ "test_loss, test_acc = model.evaluate(test_inputs, test_labels)\n",
2316
+ "print(f'Test loss: {test_loss:.3f}, Test accuracy: {test_acc:.3f}')"
2317
+ ],
2318
+ "metadata": {
2319
+ "colab": {
2320
+ "base_uri": "https://localhost:8080/"
2321
+ },
2322
+ "id": "Xaqfc2CI8uRr",
2323
+ "outputId": "2b473448-c00e-40be-90ad-fe5a118f6a3e"
2324
+ },
2325
+ "execution_count": null,
2326
+ "outputs": [
2327
+ {
2328
+ "output_type": "stream",
2329
+ "name": "stdout",
2330
+ "text": [
2331
+ "1/1 [==============================] - 1s 859ms/step - loss: 0.6603 - accuracy: 0.9062\n",
2332
+ "Test loss: 0.660, Test accuracy: 0.906\n"
2333
+ ]
2334
+ }
2335
+ ]
2336
+ },
2337
+ {
2338
+ "cell_type": "code",
2339
+ "source": [
2340
+ "# Make predictions\n",
2341
+ "predictions = model.predict(test_inputs)\n",
2342
+ "predicted_labels = np.argmax(predictions)\n",
2343
+ "\n"
2344
+ ],
2345
+ "metadata": {
2346
+ "colab": {
2347
+ "base_uri": "https://localhost:8080/"
2348
+ },
2349
+ "id": "VCeH8n4-9IzZ",
2350
+ "outputId": "db5225e7-06ae-47de-fd21-18cb6152ed03"
2351
+ },
2352
+ "execution_count": null,
2353
+ "outputs": [
2354
+ {
2355
+ "output_type": "stream",
2356
+ "name": "stdout",
2357
+ "text": [
2358
+ "1/1 [==============================] - 1s 831ms/step\n"
2359
+ ]
2360
+ }
2361
+ ]
2362
+ },
2363
+ {
2364
+ "cell_type": "code",
2365
+ "source": [
2366
+ "label_map_tensor = tf.constant(list(label_map.values()))\n",
2367
+ "predicted_label = tf.gather(label_map_tensor, predicted_labels)\n"
2368
+ ],
2369
+ "metadata": {
2370
+ "id": "1gKdU8Xp-ZGl"
2371
+ },
2372
+ "execution_count": null,
2373
+ "outputs": []
2374
+ },
2375
+ {
2376
+ "cell_type": "code",
2377
+ "source": [
2378
+ "# Convert predicted labels back to original labels\n",
2379
+ "label_map_tensor = tf.constant(list(label_map.values()))\n",
2380
+ "predicted_label = tf.gather(label_map_tensor, predicted_labels)"
2381
+ ],
2382
+ "metadata": {
2383
+ "id": "k0-cjNEs-ZDP"
2384
+ },
2385
+ "execution_count": null,
2386
+ "outputs": []
2387
+ },
2388
+ {
2389
+ "cell_type": "code",
2390
+ "source": [
2391
+ "# Pad the test_labels list to ensure all tensors have the same length\n",
2392
+ "max_length = max(len(label) for label in test_labels)\n",
2393
+ "padded_test_labels = [tf.pad(label, [[0, max_length - len(label)]], 'constant') for label in test_labels]\n",
2394
+ "\n",
2395
+ "# Pad the padded_test_labels list to match the length of the test_sentences list\n",
2396
+ "num_sentences = len(test_sentences)\n",
2397
+ "padded_test_labels += [tf.zeros((max_length,))] * (num_sentences - len(padded_test_labels))\n",
2398
+ "\n",
2399
+ "# Print sample predictions\n",
2400
+ "for i in range(5):\n",
2401
+ " print(\"Sentence:\", test_sentences[i])\n",
2402
+ " print(\"Actual label:\", padded_test_labels[i].numpy())\n"
2403
+ ],
2404
+ "metadata": {
2405
+ "colab": {
2406
+ "base_uri": "https://localhost:8080/"
2407
+ },
2408
+ "id": "NohfFc8N_5dg",
2409
+ "outputId": "0ce04303-fe94-40d8-cb8a-275b3175354d"
2410
+ },
2411
+ "execution_count": null,
2412
+ "outputs": [
2413
+ {
2414
+ "output_type": "stream",
2415
+ "name": "stdout",
2416
+ "text": [
2417
+ "Sentence: ['New', 'Orleans', 'Mother', \"'s\", 'Day', 'Parade', 'shooting', '.', 'One', 'of', 'the', 'people', 'hurt', 'was', 'a', '10-year-old', 'girl', '.', 'WHAT', 'THE', 'HELL', 'IS', 'WRONG', 'WITH', 'PEOPLE', '?']\n",
2418
+ "Actual label: [7 7 7 7 7 7 7 7 7 7 7 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
2419
+ " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
2420
+ " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
2421
+ " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]\n",
2422
+ "Sentence: ['RT', '@hxranspizza', ':', 'Going', 'into', 'school', 'tomorrow', 'like', '#KCA', '#Vote1DUK', 'http://t.co/vvkoEEMjMX']\n",
2423
+ "Actual label: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2424
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2425
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2426
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2427
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2428
+ " 0. 0. 0. 0. 0. 0. 0. 0.]\n",
2429
+ "Sentence: ['May', 'e', 'just', 'a', 'smile', 'in', 'your', 'heart', 'EILY', 'CountdownBegins', '#PushAwardsLizQuens']\n",
2430
+ "Actual label: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2431
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2432
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2433
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2434
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2435
+ " 0. 0. 0. 0. 0. 0. 0. 0.]\n",
2436
+ "Sentence: ['I', 'could', 'so', 'do', 'Thursday', 'Club', 'right', 'now']\n",
2437
+ "Actual label: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2438
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2439
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2440
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2441
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2442
+ " 0. 0. 0. 0. 0. 0. 0. 0.]\n",
2443
+ "Sentence: ['@therealdaftbear', 'Albert', 'Nobbs', '(', 'Glenn', 'Close)is', 'a', 'woman', 'living', 'as', 'a', 'man', 'in', 'order', 'to', 'find', 'work', 'in', 'the', 'harsh', 'environment', 'of', '19th-century', 'Ireland']\n",
2444
+ "Actual label: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2445
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2446
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2447
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2448
+ " 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.\n",
2449
+ " 0. 0. 0. 0. 0. 0. 0. 0.]\n"
2450
+ ]
2451
+ }
2452
+ ]
2453
+ },
2454
+ {
2455
+ "cell_type": "markdown",
2456
+ "source": [
2457
+ "# Insights and Recommendations:\n",
2458
+ "\n",
2459
+ "** Data Quality and Quantity: **\n",
2460
+ "\n",
2461
+ "- Data Quality: Ensure data is clean, accurate, and relevant to the NER task.\n",
2462
+ "- Data Quantity: Sufficient training data is crucial for model performance. Consider data augmentation techniques if needed.\n",
2463
+ "\n",
2464
+ "** Model Architecture: **\n",
2465
+ "\n",
2466
+ "- BERT-Based Models: Utilize pre-trained BERT models for strong performance.\n",
2467
+ "- Fine-tuning: Fine-tune the pre-trained model on the specific NER task.\n",
2468
+ "- Experimentation: Try different model architectures and hyperparameters to optimize results.\n",
2469
+ "\n",
2470
+ "** Training and Evaluation:**\n",
2471
+ "\n",
2472
+ "- Hyperparameter Tuning: Experiment with learning rate, batch size, and other hyperparameters.\n",
2473
+ "- Early Stopping: Implement early stopping to prevent overfitting.\n",
2474
+ "- Evaluation Metrics: Use appropriate metrics like precision, recall, and F1-score to assess model performance.\n",
2475
+ "\n",
2476
+ "**Deployment and Inference:**\n",
2477
+ "\n",
2478
+ "- Model Serving: Deploy the model using a framework like TensorFlow Serving or TorchServe.\n",
2479
+ "- Batch Processing: Process multiple tweets at once for efficiency.\n",
2480
+ "- Real-time Inference: Consider using a streaming framework like Kafka for real-time processing.\n",
2481
+ "\n",
2482
+ "**Ethical Considerations:**\n",
2483
+ "\n",
2484
+ "- Bias and Fairness: Ensure the model is fair and unbiased, especially for sensitive topics.\n",
2485
+ "- Privacy: Protect user privacy and data security.\n",
2486
+ "\n",
2487
+ "**Future Directions:**\n",
2488
+ "\n",
2489
+ "- Contextual Understanding: Explore models that can capture deeper contextual information.\n",
2490
+ "- Multi-lingual NER: Develop models that can handle multiple languages.\n",
2491
+ "- Domain-Specific NER: Fine-tune models for specific domains like finance or healthcare."
2492
+ ],
2493
+ "metadata": {
2494
+ "id": "atPT0HjhAgK0"
2495
+ }
2496
+ },
2497
+ {
2498
+ "cell_type": "code",
2499
+ "source": [],
2500
+ "metadata": {
2501
+ "id": "Awq80LkmABWC"
2502
+ },
2503
+ "execution_count": null,
2504
+ "outputs": []
2505
+ }
2506
+ ]
2507
+ }