diff --git "a/GEM_Challenge_Set_Creation.ipynb" "b/GEM_Challenge_Set_Creation.ipynb" --- "a/GEM_Challenge_Set_Creation.ipynb" +++ "b/GEM_Challenge_Set_Creation.ipynb" @@ -1,2947 +1,2969 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "d86DXrMMd1_X" + }, + "source": [ + "# 1. Get NL-Augmenter and install dependencies" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "AZHffzbAfii2" + }, + "source": [ + "## Copy git repository of NL-Augmenter" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { "colab": { - "name": "GEM_Hackathon_2021_filters_tutorial.ipynb", - "provenance": [], - "collapsed_sections": [] - }, - "kernelspec": { - "display_name": "Python 3", - "name": "python3" - }, - "language_info": { - "name": "python" - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "e4c1e861f8434fa29cff33f367c61d7a": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_83f25fd2658142e4a2be06e00a7966cb", - "IPY_MODEL_3bbe92c3974641b98d8ef5777dc491de" - ], - "layout": "IPY_MODEL_d6fcdf4b5c194a7380a8a0df60ae2298" - } - }, - "83f25fd2658142e4a2be06e00a7966cb": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "Downloading: 100%", - "description_tooltip": null, - "layout": "IPY_MODEL_fc7335335b114e22b33db1a830ea90e4", - "max": 5020, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_7402db88b7eb43b38f347384a49b53ec", - "value": 5020 - } - }, - "3bbe92c3974641b98d8ef5777dc491de": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_d77a514d39a14142a1c51a2e7d136565", - "placeholder": "​", - "style": "IPY_MODEL_e2f417a1a55a463297ee168f687a29d3", - "value": " 5.02k/5.02k [00:08<00:00, 616B/s]" - } - }, - "d6fcdf4b5c194a7380a8a0df60ae2298": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "fc7335335b114e22b33db1a830ea90e4": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "7402db88b7eb43b38f347384a49b53ec": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "d77a514d39a14142a1c51a2e7d136565": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "e2f417a1a55a463297ee168f687a29d3": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "8fce5b95f6db4c13a99886bb178e4c1d": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_bfb105f1cfdf4702a4822f207b927d1e", - "IPY_MODEL_07386fcb9b8a4a25b4a06136cf2d69c5" - ], - "layout": "IPY_MODEL_e89ec92a3ae34d239e3b131fc240fc34" - } - }, - "bfb105f1cfdf4702a4822f207b927d1e": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "Downloading: 100%", - "description_tooltip": null, - "layout": "IPY_MODEL_0ad3dcd165ed43ad800fca8946d7716e", - "max": 101226421, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_d0e42ee4fc854b73b2b8929ff2a26cde", - "value": 101226421 - } - }, - "07386fcb9b8a4a25b4a06136cf2d69c5": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_29f4ba3028a3498ab802f96fb1c42fb8", - "placeholder": "​", - "style": "IPY_MODEL_fa507001884643a387d7e0a46d498604", - "value": " 101M/101M [00:07<00:00, 14.0MB/s]" - } - }, - "e89ec92a3ae34d239e3b131fc240fc34": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "0ad3dcd165ed43ad800fca8946d7716e": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "d0e42ee4fc854b73b2b8929ff2a26cde": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "29f4ba3028a3498ab802f96fb1c42fb8": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "fa507001884643a387d7e0a46d498604": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "90e1a383e3354125bd158c5952920ad3": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_99dd5c88984f4952ad65f5ba1e5becc2", - "IPY_MODEL_249a2b434fa4421fbcaee04512306ef5" - ], - "layout": "IPY_MODEL_e9f93c50c219406a82f55127ad09b555" - } - }, - "99dd5c88984f4952ad65f5ba1e5becc2": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "Downloading: 100%", - "description_tooltip": null, - "layout": "IPY_MODEL_a4812e4c447c4288bff063b6bd86ee66", - "max": 43457905, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_c068b76648fa47b5a30c251c0630160c", - "value": 43457905 - } - }, - "249a2b434fa4421fbcaee04512306ef5": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_56a75ac849ef4e22a02de0b56d05d13e", - "placeholder": "​", - "style": "IPY_MODEL_532c0b0e92ad4323bfada2ad17cd64c3", - "value": " 43.5M/43.5M [00:02<00:00, 20.4MB/s]" - } - }, - "e9f93c50c219406a82f55127ad09b555": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "a4812e4c447c4288bff063b6bd86ee66": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "c068b76648fa47b5a30c251c0630160c": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "56a75ac849ef4e22a02de0b56d05d13e": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "532c0b0e92ad4323bfada2ad17cd64c3": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "8307844b3fda4eb68eebc048c5f9eb11": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_815255b488c745519de3e645e96d7d19", - "IPY_MODEL_9ec7464fe62d4f359fb007eb47fa2343" - ], - "layout": "IPY_MODEL_5463eaab09e640ce851d457ffc3ba2bb" - } - }, - "815255b488c745519de3e645e96d7d19": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "Downloading: 100%", - "description_tooltip": null, - "layout": "IPY_MODEL_85d410e7c9024609bd80a54b449093e6", - "max": 14480863, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_7663b3bd79db43a1982c4c46d2d6a83a", - "value": 14480863 - } - }, - "9ec7464fe62d4f359fb007eb47fa2343": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_5feec27442e74914aa98c7b05a55af21", - "placeholder": "​", - "style": "IPY_MODEL_18e6b91315504e95b45faf94698b4ab5", - "value": " 14.5M/14.5M [00:01<00:00, 10.5MB/s]" - } - }, - "5463eaab09e640ce851d457ffc3ba2bb": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "85d410e7c9024609bd80a54b449093e6": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "7663b3bd79db43a1982c4c46d2d6a83a": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "5feec27442e74914aa98c7b05a55af21": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "18e6b91315504e95b45faf94698b4ab5": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "9886e2d3e8114db39cc4adf098a50be5": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_ca1c50a7ea1c47469339a0eab4c32fb8", - "IPY_MODEL_7bf0345f9db84e468ccb58901c881f39" - ], - "layout": "IPY_MODEL_b68d75b7ad23470e9d5d1aa3f7639ecd" - } - }, - "ca1c50a7ea1c47469339a0eab4c32fb8": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "info", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_b3887cde43174c40b5cc5575aba0f106", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_7070284d09a640f296ad5337698a5e68", - "value": 1 - } - }, - "7bf0345f9db84e468ccb58901c881f39": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_83fb9bb42d734abe9878f7c4fcb212e9", - "placeholder": "​", - "style": "IPY_MODEL_e4139a008d574efb9a5b1cec6790d848", - "value": "90403 examples [00:16, 15097.76 examples/s]" - } - }, - "b68d75b7ad23470e9d5d1aa3f7639ecd": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "b3887cde43174c40b5cc5575aba0f106": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "20px" - } - }, - "7070284d09a640f296ad5337698a5e68": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "83fb9bb42d734abe9878f7c4fcb212e9": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "e4139a008d574efb9a5b1cec6790d848": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "59abc07b8f594485a4cbe01360341705": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_cea605e546a14d70bfb23cf6568eee27", - "IPY_MODEL_c269d4210e754a75a45e4995e4f9c3b5" - ], - "layout": "IPY_MODEL_4b4984daa68a4cd6953539e58b763bdb" - } - }, - "cea605e546a14d70bfb23cf6568eee27": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "info", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_0fe578cb04654fae89322571049c48e7", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_89d31e1e5f99473485f4025971ed6a1d", - "value": 1 - } - }, - "c269d4210e754a75a45e4995e4f9c3b5": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_4c3312c6902e4436a5368f1e86eed65a", - "placeholder": "​", - "style": "IPY_MODEL_91930c1187a04a91b4c59e0ceb883d56", - "value": "11873 examples [00:01, 110.35 examples/s]" - } - }, - "4b4984daa68a4cd6953539e58b763bdb": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "0fe578cb04654fae89322571049c48e7": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "20px" - } - }, - "89d31e1e5f99473485f4025971ed6a1d": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "4c3312c6902e4436a5368f1e86eed65a": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "91930c1187a04a91b4c59e0ceb883d56": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - }, - "3abd5ba4771248d796a890b8ed055f01": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_25034a9f750c442599809bed8f47a029", - "IPY_MODEL_1f2594d50c8c4df6ada87486ae897f58" - ], - "layout": "IPY_MODEL_7d35cb7d0127409a9dc8b9203b228c79" - } - }, - "25034a9f750c442599809bed8f47a029": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "ProgressView", - "bar_style": "info", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_7475e328a906408492734428a2d5157d", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_20aa9ff64ac5483095c849a35676958e", - "value": 1 - } - }, - "1f2594d50c8c4df6ada87486ae897f58": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "1.5.0", - "_view_name": "HTMLView", - "description": "", - "description_tooltip": null, - "layout": "IPY_MODEL_99dbd39ad800493aa21656eaba325c68", - "placeholder": "​", - "style": "IPY_MODEL_b3591d13bc4647b4b122244686f01793", - "value": "39916 examples [00:03, 8913.27 examples/s]" - } - }, - "7d35cb7d0127409a9dc8b9203b228c79": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "7475e328a906408492734428a2d5157d": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "20px" - } - }, - "20aa9ff64ac5483095c849a35676958e": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "initial" - } - }, - "99dbd39ad800493aa21656eaba325c68": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "1.2.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "overflow_x": null, - "overflow_y": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "b3591d13bc4647b4b122244686f01793": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_model_name": "DescriptionStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "1.2.0", - "_view_name": "StyleView", - "description_width": "" - } - } - } + "base_uri": "https://localhost:8080/" + }, + "id": "6itEUtbWiYr8", + "outputId": "090b81f5-d40d-4e5f-89cc-e214ca908a77" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fatal: destination path 'NL-Augmenter' already exists and is not an empty directory.\r\n" + ] } + ], + "source": [ + "!git clone https://www.github.com/GEM-benchmark/NL-Augmenter" + ] }, - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "d86DXrMMd1_X" - }, - "source": [ - "# 1. Get NL-Augmenter and install dependencies" - ] + { + "cell_type": "markdown", + "metadata": { + "id": "0tPppU_HfrkS" + }, + "source": [ + "## Go to newly copied directory" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "dR62jWALiZrn", + "outputId": "60bc71a6-32c5-4424-eb2a-39de848e9bb2" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "AZHffzbAfii2" - }, - "source": [ - "## Copy git repository of NL-Augmenter" - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "/mnt/data/mphasis.abinaya/squad_v2/NL-Augmenter\n" + ] + } + ], + "source": [ + "cd NL-Augmenter" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "XVYUdoj2f7xW" + }, + "source": [ + "## Install requirements" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "bUVJQTXRigRR", + "outputId": "a446b5c8-b8b2-4c1a-defc-c80fba3b4c2d" + }, + "outputs": [ { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "6itEUtbWiYr8", - "outputId": "090b81f5-d40d-4e5f-89cc-e214ca908a77" - }, - "source": [ - "!git clone https://www.github.com/GEM-benchmark/NL-Augmenter" - ], - "execution_count": null, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cloning into 'NL-Augmenter'...\n", - "warning: redirecting to https://github.com/GEM-benchmark/NL-Augmenter.git/\n", - "remote: Enumerating objects: 11984, done.\u001b[K\n", - "remote: Counting objects: 100% (655/655), done.\u001b[K\n", - "remote: Compressing objects: 100% (443/443), done.\u001b[K\n", - "remote: Total 11984 (delta 366), reused 399 (delta 211), pack-reused 11329\u001b[K\n", - "Receiving objects: 100% (11984/11984), 91.26 MiB | 20.42 MiB/s, done.\n", - "Resolving deltas: 100% (7821/7821), done.\n" - ] - } - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.\n", + "You should consider upgrading via the '/mnt/data/mphasis.abinaya/notebook/jupyter/bin/python3.7 -m pip install --upgrade pip' command.\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "Collecting https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz\n", + " Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz (13.7 MB)\n", + "\u001b[K |████████████████████████████████| 13.7 MB 1.4 MB/s eta 0:00:01\n", + "\u001b[?25hRequirement already satisfied: spacy<3.1.0,>=3.0.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from en-core-web-sm==3.0.0) (3.0.0)\n", + "Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (4.49.0)\n", + "Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.0.6)\n", + "Requirement already satisfied: jinja2 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.1)\n", + "Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.8)\n", + "Requirement already satisfied: requests<3.0.0,>=2.13.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.26.0)\n", + "Requirement already satisfied: importlib-metadata>=0.20 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (4.8.1)\n", + "Requirement already satisfied: typer<0.4.0,>=0.3.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.3.2)\n", + "Requirement already satisfied: wasabi<1.1.0,>=0.8.1 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.8.2)\n", + "Requirement already satisfied: srsly<3.0.0,>=2.4.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.4.2)\n", + "Requirement already satisfied: setuptools in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (58.1.0)\n", + "Requirement already satisfied: pydantic<1.8.0,>=1.7.1 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.7.4)\n", + "Requirement already satisfied: numpy>=1.15.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.19.5)\n", + "Requirement already satisfied: thinc<8.1.0,>=8.0.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (8.0.13)\n", + "Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.6)\n", + "Requirement already satisfied: catalogue<2.1.0,>=2.0.1 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.6)\n", + "Requirement already satisfied: packaging>=20.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (21.0)\n", + "Requirement already satisfied: pathy in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.6.0)\n", + "Requirement already satisfied: typing-extensions>=3.7.4 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.7.4.3)\n", + "Requirement already satisfied: blis<0.8.0,>=0.4.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.4.1)\n", + "Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.5)\n", + "Requirement already satisfied: zipp>=0.5 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from catalogue<2.1.0,>=2.0.1->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.5.0)\n", + "Requirement already satisfied: pyparsing>=2.0.2 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from packaging>=20.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.4.7)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2021.5.30)\n", + "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.26.7)\n", + "Requirement already satisfied: charset-normalizer~=2.0.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.6)\n", + "Requirement already satisfied: idna<4,>=2.5 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.2)\n", + "Requirement already satisfied: click<7.2.0,>=7.1.1 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from typer<0.4.0,>=0.3.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (7.1.2)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from jinja2->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.1)\n", + "Requirement already satisfied: smart-open<6.0.0,>=5.0.0 in /mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages (from pathy->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (5.2.1)\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: Ignoring invalid distribution -umpy (/mnt/data/mphasis.abinaya/notebook/jupyter/lib/python3.7/site-packages)\u001b[0m\n", + "\u001b[33mWARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.\n", + "You should consider upgrading via the '/mnt/data/mphasis.abinaya/notebook/jupyter/bin/python3.7 -m pip install --upgrade pip' command.\u001b[0m\n" + ] + } + ], + "source": [ + "!pip install -r requirements.txt --quiet\n", + "!pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "A4n-PqAAfJes" + }, + "source": [ + "# 2. Load the data" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "T_GV8XWlgMMr" + }, + "source": [ + "## Get dataloader and use it to load CommonGen dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 383, + "referenced_widgets": [ + "e4c1e861f8434fa29cff33f367c61d7a", + "83f25fd2658142e4a2be06e00a7966cb", + "3bbe92c3974641b98d8ef5777dc491de", + "d6fcdf4b5c194a7380a8a0df60ae2298", + "fc7335335b114e22b33db1a830ea90e4", + "7402db88b7eb43b38f347384a49b53ec", + "d77a514d39a14142a1c51a2e7d136565", + "e2f417a1a55a463297ee168f687a29d3", + "8fce5b95f6db4c13a99886bb178e4c1d", + "bfb105f1cfdf4702a4822f207b927d1e", + "07386fcb9b8a4a25b4a06136cf2d69c5", + "e89ec92a3ae34d239e3b131fc240fc34", + "0ad3dcd165ed43ad800fca8946d7716e", + "d0e42ee4fc854b73b2b8929ff2a26cde", + "29f4ba3028a3498ab802f96fb1c42fb8", + "fa507001884643a387d7e0a46d498604", + "90e1a383e3354125bd158c5952920ad3", + "99dd5c88984f4952ad65f5ba1e5becc2", + "249a2b434fa4421fbcaee04512306ef5", + "e9f93c50c219406a82f55127ad09b555", + "a4812e4c447c4288bff063b6bd86ee66", + "c068b76648fa47b5a30c251c0630160c", + "56a75ac849ef4e22a02de0b56d05d13e", + "532c0b0e92ad4323bfada2ad17cd64c3", + "8307844b3fda4eb68eebc048c5f9eb11", + "815255b488c745519de3e645e96d7d19", + "9ec7464fe62d4f359fb007eb47fa2343", + "5463eaab09e640ce851d457ffc3ba2bb", + "85d410e7c9024609bd80a54b449093e6", + "7663b3bd79db43a1982c4c46d2d6a83a", + "5feec27442e74914aa98c7b05a55af21", + "18e6b91315504e95b45faf94698b4ab5", + "9886e2d3e8114db39cc4adf098a50be5", + "ca1c50a7ea1c47469339a0eab4c32fb8", + "7bf0345f9db84e468ccb58901c881f39", + "b68d75b7ad23470e9d5d1aa3f7639ecd", + "b3887cde43174c40b5cc5575aba0f106", + "7070284d09a640f296ad5337698a5e68", + "83fb9bb42d734abe9878f7c4fcb212e9", + "e4139a008d574efb9a5b1cec6790d848", + "59abc07b8f594485a4cbe01360341705", + "cea605e546a14d70bfb23cf6568eee27", + "c269d4210e754a75a45e4995e4f9c3b5", + "4b4984daa68a4cd6953539e58b763bdb", + "0fe578cb04654fae89322571049c48e7", + "89d31e1e5f99473485f4025971ed6a1d", + "4c3312c6902e4436a5368f1e86eed65a", + "91930c1187a04a91b4c59e0ceb883d56", + "3abd5ba4771248d796a890b8ed055f01", + "25034a9f750c442599809bed8f47a029", + "1f2594d50c8c4df6ada87486ae897f58", + "7d35cb7d0127409a9dc8b9203b228c79", + "7475e328a906408492734428a2d5157d", + "20aa9ff64ac5483095c849a35676958e", + "99dbd39ad800493aa21656eaba325c68", + "b3591d13bc4647b4b122244686f01793" + ] }, + "id": "VrIfrgGNj6WQ", + "outputId": "4f261007-bb01-48b0-8ef6-7e289f305fd8" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "0tPppU_HfrkS" - }, - "source": [ - "## Go to newly copied directory" - ] + "name": "stderr", + "output_type": "stream", + "text": [ + "Using custom data configuration default\n" + ] }, { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "dR62jWALiZrn", - "outputId": "60bc71a6-32c5-4424-eb2a-39de848e9bb2" - }, - "source": [ - "cd NL-Augmenter" - ], - "execution_count": null, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/content/NL-Augmenter\n" - ] - } - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading and preparing dataset squad_v2/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/mphasis.abinaya/.cache/huggingface/datasets/squad_v2/default/0.0.0/f5f48a1a69d6d37fb09e1d978247e78f1885a13ac6f4ad4c8c6388cb79c76cdd...\n" + ] }, { - "cell_type": "markdown", - "metadata": { - "id": "XVYUdoj2f7xW" + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 }, - "source": [ - "## Install requirements" + "text/plain": [ + "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "bUVJQTXRigRR", - "outputId": "a446b5c8-b8b2-4c1a-defc-c80fba3b4c2d" - }, - "source": [ - "!pip install -r requirements.txt --quiet\n", - "!pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz" - ], - "execution_count": null, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\u001b[K |████████████████████████████████| 12.1 MB 4.8 MB/s \n", - "\u001b[K |████████████████████████████████| 12.7 MB 37.4 MB/s \n", - "\u001b[K |████████████████████████████████| 101 kB 7.6 MB/s \n", - "\u001b[K |████████████████████████████████| 280 kB 46.6 MB/s \n", - "\u001b[K |████████████████████████████████| 234 kB 50.5 MB/s \n", - "\u001b[K |████████████████████████████████| 2.2 MB 43.7 MB/s \n", - "\u001b[K |████████████████████████████████| 54 kB 2.9 MB/s \n", - "\u001b[K |████████████████████████████████| 43 kB 1.9 MB/s \n", - "\u001b[K |████████████████████████████████| 1.2 MB 35.9 MB/s \n", - "\u001b[K |████████████████████████████████| 138 kB 49.2 MB/s \n", - "\u001b[K |████████████████████████████████| 190 kB 37.9 MB/s \n", - "\u001b[K |████████████████████████████████| 73 kB 1.6 MB/s \n", - "\u001b[K |████████████████████████████████| 105 kB 49.7 MB/s \n", - "\u001b[K |████████████████████████████████| 22.3 MB 60.1 MB/s \n", - "\u001b[K |████████████████████████████████| 167 kB 57.4 MB/s \n", - "\u001b[K |████████████████████████████████| 628 kB 48.5 MB/s \n", - "\u001b[K |████████████████████████████████| 9.1 MB 44.5 MB/s \n", - "\u001b[K |████████████████████████████████| 42 kB 1.3 MB/s \n", - "\u001b[K |████████████████████████████████| 451 kB 41.4 MB/s \n", - "\u001b[K |████████████████████████████████| 213 kB 47.3 MB/s \n", - "\u001b[K |███████████████████��████████████| 56 kB 3.9 MB/s \n", - "\u001b[K |████████████████████████████████| 132 kB 48.7 MB/s \n", - "\u001b[K |████████████████████████████████| 69 kB 6.7 MB/s \n", - "\u001b[K |████████████████████████████████| 243 kB 44.8 MB/s \n", - "\u001b[K |████████████████████████████████| 895 kB 39.9 MB/s \n", - "\u001b[K |████████████████████████████████| 3.3 MB 38.6 MB/s \n", - "\u001b[K |████████████████████████████████| 843 kB 39.9 MB/s \n", - "\u001b[K |████████████████████████████████| 749 kB 37.6 MB/s \n", - "\u001b[K |████████████████████████████████| 98 kB 7.7 MB/s \n", - "\u001b[K |████████████████████████████████| 5.6 MB 26.4 MB/s \n", - "\u001b[K |████████████████████████████████| 596 kB 42.2 MB/s \n", - "\u001b[K |████████████████████████████████| 41 kB 591 kB/s \n", - "\u001b[K |████████████████████████████████| 68 kB 6.8 MB/s \n", - "\u001b[K |████████████████████████████████| 496 kB 38.1 MB/s \n", - "\u001b[K |████████████████████████████████| 81 kB 8.4 MB/s \n", - "\u001b[K |████████████████████████████████| 5.6 MB 32.1 MB/s \n", - "\u001b[K |████████████████████████████████| 5.6 MB 32.8 MB/s \n", - "\u001b[K |████████████████████████████████| 419 kB 44.2 MB/s \n", - "\u001b[K |████████████████████████████████| 97 kB 6.3 MB/s \n", - "\u001b[K |████████████████████████████████| 3.6 MB 27.7 MB/s \n", - "\u001b[?25h Building wheel for checklist (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for word2number (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for seqeval (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for iso-639 (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for patternfork-nosql (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for python-docx (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for sgmllib3k (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", - "datascience 0.10.6 requires coverage==3.7.1, but you have coverage 6.2 which is incompatible.\n", - "datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.\n", - "coveralls 0.5 requires coverage<3.999,>=3.6, but you have coverage 6.2 which is incompatible.\u001b[0m\n", - "Collecting https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz\n", - " Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz (13.7 MB)\n", - "\u001b[K |████████████████████████████████| 13.7 MB 5.5 MB/s \n", - "\u001b[?25hRequirement already satisfied: spacy<3.1.0,>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from en-core-web-sm==3.0.0) (3.0.0)\n", - "Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.10.0.2)\n", - "Requirement already satisfied: wasabi<1.1.0,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.8.2)\n", - "Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.23.0)\n", - "Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.6)\n", - "Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.11.3)\n", - "Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (57.4.0)\n", - "Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (4.49.0)\n", - "Requirement already satisfied: numpy>=1.15.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.19.5)\n", - "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (21.3)\n", - "Requirement already satisfied: thinc<8.1.0,>=8.0.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (8.0.13)\n", - "Requirement already satisfied: catalogue<2.1.0,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.6)\n", - "Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.6)\n", - "Requirement already satisfied: srsly<3.0.0,>=2.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.4.2)\n", - "Requirement already satisfied: typer<0.4.0,>=0.3.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.3.2)\n", - "Requirement already satisfied: pydantic<1.8.0,>=1.7.1 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.7.4)\n", - "Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.8)\n", - "Requirement already satisfied: importlib-metadata>=0.20 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (4.8.2)\n", - "Requirement already satisfied: blis<0.8.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.4.1)\n", - "Requirement already satisfied: pathy in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (0.6.1)\n", - "Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.0.6)\n", - "Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from catalogue<2.1.0,>=2.0.1->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.6.0)\n", - "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=20.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.6)\n", - "Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (3.0.4)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2021.10.8)\n", - "Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (1.24.3)\n", - "Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.10)\n", - "Requirement already satisfied: click<7.2.0,>=7.1.1 in /usr/local/lib/python3.7/dist-packages (from typer<0.4.0,>=0.3.0->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (7.1.2)\n", - "Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (2.0.1)\n", - "Requirement already satisfied: smart-open<6.0.0,>=5.0.0 in /usr/local/lib/python3.7/dist-packages (from pathy->spacy<3.1.0,>=3.0.0->en-core-web-sm==3.0.0) (5.2.1)\n", - "Building wheels for collected packages: en-core-web-sm\n", - " Building wheel for en-core-web-sm (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for en-core-web-sm: filename=en_core_web_sm-3.0.0-py3-none-any.whl size=13704318 sha256=024655289c95d06a6630329fdc1dee46676c9ac4c285e9ea9e1b2a02142d8bc4\n", - " Stored in directory: /root/.cache/pip/wheels/2d/86/ba/c33ceff8af5cb8a963e86131912039d39b37227f9787661bca\n", - "Successfully built en-core-web-sm\n", - "Installing collected packages: en-core-web-sm\n", - " Attempting uninstall: en-core-web-sm\n", - " Found existing installation: en-core-web-sm 2.2.5\n", - " Uninstalling en-core-web-sm-2.2.5:\n", - " Successfully uninstalled en-core-web-sm-2.2.5\n", - "Successfully installed en-core-web-sm-3.0.0\n" - ] - } - ] + "name": "stderr", + "output_type": "stream", + "text": [ + "2021-11-30 09:07:54.781527: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory\n", + "2021-11-30 09:07:54.781561: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.\n" + ] }, { - "cell_type": "markdown", - "metadata": { - "id": "A4n-PqAAfJes" + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 }, - "source": [ - "# 2. Load the data" + "text/plain": [ + "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "cell_type": "markdown", - "metadata": { - "id": "T_GV8XWlgMMr" + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "", + "version_major": 2, + "version_minor": 0 }, - "source": [ - "## Get dataloader and use it to load CommonGen dataset" + "text/plain": [ + "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] + }, + "metadata": {}, + "output_type": "display_data" }, { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 383, - "referenced_widgets": [ - "e4c1e861f8434fa29cff33f367c61d7a", - "83f25fd2658142e4a2be06e00a7966cb", - "3bbe92c3974641b98d8ef5777dc491de", - "d6fcdf4b5c194a7380a8a0df60ae2298", - "fc7335335b114e22b33db1a830ea90e4", - "7402db88b7eb43b38f347384a49b53ec", - "d77a514d39a14142a1c51a2e7d136565", - "e2f417a1a55a463297ee168f687a29d3", - "8fce5b95f6db4c13a99886bb178e4c1d", - "bfb105f1cfdf4702a4822f207b927d1e", - "07386fcb9b8a4a25b4a06136cf2d69c5", - "e89ec92a3ae34d239e3b131fc240fc34", - "0ad3dcd165ed43ad800fca8946d7716e", - "d0e42ee4fc854b73b2b8929ff2a26cde", - "29f4ba3028a3498ab802f96fb1c42fb8", - "fa507001884643a387d7e0a46d498604", - "90e1a383e3354125bd158c5952920ad3", - "99dd5c88984f4952ad65f5ba1e5becc2", - "249a2b434fa4421fbcaee04512306ef5", - "e9f93c50c219406a82f55127ad09b555", - "a4812e4c447c4288bff063b6bd86ee66", - "c068b76648fa47b5a30c251c0630160c", - "56a75ac849ef4e22a02de0b56d05d13e", - "532c0b0e92ad4323bfada2ad17cd64c3", - "8307844b3fda4eb68eebc048c5f9eb11", - "815255b488c745519de3e645e96d7d19", - "9ec7464fe62d4f359fb007eb47fa2343", - "5463eaab09e640ce851d457ffc3ba2bb", - "85d410e7c9024609bd80a54b449093e6", - "7663b3bd79db43a1982c4c46d2d6a83a", - "5feec27442e74914aa98c7b05a55af21", - "18e6b91315504e95b45faf94698b4ab5", - "9886e2d3e8114db39cc4adf098a50be5", - "ca1c50a7ea1c47469339a0eab4c32fb8", - "7bf0345f9db84e468ccb58901c881f39", - "b68d75b7ad23470e9d5d1aa3f7639ecd", - "b3887cde43174c40b5cc5575aba0f106", - "7070284d09a640f296ad5337698a5e68", - "83fb9bb42d734abe9878f7c4fcb212e9", - "e4139a008d574efb9a5b1cec6790d848", - "59abc07b8f594485a4cbe01360341705", - "cea605e546a14d70bfb23cf6568eee27", - "c269d4210e754a75a45e4995e4f9c3b5", - "4b4984daa68a4cd6953539e58b763bdb", - "0fe578cb04654fae89322571049c48e7", - "89d31e1e5f99473485f4025971ed6a1d", - "4c3312c6902e4436a5368f1e86eed65a", - "91930c1187a04a91b4c59e0ceb883d56", - "3abd5ba4771248d796a890b8ed055f01", - "25034a9f750c442599809bed8f47a029", - "1f2594d50c8c4df6ada87486ae897f58", - "7d35cb7d0127409a9dc8b9203b228c79", - "7475e328a906408492734428a2d5157d", - "20aa9ff64ac5483095c849a35676958e", - "99dbd39ad800493aa21656eaba325c68", - "b3591d13bc4647b4b122244686f01793" - ] - }, - "id": "VrIfrgGNj6WQ", - "outputId": "4f261007-bb01-48b0-8ef6-7e289f305fd8" - }, - "source": [ - "from datasets import load_dataset\n", - "\n", - "data = load_dataset(\"GEM/squad_v2\")" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "e4c1e861f8434fa29cff33f367c61d7a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=0.0, description='Downloading', max=5020.0, style=ProgressStyle(description…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Using custom data configuration default\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Downloading and preparing dataset squad_v2/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/squad_v2/default/0.0.0/f5f48a1a69d6d37fb09e1d978247e78f1885a13ac6f4ad4c8c6388cb79c76cdd...\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "8fce5b95f6db4c13a99886bb178e4c1d", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=0.0, description='Downloading', max=101226421.0, style=ProgressStyle(descri…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "90e1a383e3354125bd158c5952920ad3", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=0.0, description='Downloading', max=43457905.0, style=ProgressStyle(descrip…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "8307844b3fda4eb68eebc048c5f9eb11", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=0.0, description='Downloading', max=14480863.0, style=ProgressStyle(descrip…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "9886e2d3e8114db39cc4adf098a50be5", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "59abc07b8f594485a4cbe01360341705", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "3abd5ba4771248d796a890b8ed055f01", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dataset squad_v2 downloaded and prepared to /root/.cache/huggingface/datasets/squad_v2/default/0.0.0/f5f48a1a69d6d37fb09e1d978247e78f1885a13ac6f4ad4c8c6388cb79c76cdd. Subsequent calls will reuse this data.\n" - ] - } - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "Dataset squad_v2 downloaded and prepared to /home/mphasis.abinaya/.cache/huggingface/datasets/squad_v2/default/0.0.0/f5f48a1a69d6d37fb09e1d978247e78f1885a13ac6f4ad4c8c6388cb79c76cdd. Subsequent calls will reuse this data.\n" + ] + } + ], + "source": [ + "from datasets import load_dataset\n", + "\n", + "data = load_dataset(\"GEM/squad_v2\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "TpkLKbsvgeQp" + }, + "source": [ + "## Explore data structure" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "9TononzpkSc2", + "outputId": "6ceb023f-91e8-4485-a214-4781469d2c19" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "TpkLKbsvgeQp" - }, - "source": [ - "## Explore data structure" + "data": { + "text/plain": [ + "DatasetDict({\n", + " train: Dataset({\n", + " features: ['gem_id', 'id', 'title', 'context', 'question', 'answers'],\n", + " num_rows: 116397\n", + " })\n", + " validation: Dataset({\n", + " features: ['gem_id', 'id', 'title', 'context', 'question', 'answers'],\n", + " num_rows: 11873\n", + " })\n", + " test: Dataset({\n", + " features: ['gem_id', 'id', 'title', 'context', 'question', 'answers'],\n", + " num_rows: 13922\n", + " })\n", + "})" ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "data" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jWaFVlMtg3iG" + }, + "source": [ + "## Retrieve one entry from a train subset" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "D0Q3gMyMkcxt", + "outputId": "16531896-0184-43f3-fd47-bf97ce69c662" + }, + "outputs": [ { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "9TononzpkSc2", - "outputId": "6ceb023f-91e8-4485-a214-4781469d2c19" - }, - "source": [ - "data" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "text/plain": [ - "DatasetDict({\n", - " train: Dataset({\n", - " features: ['gem_id', 'id', 'title', 'context', 'question', 'answers'],\n", - " num_rows: 90403\n", - " })\n", - " validation: Dataset({\n", - " features: ['gem_id', 'id', 'title', 'context', 'question', 'answers'],\n", - " num_rows: 11873\n", - " })\n", - " test: Dataset({\n", - " features: ['gem_id', 'id', 'title', 'context', 'question', 'answers'],\n", - " num_rows: 39916\n", - " })\n", - "})" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } + "data": { + "text/plain": [ + "{'answers': {'answer_start': [59], 'text': ['the Republic of Guinea-Bissau']},\n", + " 'context': 'Guinea-Bissau (i/ˈɡɪni bɪˈsaʊ/, GI-nee-bi-SOW), officially the Republic of Guinea-Bissau (Portuguese: República da Guiné-Bissau, pronounced: [ʁeˈpublikɐ dɐ ɡiˈnɛ biˈsaw]), is a country in West Africa. It covers 36,125 square kilometres (13,948 sq mi) with an estimated population of 1,704,000.',\n", + " 'gem_id': 'gem-squad_v2-train-0',\n", + " 'id': '56f89ee99b226e1400dd0cd5',\n", + " 'question': 'What is the official name for Guinea-Bissau?',\n", + " 'title': 'Guinea-Bissau'}" ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "train_instance = data['train'][0]\n", + "train_instance" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "QMJXgYtEhQkI" + }, + "source": [ + "## Retrieve a target sentence from this entry object" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 35 }, + "id": "_vwM1nq2k_U3", + "outputId": "b7e28d45-f2d1-4c5c-a334-007fcf99ab85" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "jWaFVlMtg3iG" - }, - "source": [ - "## Retrieve one entry from a train subset" + "data": { + "text/plain": [ + "'What is the official name for Guinea-Bissau?'" ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sentence = train_instance.get(\"question\")\n", + "sentence" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "gjXQnhLShpin" + }, + "source": [ + "# 3. Test the filter" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "YpLi1-9Thyxk" + }, + "source": [ + "## Load a filter class from a corresponding ditectory and try the example from its ReadMe" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "GxpwSB9Uiim3", + "outputId": "c8edeaed-6a90-4772-cbb0-14b5461fc5f9" + }, + "outputs": [ { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "D0Q3gMyMkcxt", - "outputId": "16531896-0184-43f3-fd47-bf97ce69c662" - }, - "source": [ - "train_instance = data['train'][0]\n", - "train_instance" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "text/plain": [ - "{'answers': {'answer_start': [18], 'text': ['Dublin, Ireland']},\n", - " 'context': \"Burke was born in Dublin, Ireland. His mother Mary née Nagle (c. 1702 – 1770) was a Roman Catholic who hailed from a déclassé County Cork family (and a cousin of Nano Nagle), whereas his father, a successful solicitor, Richard (died 1761), was a member of the Church of Ireland; it remains unclear whether this is the same Richard Burke who converted from Catholicism. The Burke dynasty descends from an Anglo-Norman knight surnamed de Burgh (latinised as de Burgo) who arrived in Ireland in 1185 following Henry II of England's 1171 invasion of Ireland.\",\n", - " 'gem_id': 'gem-squad_v2-train-0',\n", - " 'id': '572699c4dd62a815002e8ab2',\n", - " 'question': 'Where was Burke born?',\n", - " 'title': 'Edmund_Burke'}" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "False\n", + "True\n", + "False\n", + "False\n", + "False\n", + "False\n" + ] + } + ], + "source": [ + "# QuestionFilter \n", + "from filters.question_filter import *\n", + "\n", + "f1 = WhereQuestion()\n", + "f2 = WhatQuestion()\n", + "f3 = WhoQuestion()\n", + "f4 = WhichQuestion()\n", + "f5 = WhyQuestion()\n", + "f6 = WhenQuestion()\n", + "filter_obj = [f1, f2, f3, f4, f5, f6] # question filter\n", + "for f in filter_obj:\n", + " print(f.filter(question=sentence))" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "KgMK5NZ3iIMc" + }, + "source": [ + "## Take a subset of target sentences from CommonGem dataset \n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "jM8b6hQ1rG_w", + "outputId": "36be13fe-85bb-417d-82d4-97687d1f4ab0" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "QMJXgYtEhQkI" - }, - "source": [ - "## Retrieve a target sentence from this entry object" + "data": { + "text/plain": [ + "['What is the official name for Guinea-Bissau?',\n", + " 'Where is Guinea-Bissau located?',\n", + " 'How many square miles is Guinea-Bissau?',\n", + " 'What is the estimated population of Guinea-Bissau?',\n", + " 'How many kilometers does Guinea-Bissau cover?',\n", + " 'What kingdom was Guinea-Bissau once part of?',\n", + " 'What empire was Guinea-Bissau once part of?',\n", + " 'What year was Guinea-Bissau declared independent?',\n", + " 'What country did Guinea-Bissau seek to differentiate itself from?',\n", + " 'Guinea-Bissau has a history of what since independence?',\n", + " 'What percentage of the population speaks Portuguese?',\n", + " 'What percentage of the population speaks Crioulo?',\n", + " 'What are the two main religions?',\n", + " 'What is their gross domestic product status?',\n", + " 'What is the minority religion?',\n", + " 'What Islamic organization does Guinea-Bissau belong to?',\n", + " 'What Portuguese organization does Guinea-Bissau belong to?',\n", + " 'What West African organization does Guinea-Bissau belong to?',\n", + " 'What South Atlantic organization does Guinea-Bissau belong to?',\n", + " 'What Latin organization does Guinea-Bissau belong to?',\n", + " 'What area was known as the Slave Coast?',\n", + " 'Who exported African slaves to the western hemisphere?',\n", + " 'What kingdom was Guinea-Bissau once a part of?',\n", + " 'How long did the Mali Empire persist?',\n", + " 'Who traded slaves into the Middle East?',\n", + " \"When was Alvise Cadamosto's voyage?\",\n", + " \"When was Eustache de la Fosse's voyage?\",\n", + " 'What was the name of the Portuguese explorer?',\n", + " \"What river did Diogo Cao reach in the 1480's?\",\n", + " 'What country is about 4200 km from Guinea-Bissau?',\n", + " 'What areas were the first places colonized by the Portuguese?',\n", + " 'When did the Portuguese first set up trading posts in Guinea-Bissau?',\n", + " 'When did the Portuguese explore the interior of Guinea-Bissau?',\n", + " 'Who controlled the inland trade in Guinea-Bissau during this time?',\n", + " 'What ports were the Portuguese restricted to?',\n", + " 'Who tried to establish a rival foothold at Bolama?',\n", + " 'When was a rival foothold attempted at Bolama?',\n", + " 'Who regarded Bolama as their own in the 19th century?',\n", + " 'What other area did the Portuguese regard as their special territory?',\n", + " 'What rival did the Portuguese fend off in Guinea-Bissau?',\n", + " 'What group started an armed rebellion in Guinea-Bissau?',\n", + " 'When did the armed rebellion begin?',\n", + " 'Who was the leader of the armed rebellion?',\n", + " 'Who supplied doctors and technicians to the rebels?',\n", + " 'When was Cabral assassinated?',\n", + " 'When was independence declared?',\n", + " 'What date was independence considered universal? ',\n", + " 'What event caused the recognition to be universal?',\n", + " 'Where did a coup take place?',\n", + " 'Who was overthrown in the coup?',\n", + " 'Who was the first President of Guinea-Bissau?',\n", + " 'How many Guinean soldiers did the PAIGC kill?',\n", + " 'Where did one of the massacres occur?',\n", + " 'When did the PAIGC acknowledge the executions?',\n", + " 'Where were the soldiers buried?',\n", + " 'Who controlled the country prior to 1984?',\n", + " 'When were the first multi-party elections held?',\n", + " 'What led to the Guinea-Bissau Civil War?',\n", + " 'When was the president ousted?',\n", + " 'Who was elected president in the 2000 election?',\n", + " 'When was a military coup conducted?',\n", + " 'Who did the military arrest?',\n", + " 'When were legislative elections held?',\n", + " 'When did the mutiny of military factions occur?',\n", + " 'Who died in the mutiny?',\n", + " 'After the coup, when were presidential elections held?',\n", + " 'At that time, who ran claiming to be the legitimate president of the country?',\n", + " 'Who won the election?',\n", + " 'Who did Vieira beat in a runoff election?',\n", + " 'When was Vieira, a former president, deposed?',\n", + " 'What was reported to be entering the country prior to the election?',\n", + " 'What type of \"disturbances\" were reported during the campaign?',\n", + " 'How did foreign election monitors describe the election?',\n", + " 'What year was the election held?',\n", + " 'Where the election monitors local, or foreign?',\n", + " 'When was the parliamentary election held?',\n", + " 'Who won a strong majority in the election?',\n", + " 'How many seats did PAIGC win in the election?',\n", + " 'Whose residence was attacked by members of the armed forces?',\n", + " 'When did the attack on the residence occur?',\n", + " 'Who was assassinated on 2 March 2009?',\n", + " 'Who was assassinated on 1 March 2009?',\n", + " 'Who pledged to respect the constitutional order of succession?',\n", + " 'Who was appointed interim president?',\n", + " 'Who won the election in June 2009?',\n", + " \"When was a coup d'etat staged?\",\n", + " \"Who staged the coup d'etat?\",\n", + " \"Who assumed control of the country after the coup d'etat?\",\n", + " 'Who did Kuruma negotiate with?',\n", + " \"What was Kuruma's former position?\",\n", + " 'What country is listed as a republic?',\n", + " 'When had the government been highly centralized?',\n", + " 'When was multi-party governance established?',\n", + " 'Who is the head of state?',\n", + " 'Who is the head of government?',\n", + " 'How many members compose the legislature?',\n", + " 'Is the legislature bicameral or unicameral?',\n", + " 'How long do members serve in the legislature?',\n", + " 'What is the head of the judicial system?',\n", + " 'How many justices are on the Supreme Court?']" ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def get_sentences(split_name, num_iter):\n", + " sentences = []\n", + " for i in range(num_iter):\n", + " sentence = data[split_name][i].get(\"question\")\n", + " sentences.append(sentence)\n", + " return sentences\n", + "\n", + "sentences = get_sentences('train', 100)\n", + "sentences" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "itxrvpogigSD" + }, + "source": [ + "## Apply a filter to this small subset" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "vZN-yXquuP-j", + "outputId": "2f6e8697-5642-44ee-b3fc-cb433988ee58" + }, + "outputs": [ { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 35 - }, - "id": "_vwM1nq2k_U3", - "outputId": "b7e28d45-f2d1-4c5c-a334-007fcf99ab85" - }, - "source": [ - "sentence = train_instance.get(\"question\")\n", - "sentence" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "application/vnd.google.colaboratory.intrinsic+json": { - "type": "string" - }, - "text/plain": [ - "'Where was Burke born?'" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "[False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, True, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]\n", + "[True, False, False, True, False, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, False, True, False, False, False, False, True, True, True, True, False, False, False, True, False, False, False, True, True, True, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, True, True, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, True, False]\n", + "[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, True, False, False, False, False, False, False, False, False, True, False, True, False, True, False, False, False, False, True, True, False, False, False, False, False, True, True, False, False, False, False, True, False, False, False, True, False, True, False, False, True, False, True, True, True, False, False, False, False, False, False, False, True, False, False, False, True, True, True, True, True, False, True, True, True, False, False, False, False, True, True, False, False, False, False, False]\n", + "[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]\n", + "[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]\n", + "[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, False, False, False, False, True, True, False, False, False, True, False, False, False, False, True, False, False, True, True, False, False, False, False, False, False, False, True, False, False, True, False, True, False, True, False, True, True, False, True, False, False, False, True, False, False, False, False, False, True, False, False, False, True, False, False, False, False, False, True, False, False, False, False, False, True, True, False, False, False, False, False, False, False]\n" + ] + } + ], + "source": [ + "for f in filter_obj:\n", + " print([f.filter(question=entry) for entry in sentences])" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "UUVKSJuhirRX" + }, + "source": [ + "## Explore statistics which makes a filter returning the presence of gender bias" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "98iL8OjXuliC", + "outputId": "94901909-cf15-4b04-c7df-7eaa76d84c47" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "gjXQnhLShpin" - }, - "source": [ - "# 3. Test the filter" - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "WhereQuestion flagged questions : 5\n", + "WhatQuestion flagged questions : 36\n", + "WhoQuestion flagged questions : 27\n", + "WhichQuestion flagged questions : 0\n", + "WhyQuestion flagged questions : 0\n", + "WhenQuestion flagged questions : 21\n" + ] + } + ], + "source": [ + "def get_stats(text, filter_obj):\n", + " for f in filter_obj:\n", + " print(f\"{f.__class__.__name__} flagged questions : {sum([f.filter(question=entry) for entry in sentences])}\")\n", + "\n", + "get_stats(sentences, filter_obj)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "x8Fyq4Qui5eU" + }, + "source": [ + "## Retrieve the sentences, corresponding to the statistics" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "R3qw6zORu-TI", + "outputId": "b51711c7-9598-4ca0-cfee-8c0c01e829cd" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "YpLi1-9Thyxk" - }, - "source": [ - "## Load a filter class from a corresponding ditectory and try the example from its ReadMe" + "data": { + "text/plain": [ + "[{'WhereQuestion': ['Where is Guinea-Bissau located?',\n", + " 'Where did a coup take place?',\n", + " 'Where did one of the massacres occur?',\n", + " 'Where were the soldiers buried?',\n", + " 'Where the election monitors local, or foreign?']},\n", + " {'WhatQuestion': ['What is the official name for Guinea-Bissau?',\n", + " 'What is the estimated population of Guinea-Bissau?',\n", + " 'What kingdom was Guinea-Bissau once part of?',\n", + " 'What empire was Guinea-Bissau once part of?',\n", + " 'What year was Guinea-Bissau declared independent?',\n", + " 'What country did Guinea-Bissau seek to differentiate itself from?',\n", + " 'Guinea-Bissau has a history of what since independence?',\n", + " 'What percentage of the population speaks Portuguese?',\n", + " 'What percentage of the population speaks Crioulo?',\n", + " 'What are the two main religions?',\n", + " 'What is their gross domestic product status?',\n", + " 'What is the minority religion?',\n", + " 'What Islamic organization does Guinea-Bissau belong to?',\n", + " 'What Portuguese organization does Guinea-Bissau belong to?',\n", + " 'What West African organization does Guinea-Bissau belong to?',\n", + " 'What South Atlantic organization does Guinea-Bissau belong to?',\n", + " 'What Latin organization does Guinea-Bissau belong to?',\n", + " 'What area was known as the Slave Coast?',\n", + " 'What kingdom was Guinea-Bissau once a part of?',\n", + " 'What was the name of the Portuguese explorer?',\n", + " \"What river did Diogo Cao reach in the 1480's?\",\n", + " 'What country is about 4200 km from Guinea-Bissau?',\n", + " 'What areas were the first places colonized by the Portuguese?',\n", + " 'What ports were the Portuguese restricted to?',\n", + " 'What other area did the Portuguese regard as their special territory?',\n", + " 'What rival did the Portuguese fend off in Guinea-Bissau?',\n", + " 'What group started an armed rebellion in Guinea-Bissau?',\n", + " 'What date was independence considered universal? ',\n", + " 'What event caused the recognition to be universal?',\n", + " 'What led to the Guinea-Bissau Civil War?',\n", + " 'What was reported to be entering the country prior to the election?',\n", + " 'What type of \"disturbances\" were reported during the campaign?',\n", + " 'What year was the election held?',\n", + " \"What was Kuruma's former position?\",\n", + " 'What country is listed as a republic?',\n", + " 'What is the head of the judicial system?']},\n", + " {'WhoQuestion': ['Who exported African slaves to the western hemisphere?',\n", + " 'Who traded slaves into the Middle East?',\n", + " 'Who controlled the inland trade in Guinea-Bissau during this time?',\n", + " 'Who tried to establish a rival foothold at Bolama?',\n", + " 'Who regarded Bolama as their own in the 19th century?',\n", + " 'Who was the leader of the armed rebellion?',\n", + " 'Who supplied doctors and technicians to the rebels?',\n", + " 'Who was overthrown in the coup?',\n", + " 'Who was the first President of Guinea-Bissau?',\n", + " 'Who controlled the country prior to 1984?',\n", + " 'Who was elected president in the 2000 election?',\n", + " 'Who did the military arrest?',\n", + " 'Who died in the mutiny?',\n", + " 'At that time, who ran claiming to be the legitimate president of the country?',\n", + " 'Who won the election?',\n", + " 'Who did Vieira beat in a runoff election?',\n", + " 'Who won a strong majority in the election?',\n", + " 'Who was assassinated on 2 March 2009?',\n", + " 'Who was assassinated on 1 March 2009?',\n", + " 'Who pledged to respect the constitutional order of succession?',\n", + " 'Who was appointed interim president?',\n", + " 'Who won the election in June 2009?',\n", + " \"Who staged the coup d'etat?\",\n", + " \"Who assumed control of the country after the coup d'etat?\",\n", + " 'Who did Kuruma negotiate with?',\n", + " 'Who is the head of state?',\n", + " 'Who is the head of government?']},\n", + " {'WhichQuestion': []},\n", + " {'WhyQuestion': []},\n", + " {'WhenQuestion': [\"When was Alvise Cadamosto's voyage?\",\n", + " \"When was Eustache de la Fosse's voyage?\",\n", + " 'When did the Portuguese first set up trading posts in Guinea-Bissau?',\n", + " 'When did the Portuguese explore the interior of Guinea-Bissau?',\n", + " 'When was a rival foothold attempted at Bolama?',\n", + " 'When did the armed rebellion begin?',\n", + " 'When was Cabral assassinated?',\n", + " 'When was independence declared?',\n", + " 'When did the PAIGC acknowledge the executions?',\n", + " 'When were the first multi-party elections held?',\n", + " 'When was the president ousted?',\n", + " 'When was a military coup conducted?',\n", + " 'When were legislative elections held?',\n", + " 'When did the mutiny of military factions occur?',\n", + " 'After the coup, when were presidential elections held?',\n", + " 'When was Vieira, a former president, deposed?',\n", + " 'When was the parliamentary election held?',\n", + " 'When did the attack on the residence occur?',\n", + " \"When was a coup d'etat staged?\",\n", + " 'When had the government been highly centralized?',\n", + " 'When was multi-party governance established?']}]" ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def get_phrases(sentences, filter_obj):\n", + " group = []\n", + " for f in filter_obj:\n", + " sent_list = {}\n", + " sent_list[f.__class__.__name__] = [entry for entry in sentences if f.filter(question=entry)]\n", + " group.append(sent_list)\n", + " return group\n", + "\n", + "grouped_list = get_phrases(sentences, filter_obj)\n", + "grouped_list" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "id": "ecA9wIMZCQHX" + }, + "outputs": [], + "source": [ + "def create_filtered(split_name, num_iter, grouped_list):\n", + " filtered_object = {'QuestionFilter':{}}\n", + " for group in grouped_list:\n", + " id_list = {}\n", + " id_list[list(group)[0]] = [data[split_name][i].get(\"gem_id\") for i in range(num_iter) if data[split_name][i].get(\"question\") in group[list(group)[0]]]\n", + " filtered_object['QuestionFilter'].update(id_list) \n", + " return filtered_object\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "H1UQKf2dHctt" + }, + "source": [ + "## Create final object with filtered data" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "_neZXkvnFumE", + "outputId": "f9ba67c6-979c-431b-9b10-12c9ea6d7394" + }, + "outputs": [ { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "GxpwSB9Uiim3", - "outputId": "c8edeaed-6a90-4772-cbb0-14b5461fc5f9" - }, - "source": [ - "from filters.question_filter import *\n", - "\n", - "f1 = WhereQuestion()\n", - "f2 = WhatQuestion()\n", - "f3 = WhoQuestion()\n", - "f4 = WhichQuestion()\n", - "f5 = WhyQuestion()\n", - "f6 = WhenQuestion()\n", - "filter_obj = [f1, f2, f3, f4, f5, f6]\n", - "for f in filter_obj:\n", - " print(f.filter(question=sentence))" - ], - "execution_count": null, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "True\n", - "False\n", - "False\n", - "False\n", - "False\n", - "False\n" - ] - } + "data": { + "text/plain": [ + "{'QuestionFilter': {'WhereQuestion': ['gem-squad_v2-train-1',\n", + " 'gem-squad_v2-train-48',\n", + " 'gem-squad_v2-train-52',\n", + " 'gem-squad_v2-train-54',\n", + " 'gem-squad_v2-train-74'],\n", + " 'WhatQuestion': ['gem-squad_v2-train-0',\n", + " 'gem-squad_v2-train-3',\n", + " 'gem-squad_v2-train-5',\n", + " 'gem-squad_v2-train-6',\n", + " 'gem-squad_v2-train-7',\n", + " 'gem-squad_v2-train-8',\n", + " 'gem-squad_v2-train-9',\n", + " 'gem-squad_v2-train-10',\n", + " 'gem-squad_v2-train-11',\n", + " 'gem-squad_v2-train-12',\n", + " 'gem-squad_v2-train-13',\n", + " 'gem-squad_v2-train-14',\n", + " 'gem-squad_v2-train-15',\n", + " 'gem-squad_v2-train-16',\n", + " 'gem-squad_v2-train-17',\n", + " 'gem-squad_v2-train-18',\n", + " 'gem-squad_v2-train-19',\n", + " 'gem-squad_v2-train-20',\n", + " 'gem-squad_v2-train-22',\n", + " 'gem-squad_v2-train-27',\n", + " 'gem-squad_v2-train-28',\n", + " 'gem-squad_v2-train-29',\n", + " 'gem-squad_v2-train-30',\n", + " 'gem-squad_v2-train-34',\n", + " 'gem-squad_v2-train-38',\n", + " 'gem-squad_v2-train-39',\n", + " 'gem-squad_v2-train-40',\n", + " 'gem-squad_v2-train-46',\n", + " 'gem-squad_v2-train-47',\n", + " 'gem-squad_v2-train-57',\n", + " 'gem-squad_v2-train-70',\n", + " 'gem-squad_v2-train-71',\n", + " 'gem-squad_v2-train-73',\n", + " 'gem-squad_v2-train-89',\n", + " 'gem-squad_v2-train-90',\n", + " 'gem-squad_v2-train-98'],\n", + " 'WhoQuestion': ['gem-squad_v2-train-21',\n", + " 'gem-squad_v2-train-24',\n", + " 'gem-squad_v2-train-33',\n", + " 'gem-squad_v2-train-35',\n", + " 'gem-squad_v2-train-37',\n", + " 'gem-squad_v2-train-42',\n", + " 'gem-squad_v2-train-43',\n", + " 'gem-squad_v2-train-49',\n", + " 'gem-squad_v2-train-50',\n", + " 'gem-squad_v2-train-55',\n", + " 'gem-squad_v2-train-59',\n", + " 'gem-squad_v2-train-61',\n", + " 'gem-squad_v2-train-64',\n", + " 'gem-squad_v2-train-66',\n", + " 'gem-squad_v2-train-67',\n", + " 'gem-squad_v2-train-68',\n", + " 'gem-squad_v2-train-76',\n", + " 'gem-squad_v2-train-80',\n", + " 'gem-squad_v2-train-81',\n", + " 'gem-squad_v2-train-82',\n", + " 'gem-squad_v2-train-83',\n", + " 'gem-squad_v2-train-84',\n", + " 'gem-squad_v2-train-86',\n", + " 'gem-squad_v2-train-87',\n", + " 'gem-squad_v2-train-88',\n", + " 'gem-squad_v2-train-93',\n", + " 'gem-squad_v2-train-94'],\n", + " 'WhichQuestion': [],\n", + " 'WhyQuestion': [],\n", + " 'WhenQuestion': ['gem-squad_v2-train-25',\n", + " 'gem-squad_v2-train-26',\n", + " 'gem-squad_v2-train-31',\n", + " 'gem-squad_v2-train-32',\n", + " 'gem-squad_v2-train-36',\n", + " 'gem-squad_v2-train-41',\n", + " 'gem-squad_v2-train-44',\n", + " 'gem-squad_v2-train-45',\n", + " 'gem-squad_v2-train-53',\n", + " 'gem-squad_v2-train-56',\n", + " 'gem-squad_v2-train-58',\n", + " 'gem-squad_v2-train-60',\n", + " 'gem-squad_v2-train-62',\n", + " 'gem-squad_v2-train-63',\n", + " 'gem-squad_v2-train-65',\n", + " 'gem-squad_v2-train-69',\n", + " 'gem-squad_v2-train-75',\n", + " 'gem-squad_v2-train-79',\n", + " 'gem-squad_v2-train-85',\n", + " 'gem-squad_v2-train-91',\n", + " 'gem-squad_v2-train-92']}}" ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "filtered_object = create_filtered(\"train\", len(sentences), grouped_list)\n", + "filtered_object" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "1grVKh4ZHjtu" + }, + "source": [ + "## Store the object in a json file" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "id": "mhsiQWcAFo1H" + }, + "outputs": [], + "source": [ + "import json\n", + "\n", + "with open('question_filter_train.json', 'w') as outfile:\n", + " json.dump(filtered_object, outfile)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Ybx2Dw51vS-z" + }, + "source": [ + "# 4. Apply the process to multiple entries" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "id": "dmDf962j3Ar0" + }, + "outputs": [], + "source": [ + "sentences = get_sentences('train', len(data[\"train\"]))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "V4-8LRjD3erW", + "outputId": "3954ed61-37a4-4f95-e628-bbd97d2d55ae" + }, + "outputs": [], + "source": [ + "get_stats(sentences, filter_obj)" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "id": "faO5Dh7Q3nZo" + }, + "outputs": [], + "source": [ + "grouped_list = get_phrases(sentences, filter_obj)" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "id": "INFDYWULH1Gg" + }, + "outputs": [], + "source": [ + "filtered_object = create_filtered(\"train\", len(data[\"train\"]), grouped_list)" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "id": "dbBRKpgCMnCq" + }, + "outputs": [], + "source": [ + "with open('challenge_sets/challenge_question_filter_train.json', 'w') as outfile:\n", + " json.dump(filtered_object, outfile)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Filter out answerable and non-answerable questions\n", + "This filteration doesn't use NL-Augmenter's filters. The idea here is to separate out the answerable questions (part of SQuAD1.1) from the non-answerable ones (part of SQuAD2.0)." + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": {}, + "outputs": [], + "source": [ + "# Filter answerable questions from non-answerable ones\n", + "def create_filtered_data(data, split):\n", + " filtered_object = {'AnswerFilter': {}}\n", + " answerable_question = {'AnswerableQuestion': []}\n", + " non_answerable_question = {'NonAnswerableQuestion': []}\n", + " \n", + " for entry in data[split]:\n", + " if len(entry['answers']['answer_start']) == 0:\n", + " non_answerable_question['NonAnswerableQuestion'].append(entry['gem_id'])\n", + " else:\n", + " answerable_question['AnswerableQuestion'].append(entry['gem_id']) \n", + " filtered_object['AnswerFilter'].update(answerable_question)\n", + " filtered_object['AnswerFilter'].update(non_answerable_question)\n", + " return filtered_object" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": {}, + "outputs": [], + "source": [ + "filtered_object = create_filtered_data(data, 'train')" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": {}, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "KgMK5NZ3iIMc" - }, - "source": [ - "## Take a subset of target sentences from CommonGem dataset \n" - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "Answerable questions : 77580\n", + "Non-Answerable questions : 38817\n" + ] + } + ], + "source": [ + "def get_stats(filtered_object):\n", + " print(f\"Answerable questions : {len(filtered_object['AnswerFilter']['AnswerableQuestion'])}\")\n", + " print(f\"Non-Answerable questions : {len(filtered_object['AnswerFilter']['NonAnswerableQuestion'])}\")\n", + " \n", + "get_stats(filtered_object)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": {}, + "outputs": [], + "source": [ + "with open('challenge_sets/challenge_answer_filter_train.json', 'w') as outfile:\n", + " json.dump(filtered_object, outfile)" + ] + } + ], + "metadata": { + "colab": { + "collapsed_sections": [], + "name": "GEM_Hackathon_2021_filters_tutorial.ipynb", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.5" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "07386fcb9b8a4a25b4a06136cf2d69c5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_29f4ba3028a3498ab802f96fb1c42fb8", + "placeholder": "​", + "style": "IPY_MODEL_fa507001884643a387d7e0a46d498604", + "value": " 101M/101M [00:07<00:00, 14.0MB/s]" + } }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "jM8b6hQ1rG_w", - "outputId": "36be13fe-85bb-417d-82d4-97687d1f4ab0" - }, - "source": [ - "def get_sentences(split_name, num_iter):\n", - " sentences = []\n", - " for i in range(num_iter):\n", - " sentence = data[split_name][i].get(\"question\")\n", - " sentences.append(sentence)\n", - " return sentences\n", - "\n", - "sentences = get_sentences('train', 100)\n", - "sentences" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "text/plain": [ - "['Where was Burke born?',\n", - " \"What was Burke's mother's maiden name?\",\n", - " \"When did Burke's mother die?\",\n", - " \"When did Burke's father die?\",\n", - " \"When did Burke's ancestors arrive in Ireland?\",\n", - " 'What city was Mary nee Nagle born in?',\n", - " 'When was Richard Burke born?',\n", - " 'What is the latinised form of the last name Burke?',\n", - " 'When did Henry II invade England?',\n", - " 'Who converted into Catholicism?',\n", - " 'When did Burke begin attending Trinity College Dublin?',\n", - " 'What type of people did Trinity College Dublin not allow to earn degrees there?',\n", - " 'When did Edmund Burke start a debate club?',\n", - " \"What club did Edmund Burke's debate club merge with in 1770?\",\n", - " 'When did Edmund Burke graduate?',\n", - " 'When was Trinity College Dublin established?',\n", - " 'In what year did Trinity College ban Catholics?',\n", - " \"Who did Edmund Burke's Club split from?\",\n", - " 'What group of people did Middle Temple refuse to grant degrees to?',\n", - " 'What year did Burke abandon law?',\n", - " \"Which bishop didn't realize the satirical nature of Burke's book?\",\n", - " \"Which lord didn't realize the satirical nature of Burke's book?\",\n", - " \"When was the 2nd edition of Burke's book published?\",\n", - " 'Where did Burke make it clear that his book was a satire?',\n", - " 'What did Bolingbroke argue for?',\n", - " \"What did Lord Chesterfield believe Bolingbroke's arguments could also apply to?\",\n", - " \"What did critics particularly protest of Burke's work?\",\n", - " 'What did Burke note in the preface of the first edition of the book?',\n", - " \"Which bishop wrote the preface for Burke's book?\",\n", - " \"Who thought that Burke's imitation was too perfect to be effective ridicule?\",\n", - " \"Why did a few scholars think Burke hadn't intended his book as a satire yet later claimed it was a satire?\",\n", - " 'Whose principles did Burke imitate?',\n", - " \"What did Richard Hurd claim made Burke's satire perfect?\",\n", - " 'What is the name of one of the scholars who believe Burke wrote the Vindication in earnest?',\n", - " 'What is the name of the book Richard Hurd wrote?',\n", - " \"Why did Hurd believe Burke's imitation was near perfect?\",\n", - " 'Whose principles did L. Bol imitate?',\n", - " 'When did Burke sign a contract for a history of England?',\n", - " \"How many words long was Burke's history of England contracted to be?\",\n", - " \"How many pages long was Burke's history of England contracted to be?\",\n", - " \"When was Burke's history of England published?\",\n", - " \"Which author's history of England being published before Burke's might have dissuaded Burke from continuing his?\",\n", - " \"What is the name of David Hume's history?\",\n", - " \"What critic praised the Frenchness of Burke's text?\",\n", - " \"When was Hume's history of England published?\",\n", - " 'How long was the book Robert Dodsley wrote?',\n", - " \"How many words was Lord Acton's commentary?\",\n", - " 'What publication did Burke found?',\n", - " 'The Annual Register covered international events of what type?',\n", - " 'Burke was the only known writer for the Register until what year?',\n", - " 'Burke was the chief editor for the Register until at least what year?',\n", - " 'Who wrote a biography of Burke?',\n", - " 'What was founded the year before the contract?',\n", - " 'Whose biography did Burke write?',\n", - " 'When did Burke become the chief editor?',\n", - " \"Who wrote Dodsley's biography?\",\n", - " 'Dodsley was the only writer for the register until what year?',\n", - " \"What was William Gerard Hamilton's nickname?\",\n", - " \"Who was William Gerard Hamilton's private secretary?\",\n", - " \"When did Burke become the Prime Minister's private secretary?\",\n", - " 'Who invited Burke to join the Freemasons?',\n", - " 'What political party was Charles, Marquess of Rockingham in?',\n", - " \"What was Burke's nickname?\",\n", - " \"Who was Burke's secretary?\",\n", - " 'What country was Burke the Chief Secretary for?',\n", - " 'What year did Burke go with Hamilton to Dublin?',\n", - " 'When did Hamilton die?',\n", - " 'Who did Burke want constitutional limits on the power of?',\n", - " 'What type of institution did Burke think could offer opposition to abuses of power?',\n", - " 'What type of group were the \"king\\'s friends\"?',\n", - " \"What was Burke's most important publication about limiting royal power?\",\n", - " 'Who wanted to limit the powers of the political parties?',\n", - " 'What was the name of the paper the neo-Tories published?',\n", - " 'When did Burke take the leading role in the debate?',\n", - " 'What party did Burke believe would have strong principles?',\n", - " 'What were Burke and his friends nicknamed?',\n", - " 'What country did Burke propose restricting trade with?',\n", - " 'What city did Burke represent in parliament?',\n", - " 'When did Burke make a motion to restrict Irish trade?',\n", - " \"What was Bristol's most important industry?\",\n", - " 'What country did Burke wish to decrease trade with?',\n", - " \"What city supported Burke's decisions?\",\n", - " 'When was trade with Ireland originally restricted?',\n", - " 'Why did Burke say he acquiesced to his constituents?',\n", - " 'Where was Burke worried Britain might not win a war?',\n", - " 'How many reasons against violence did Burke present?',\n", - " 'How far away was the potential conflict Burke argued against?',\n", - " 'What area could the American colonists retreat to?',\n", - " 'Who did Burke think Britain could beat at war?',\n", - " 'What did Burke say was a victory?',\n", - " 'How many reasons in favor of the use of force did Burke present?',\n", - " 'What type of war did Burke endorse for the government?',\n", - " 'What geographical feature would prevent the Americans from retreating?',\n", - " 'When did Lord Bathurst die?',\n", - " 'When did an angel supposedly speak to Bathurst?',\n", - " 'What political position did Samuel Johnson say would soon poison America?',\n", - " 'When was Lord Bathurst born?',\n", - " \"In Samuel Johnson's writing, who appeared to a Whig?\",\n", - " 'What did Bathurst prophesy? ',\n", - " 'When did Samuel Johnson die?']" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ] + "0ad3dcd165ed43ad800fca8946d7716e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } }, - { - "cell_type": "markdown", - "metadata": { - "id": "itxrvpogigSD" - }, - "source": [ - "## Apply a filter to this small subset" - ] + "0fe578cb04654fae89322571049c48e7": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": "20px" + } }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "vZN-yXquuP-j", - "outputId": "2f6e8697-5642-44ee-b3fc-cb433988ee58" - }, - "source": [ - "for f in filter_obj:\n", - " print([f.filter(question=entry) for entry in sentences])" - ], - "execution_count": null, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]\n", - "[False, True, False, False, False, True, False, True, False, False, False, True, False, True, False, False, True, False, True, True, False, False, False, False, True, True, True, True, False, False, False, False, True, True, True, False, False, False, False, False, False, False, True, True, False, False, False, True, True, True, True, False, True, False, False, False, True, True, False, False, False, True, True, False, True, True, False, False, True, True, True, False, True, False, True, True, True, True, False, True, True, True, False, False, False, False, False, True, False, True, False, True, True, False, False, True, False, False, True, False]\n", - "[False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, True, False, False, True, False, True, False, False, True, False, False, False, True, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, True, False, False]\n", - "[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]\n", - "[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]\n", - "[False, False, True, True, True, False, True, False, True, False, True, False, True, False, True, True, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, True, False, False, False, True, False, False, False, False, False, False, False, False, False, True, False, False, False, False, True, False, False, False, False, False, False, True, False, False, False, False, False, False, True, False, False, False, False, True, False, False, False, True, False, False, False, False, False, False, False, False, False, False, True, True, False, True, False, False, True]\n" - ] - } - ] + "18e6b91315504e95b45faf94698b4ab5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } }, - { - "cell_type": "markdown", - "metadata": { - "id": "UUVKSJuhirRX" - }, - "source": [ - "## Explore statistics which makes a filter returning the presence of gender bias" - ] + "1f2594d50c8c4df6ada87486ae897f58": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_99dbd39ad800493aa21656eaba325c68", + "placeholder": "​", + "style": "IPY_MODEL_b3591d13bc4647b4b122244686f01793", + "value": "39916 examples [00:03, 8913.27 examples/s]" + } }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "98iL8OjXuliC", - "outputId": "94901909-cf15-4b04-c7df-7eaa76d84c47" - }, - "source": [ - "def get_stats(text, filter_obj):\n", - " for f in filter_obj:\n", - " print(f\"{f.__class__.__name__} flagged questions : {sum([f.filter(question=entry) for entry in sentences])}\")\n", - "\n", - "get_stats(sentences, filter_obj)" - ], - "execution_count": null, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WhereQuestion flagged questions : 3\n", - "WhatQuestion flagged questions : 45\n", - "WhoQuestion flagged questions : 13\n", - "WhichQuestion flagged questions : 4\n", - "WhyQuestion flagged questions : 3\n", - "WhenQuestion flagged questions : 23\n" - ] - } - ] + "20aa9ff64ac5483095c849a35676958e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } }, - { - "cell_type": "markdown", - "metadata": { - "id": "x8Fyq4Qui5eU" - }, - "source": [ - "## Retrieve the sentences, corresponding to the statistics" - ] + "249a2b434fa4421fbcaee04512306ef5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_56a75ac849ef4e22a02de0b56d05d13e", + "placeholder": "​", + "style": "IPY_MODEL_532c0b0e92ad4323bfada2ad17cd64c3", + "value": " 43.5M/43.5M [00:02<00:00, 20.4MB/s]" + } }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "R3qw6zORu-TI", - "outputId": "b51711c7-9598-4ca0-cfee-8c0c01e829cd" - }, - "source": [ - "def get_phrases(sentences, filter_obj):\n", - " group = []\n", - " for f in filter_obj:\n", - " sent_list = {}\n", - " sent_list[f.__class__.__name__] = [entry for entry in sentences if f.filter(question=entry)]\n", - " group.append(sent_list)\n", - " return group\n", - "\n", - "grouped_list = get_phrases(sentences, filter_obj)\n", - "grouped_list" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'WhereQuestion': ['Where was Burke born?',\n", - " 'Where did Burke make it clear that his book was a satire?',\n", - " 'Where was Burke worried Britain might not win a war?']},\n", - " {'WhatQuestion': [\"What was Burke's mother's maiden name?\",\n", - " 'What city was Mary nee Nagle born in?',\n", - " 'What is the latinised form of the last name Burke?',\n", - " 'What type of people did Trinity College Dublin not allow to earn degrees there?',\n", - " \"What club did Edmund Burke's debate club merge with in 1770?\",\n", - " 'In what year did Trinity College ban Catholics?',\n", - " 'What group of people did Middle Temple refuse to grant degrees to?',\n", - " 'What year did Burke abandon law?',\n", - " 'What did Bolingbroke argue for?',\n", - " \"What did Lord Chesterfield believe Bolingbroke's arguments could also apply to?\",\n", - " \"What did critics particularly protest of Burke's work?\",\n", - " 'What did Burke note in the preface of the first edition of the book?',\n", - " \"What did Richard Hurd claim made Burke's satire perfect?\",\n", - " 'What is the name of one of the scholars who believe Burke wrote the Vindication in earnest?',\n", - " 'What is the name of the book Richard Hurd wrote?',\n", - " \"What is the name of David Hume's history?\",\n", - " \"What critic praised the Frenchness of Burke's text?\",\n", - " 'What publication did Burke found?',\n", - " 'The Annual Register covered international events of what type?',\n", - " 'Burke was the only known writer for the Register until what year?',\n", - " 'Burke was the chief editor for the Register until at least what year?',\n", - " 'What was founded the year before the contract?',\n", - " 'Dodsley was the only writer for the register until what year?',\n", - " \"What was William Gerard Hamilton's nickname?\",\n", - " 'What political party was Charles, Marquess of Rockingham in?',\n", - " \"What was Burke's nickname?\",\n", - " 'What country was Burke the Chief Secretary for?',\n", - " 'What year did Burke go with Hamilton to Dublin?',\n", - " 'What type of institution did Burke think could offer opposition to abuses of power?',\n", - " 'What type of group were the \"king\\'s friends\"?',\n", - " \"What was Burke's most important publication about limiting royal power?\",\n", - " 'What was the name of the paper the neo-Tories published?',\n", - " 'What party did Burke believe would have strong principles?',\n", - " 'What were Burke and his friends nicknamed?',\n", - " 'What country did Burke propose restricting trade with?',\n", - " 'What city did Burke represent in parliament?',\n", - " \"What was Bristol's most important industry?\",\n", - " 'What country did Burke wish to decrease trade with?',\n", - " \"What city supported Burke's decisions?\",\n", - " 'What area could the American colonists retreat to?',\n", - " 'What did Burke say was a victory?',\n", - " 'What type of war did Burke endorse for the government?',\n", - " 'What geographical feature would prevent the Americans from retreating?',\n", - " 'What political position did Samuel Johnson say would soon poison America?',\n", - " 'What did Bathurst prophesy? ']},\n", - " {'WhoQuestion': ['Who converted into Catholicism?',\n", - " \"Who did Edmund Burke's Club split from?\",\n", - " \"Who thought that Burke's imitation was too perfect to be effective ridicule?\",\n", - " 'What is the name of one of the scholars who believe Burke wrote the Vindication in earnest?',\n", - " 'Who wrote a biography of Burke?',\n", - " \"Who wrote Dodsley's biography?\",\n", - " \"Who was William Gerard Hamilton's private secretary?\",\n", - " 'Who invited Burke to join the Freemasons?',\n", - " \"Who was Burke's secretary?\",\n", - " 'Who did Burke want constitutional limits on the power of?',\n", - " 'Who wanted to limit the powers of the political parties?',\n", - " 'Who did Burke think Britain could beat at war?',\n", - " \"In Samuel Johnson's writing, who appeared to a Whig?\"]},\n", - " {'WhichQuestion': [\"Which bishop didn't realize the satirical nature of Burke's book?\",\n", - " \"Which lord didn't realize the satirical nature of Burke's book?\",\n", - " \"Which bishop wrote the preface for Burke's book?\",\n", - " \"Which author's history of England being published before Burke's might have dissuaded Burke from continuing his?\"]},\n", - " {'WhyQuestion': [\"Why did a few scholars think Burke hadn't intended his book as a satire yet later claimed it was a satire?\",\n", - " \"Why did Hurd believe Burke's imitation was near perfect?\",\n", - " 'Why did Burke say he acquiesced to his constituents?']},\n", - " {'WhenQuestion': [\"When did Burke's mother die?\",\n", - " \"When did Burke's father die?\",\n", - " \"When did Burke's ancestors arrive in Ireland?\",\n", - " 'When was Richard Burke born?',\n", - " 'When did Henry II invade England?',\n", - " 'When did Burke begin attending Trinity College Dublin?',\n", - " 'When did Edmund Burke start a debate club?',\n", - " 'When did Edmund Burke graduate?',\n", - " 'When was Trinity College Dublin established?',\n", - " \"When was the 2nd edition of Burke's book published?\",\n", - " 'When did Burke sign a contract for a history of England?',\n", - " \"When was Burke's history of England published?\",\n", - " \"When was Hume's history of England published?\",\n", - " 'When did Burke become the chief editor?',\n", - " \"When did Burke become the Prime Minister's private secretary?\",\n", - " 'When did Hamilton die?',\n", - " 'When did Burke take the leading role in the debate?',\n", - " 'When did Burke make a motion to restrict Irish trade?',\n", - " 'When was trade with Ireland originally restricted?',\n", - " 'When did Lord Bathurst die?',\n", - " 'When did an angel supposedly speak to Bathurst?',\n", - " 'When was Lord Bathurst born?',\n", - " 'When did Samuel Johnson die?']}]" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ] + "25034a9f750c442599809bed8f47a029": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "info", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_7475e328a906408492734428a2d5157d", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_20aa9ff64ac5483095c849a35676958e", + "value": 1 + } }, - { - "cell_type": "code", - "metadata": { - "id": "ecA9wIMZCQHX" - }, - "source": [ - "def create_filtered(split_name, num_iter, grouped_list):\n", - " filtered_object = {'QuestionFilter':{}}\n", - " for group in grouped_list:\n", - " id_list = {}\n", - " id_list[list(group)[0]] = [data[split_name][i].get(\"gem_id\") for i in range(num_iter) if data[split_name][i].get(\"question\") in group[list(group)[0]]]\n", - " filtered_object['QuestionFilter'].update(id_list) \n", - " return filtered_object\n" + "29f4ba3028a3498ab802f96fb1c42fb8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "3abd5ba4771248d796a890b8ed055f01": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_25034a9f750c442599809bed8f47a029", + "IPY_MODEL_1f2594d50c8c4df6ada87486ae897f58" ], - "execution_count": null, - "outputs": [] + "layout": "IPY_MODEL_7d35cb7d0127409a9dc8b9203b228c79" + } }, - { - "cell_type": "markdown", - "metadata": { - "id": "H1UQKf2dHctt" - }, - "source": [ - "## Create final object with filtered data" - ] + "3bbe92c3974641b98d8ef5777dc491de": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_d77a514d39a14142a1c51a2e7d136565", + "placeholder": "​", + "style": "IPY_MODEL_e2f417a1a55a463297ee168f687a29d3", + "value": " 5.02k/5.02k [00:08<00:00, 616B/s]" + } }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "_neZXkvnFumE", - "outputId": "f9ba67c6-979c-431b-9b10-12c9ea6d7394" - }, - "source": [ - "filtered_object = create_filtered(\"train\", grouped_list)\n", - "filtered_object" - ], - "execution_count": null, - "outputs": [ - { - "data": { - "text/plain": [ - "{'QuestionFilter': {'WhatQuestion': ['gem-squad_v2-train-1',\n", - " 'gem-squad_v2-train-5',\n", - " 'gem-squad_v2-train-7'],\n", - " 'WhenQuestion': ['gem-squad_v2-train-2',\n", - " 'gem-squad_v2-train-3',\n", - " 'gem-squad_v2-train-4',\n", - " 'gem-squad_v2-train-6',\n", - " 'gem-squad_v2-train-8'],\n", - " 'WhereQuestion': ['gem-squad_v2-train-0'],\n", - " 'WhichQuestion': [],\n", - " 'WhoQuestion': ['gem-squad_v2-train-9'],\n", - " 'WhyQuestion': []}}" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ] + "4b4984daa68a4cd6953539e58b763bdb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } }, - { - "cell_type": "markdown", - "metadata": { - "id": "1grVKh4ZHjtu" - }, - "source": [ - "## Store the object in a json file" - ] + "4c3312c6902e4436a5368f1e86eed65a": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } }, - { - "cell_type": "code", - "metadata": { - "id": "mhsiQWcAFo1H" - }, - "source": [ - "import json\n", - "\n", - "with open('question_filter_train.json', 'w') as outfile:\n", - " json.dump(filtered_object, outfile)" + "532c0b0e92ad4323bfada2ad17cd64c3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5463eaab09e640ce851d457ffc3ba2bb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "56a75ac849ef4e22a02de0b56d05d13e": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "59abc07b8f594485a4cbe01360341705": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_cea605e546a14d70bfb23cf6568eee27", + "IPY_MODEL_c269d4210e754a75a45e4995e4f9c3b5" ], - "execution_count": null, - "outputs": [] + "layout": "IPY_MODEL_4b4984daa68a4cd6953539e58b763bdb" + } }, - { - "cell_type": "markdown", - "metadata": { - "id": "Ybx2Dw51vS-z" - }, - "source": [ - "# 4. Apply the process to multiple entries" - ] + "5feec27442e74914aa98c7b05a55af21": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } }, - { - "cell_type": "code", - "metadata": { - "id": "dmDf962j3Ar0" - }, - "source": [ - "sentences = get_sentences('validation', len(data[\"validation\"]))" + "7070284d09a640f296ad5337698a5e68": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } + }, + "7402db88b7eb43b38f347384a49b53ec": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } + }, + "7475e328a906408492734428a2d5157d": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": "20px" + } + }, + "7663b3bd79db43a1982c4c46d2d6a83a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } + }, + "7bf0345f9db84e468ccb58901c881f39": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_83fb9bb42d734abe9878f7c4fcb212e9", + "placeholder": "​", + "style": "IPY_MODEL_e4139a008d574efb9a5b1cec6790d848", + "value": "90403 examples [00:16, 15097.76 examples/s]" + } + }, + "7d35cb7d0127409a9dc8b9203b228c79": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "815255b488c745519de3e645e96d7d19": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "Downloading: 100%", + "description_tooltip": null, + "layout": "IPY_MODEL_85d410e7c9024609bd80a54b449093e6", + "max": 14480863, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7663b3bd79db43a1982c4c46d2d6a83a", + "value": 14480863 + } + }, + "8307844b3fda4eb68eebc048c5f9eb11": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_815255b488c745519de3e645e96d7d19", + "IPY_MODEL_9ec7464fe62d4f359fb007eb47fa2343" ], - "execution_count": 37, - "outputs": [] + "layout": "IPY_MODEL_5463eaab09e640ce851d457ffc3ba2bb" + } }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "V4-8LRjD3erW", - "outputId": "3954ed61-37a4-4f95-e628-bbd97d2d55ae" - }, - "source": [ - "get_stats(sentences, filter_obj)" + "83f25fd2658142e4a2be06e00a7966cb": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "Downloading: 100%", + "description_tooltip": null, + "layout": "IPY_MODEL_fc7335335b114e22b33db1a830ea90e4", + "max": 5020, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7402db88b7eb43b38f347384a49b53ec", + "value": 5020 + } + }, + "83fb9bb42d734abe9878f7c4fcb212e9": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "85d410e7c9024609bd80a54b449093e6": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "89d31e1e5f99473485f4025971ed6a1d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } + }, + "8fce5b95f6db4c13a99886bb178e4c1d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_bfb105f1cfdf4702a4822f207b927d1e", + "IPY_MODEL_07386fcb9b8a4a25b4a06136cf2d69c5" ], - "execution_count": 40, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "WhereQuestion flagged questions : 516\n", - "WhatQuestion flagged questions : 7498\n", - "WhoQuestion flagged questions : 1073\n", - "WhichQuestion flagged questions : 568\n", - "WhyQuestion flagged questions : 197\n", - "WhenQuestion flagged questions : 952\n" - ] - } - ] + "layout": "IPY_MODEL_e89ec92a3ae34d239e3b131fc240fc34" + } }, - { - "cell_type": "code", - "metadata": { - "id": "faO5Dh7Q3nZo" - }, - "source": [ - "grouped_list = get_phrases(sentences, filter_obj)" + "90e1a383e3354125bd158c5952920ad3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_99dd5c88984f4952ad65f5ba1e5becc2", + "IPY_MODEL_249a2b434fa4421fbcaee04512306ef5" ], - "execution_count": 41, - "outputs": [] + "layout": "IPY_MODEL_e9f93c50c219406a82f55127ad09b555" + } }, - { - "cell_type": "code", - "metadata": { - "id": "INFDYWULH1Gg" - }, - "source": [ - "filtered_object = create_filtered(\"validation\", len(data[\"validation\"]), grouped_list)" + "91930c1187a04a91b4c59e0ceb883d56": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "9886e2d3e8114db39cc4adf098a50be5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_ca1c50a7ea1c47469339a0eab4c32fb8", + "IPY_MODEL_7bf0345f9db84e468ccb58901c881f39" ], - "execution_count": 42, - "outputs": [] + "layout": "IPY_MODEL_b68d75b7ad23470e9d5d1aa3f7639ecd" + } }, - { - "cell_type": "code", - "metadata": { - "id": "dbBRKpgCMnCq" - }, - "source": [ - "with open('challenge_sets/challenge_question_filter_validation.json', 'w') as outfile:\n", - " json.dump(filtered_object, outfile)" + "99dbd39ad800493aa21656eaba325c68": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "99dd5c88984f4952ad65f5ba1e5becc2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "Downloading: 100%", + "description_tooltip": null, + "layout": "IPY_MODEL_a4812e4c447c4288bff063b6bd86ee66", + "max": 43457905, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c068b76648fa47b5a30c251c0630160c", + "value": 43457905 + } + }, + "9ec7464fe62d4f359fb007eb47fa2343": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5feec27442e74914aa98c7b05a55af21", + "placeholder": "​", + "style": "IPY_MODEL_18e6b91315504e95b45faf94698b4ab5", + "value": " 14.5M/14.5M [00:01<00:00, 10.5MB/s]" + } + }, + "a4812e4c447c4288bff063b6bd86ee66": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "b3591d13bc4647b4b122244686f01793": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "b3887cde43174c40b5cc5575aba0f106": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": "20px" + } + }, + "b68d75b7ad23470e9d5d1aa3f7639ecd": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "bfb105f1cfdf4702a4822f207b927d1e": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "Downloading: 100%", + "description_tooltip": null, + "layout": "IPY_MODEL_0ad3dcd165ed43ad800fca8946d7716e", + "max": 101226421, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d0e42ee4fc854b73b2b8929ff2a26cde", + "value": 101226421 + } + }, + "c068b76648fa47b5a30c251c0630160c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } + }, + "c269d4210e754a75a45e4995e4f9c3b5": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_4c3312c6902e4436a5368f1e86eed65a", + "placeholder": "​", + "style": "IPY_MODEL_91930c1187a04a91b4c59e0ceb883d56", + "value": "11873 examples [00:01, 110.35 examples/s]" + } + }, + "ca1c50a7ea1c47469339a0eab4c32fb8": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "info", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_b3887cde43174c40b5cc5575aba0f106", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7070284d09a640f296ad5337698a5e68", + "value": 1 + } + }, + "cea605e546a14d70bfb23cf6568eee27": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "info", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_0fe578cb04654fae89322571049c48e7", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_89d31e1e5f99473485f4025971ed6a1d", + "value": 1 + } + }, + "d0e42ee4fc854b73b2b8929ff2a26cde": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "initial" + } + }, + "d6fcdf4b5c194a7380a8a0df60ae2298": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "d77a514d39a14142a1c51a2e7d136565": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e2f417a1a55a463297ee168f687a29d3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e4139a008d574efb9a5b1cec6790d848": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "e4c1e861f8434fa29cff33f367c61d7a": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_83f25fd2658142e4a2be06e00a7966cb", + "IPY_MODEL_3bbe92c3974641b98d8ef5777dc491de" ], - "execution_count": 43, - "outputs": [] + "layout": "IPY_MODEL_d6fcdf4b5c194a7380a8a0df60ae2298" + } + }, + "e89ec92a3ae34d239e3b131fc240fc34": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "e9f93c50c219406a82f55127ad09b555": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "fa507001884643a387d7e0a46d498604": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "fc7335335b114e22b33db1a830ea90e4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } } - ] -} \ No newline at end of file + } + } + }, + "nbformat": 4, + "nbformat_minor": 1 +}