{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"
"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "2FzBzmpBRkV3"
},
"source": [
"# Checking Embeddings of Terms (Noun/Verb/Adj/etc.) from Tagged Wordnet Gloss\n",
"\n",
"I discovered there's a more active fork of wordnet and bumped this analysis over to that."
]
},
{
"cell_type": "code",
"source": [
"!pip install datasets"
],
"metadata": {
"id": "K5C1kaWhXnJf",
"outputId": "74e1d307-5ca7-4501-ded9-64e83b1074db",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Collecting datasets\n",
" Downloading datasets-2.18.0-py3-none-any.whl (510 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m510.5/510.5 kB\u001b[0m \u001b[31m3.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.13.1)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.25.2)\n",
"Requirement already satisfied: pyarrow>=12.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (14.0.2)\n",
"Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets) (0.6)\n",
"Collecting dill<0.3.9,>=0.3.0 (from datasets)\n",
" Downloading dill-0.3.8-py3-none-any.whl (116 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m15.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (1.5.3)\n",
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.31.0)\n",
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.2)\n",
"Collecting xxhash (from datasets)\n",
" Downloading xxhash-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m19.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hCollecting multiprocess (from datasets)\n",
" Downloading multiprocess-0.70.16-py310-none-any.whl (134 kB)\n",
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m16.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
"\u001b[?25hRequirement already satisfied: fsspec[http]<=2024.2.0,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.6.0)\n",
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.9.3)\n",
"Requirement already satisfied: huggingface-hub>=0.19.4 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.20.3)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.0)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.1)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.2.0)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.5)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.4)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.4->datasets) (4.10.0)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.3.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.6)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2.0.7)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2024.2.2)\n",
"Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2023.4)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->datasets) (1.16.0)\n",
"Installing collected packages: xxhash, dill, multiprocess, datasets\n",
"Successfully installed datasets-2.18.0 dill-0.3.8 multiprocess-0.70.16 xxhash-3.4.1\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"from datasets import load_dataset\n",
"\n",
"# Load the dataset\n",
"dataset = load_dataset(\"jon-tow/open-english-wordnet-synset-2023\")"
],
"metadata": {
"id": "n12stD5MRnek",
"outputId": "6bb43252-23d5-4348-8e9b-e90873e2edfd",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 217,
"referenced_widgets": [
"cd83d7589dd94022844be6625ddc6c70",
"5c6674e877b045aa9b8c93a949113b7e",
"0e87567035c34bbd836458b5399884bb",
"2d1063b0078840009dc811d03def1d3e",
"1bc984d5ee58432d9e2457a8b5ad8273",
"5412bcc57b9540189d856e2bd0d2c33c",
"defe66b6c703472c84faf01cd7040f2e",
"afe19112e372424086988965f0f34e14",
"19d29f06a0224528b958ff1343227823",
"55d46c4e9ad04fb9ad0e09ec974124de",
"6efc128c6a6049b0bdc45b0f025e20b1",
"6be48d20681440488a7106ce7ff8e262",
"5e92cc16fc09441a92e64ccef09f1ce7",
"3739c6c8081642f1b9ec2b6ff13d924a",
"9255806cdfa94d7e995a8c44a97f192d",
"ab5c63323f7346529c94f1fb69f724d3",
"a6db4efd7025410fa6e5d1532e234eec",
"11c8e1f50ec24b549c08328f41872fe7",
"b97f9428fd484c5c91fcc004d77a6470",
"3bf0e6cd62c643838cd4cbe0f56dc1bd",
"fa742c0c6a0c4a77a4628bd4168d5f96",
"ed1955550f164dce97ad7e4c37e202bb",
"9f04057c52d1494b92c305078faf9488",
"51d41e64a4f049e58be20303601b135d",
"ec6bd7afcc254bc88b6ea1034deabfc7",
"f3927d5cbee44700960812117b897ea6",
"152f8b11637749daaf645f4f25c929f1",
"3cb439a513e04220853ac6c1a7f384a4",
"fb0f5cbcc929459ba9f596a8621caa36",
"da6c5d35317648b8862bb6acf6206bf3",
"ff8eee65477f4a89bfca6a2c7229e9e0",
"83b8acabcda84ad692f0995cda06836a",
"e9f599718f694a0e83bbcaee1e7841e2"
]
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:88: UserWarning: \n",
"The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
"To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
"You will be able to reuse this secret in all of your notebooks.\n",
"Please note that authentication is recommended but still optional to access public models or datasets.\n",
" warnings.warn(\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading readme: 0%| | 0.00/2.27k [00:00, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "cd83d7589dd94022844be6625ddc6c70"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Downloading data: 0%| | 0.00/49.0M [00:00, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "6be48d20681440488a7106ce7ff8e262"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Generating train split: 0 examples [00:00, ? examples/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "9f04057c52d1494b92c305078faf9488"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "_D-Y5nf6RkV4",
"outputId": "f8b48922-5cfa-42e4-9c4b-3769f755b689",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'@id': 'oewn-03159292-a',\n",
" '@ili': 'i18097',\n",
" '@members': 'oewn-avenged-a',\n",
" '@partOfSpeech': 'a',\n",
" '@lexfile': 'adj.ppl',\n",
" 'Definition': 'for which vengeance has been taken',\n",
" 'SynsetRelation': [],\n",
" 'Example': 'an avenged injury',\n",
" 'ILIDefinition': None,\n",
" '@dc:source': None}"
]
},
"metadata": {},
"execution_count": 3
}
],
"source": [
"dataset['train'][0]"
]
},
{
"cell_type": "code",
"source": [
"import pandas as pd"
],
"metadata": {
"id": "ioCtYnx7gDo6"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"df = pd.DataFrame(dataset['train'])"
],
"metadata": {
"id": "g6voyMIugE4c"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"df.head()"
],
"metadata": {
"id": "WNmdjublgIXz",
"outputId": "d32af694-8927-453a-d007-89b33e34e40b",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @id @ili @members @partOfSpeech \\\n",
"0 oewn-03159292-a i18097 oewn-avenged-a a \n",
"1 oewn-03159419-a i18098 oewn-unavenged-a a \n",
"2 oewn-03159554-a i18099 oewn-beaten-a a \n",
"3 oewn-03159654-a i18100 oewn-calibrated-a oewn-graduated-a a \n",
"4 oewn-03159804-a i18101 oewn-cantering-a a \n",
"\n",
" @lexfile Definition SynsetRelation \\\n",
"0 adj.ppl for which vengeance has been taken [] \n",
"1 adj.ppl for which vengeance has not been taken [] \n",
"2 adj.ppl formed or made thin by hammering [] \n",
"3 adj.ppl marked with or divided into degrees [] \n",
"4 adj.ppl riding at a gait between a trot and a gallop [] \n",
"\n",
" Example ILIDefinition @dc:source \n",
"0 an avenged injury None None \n",
"1 an unavenged murder None None \n",
"2 beaten gold None None \n",
"3 a calibrated thermometer None None \n",
"4 the cantering soldiers None None "
],
"text/html": [
"\n",
"
\n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @id | \n",
" @ili | \n",
" @members | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
" Definition | \n",
" SynsetRelation | \n",
" Example | \n",
" ILIDefinition | \n",
" @dc:source | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" oewn-03159292-a | \n",
" i18097 | \n",
" oewn-avenged-a | \n",
" a | \n",
" adj.ppl | \n",
" for which vengeance has been taken | \n",
" [] | \n",
" an avenged injury | \n",
" None | \n",
" None | \n",
"
\n",
" \n",
" 1 | \n",
" oewn-03159419-a | \n",
" i18098 | \n",
" oewn-unavenged-a | \n",
" a | \n",
" adj.ppl | \n",
" for which vengeance has not been taken | \n",
" [] | \n",
" an unavenged murder | \n",
" None | \n",
" None | \n",
"
\n",
" \n",
" 2 | \n",
" oewn-03159554-a | \n",
" i18099 | \n",
" oewn-beaten-a | \n",
" a | \n",
" adj.ppl | \n",
" formed or made thin by hammering | \n",
" [] | \n",
" beaten gold | \n",
" None | \n",
" None | \n",
"
\n",
" \n",
" 3 | \n",
" oewn-03159654-a | \n",
" i18100 | \n",
" oewn-calibrated-a oewn-graduated-a | \n",
" a | \n",
" adj.ppl | \n",
" marked with or divided into degrees | \n",
" [] | \n",
" a calibrated thermometer | \n",
" None | \n",
" None | \n",
"
\n",
" \n",
" 4 | \n",
" oewn-03159804-a | \n",
" i18101 | \n",
" oewn-cantering-a | \n",
" a | \n",
" adj.ppl | \n",
" riding at a gait between a trot and a gallop | \n",
" [] | \n",
" the cantering soldiers | \n",
" None | \n",
" None | \n",
"
\n",
" \n",
"
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "df"
}
},
"metadata": {},
"execution_count": 6
}
]
},
{
"cell_type": "markdown",
"source": [
"Getting the @members into a reasonable format is about to take a bunch of cells and most of my patience for the day."
],
"metadata": {
"id": "vJM-9DJE1Oaq"
}
},
{
"cell_type": "code",
"source": [
"df.shape"
],
"metadata": {
"id": "L9zrnh6Urqco",
"outputId": "05d83662-f60d-4db7-cfdc-35065101d73e",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(120135, 10)"
]
},
"metadata": {},
"execution_count": 7
}
]
},
{
"cell_type": "code",
"source": [
"df[['@members', '@partOfSpeech', '@lexfile']].head()"
],
"metadata": {
"id": "z8c4VmJ6lYwa",
"outputId": "f564245c-3f02-42bf-9726-e2e737e27529",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @members @partOfSpeech @lexfile\n",
"0 oewn-avenged-a a adj.ppl\n",
"1 oewn-unavenged-a a adj.ppl\n",
"2 oewn-beaten-a a adj.ppl\n",
"3 oewn-calibrated-a oewn-graduated-a a adj.ppl\n",
"4 oewn-cantering-a a adj.ppl"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @members | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" oewn-avenged-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 1 | \n",
" oewn-unavenged-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 2 | \n",
" oewn-beaten-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 3 | \n",
" oewn-calibrated-a oewn-graduated-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 4 | \n",
" oewn-cantering-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
"
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"summary": "{\n \"name\": \"df[['@members', '@partOfSpeech', '@lexfile']]\",\n \"rows\": 5,\n \"fields\": [\n {\n \"column\": \"@members\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 5,\n \"samples\": [\n \"oewn-unavenged-a\",\n \"oewn-cantering-a\",\n \"oewn-beaten-a\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"@partOfSpeech\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1,\n \"samples\": [\n \"a\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"@lexfile\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1,\n \"samples\": [\n \"adj.ppl\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
}
},
"metadata": {},
"execution_count": 8
}
]
},
{
"cell_type": "code",
"source": [
"df = df[['@members', '@partOfSpeech', '@lexfile']]"
],
"metadata": {
"id": "bobEK-ZsllHr"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"pattern = r'^(\\w+-\\w+-\\w+ *)*$'\n",
"\n",
"matches_pattern = df['@members'].str.match(pattern)\n",
"\n",
"all_match_pattern = matches_pattern.all()\n",
"all_match_pattern"
],
"metadata": {
"id": "LqERc6pcFyao",
"outputId": "5ad91eea-b6ce-4b52-8e31-bb28eacd7f84",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"False"
]
},
"metadata": {},
"execution_count": 10
}
]
},
{
"cell_type": "code",
"source": [
"members_not_matching_pattern = df[~matches_pattern]\n",
"members_not_matching_pattern"
],
"metadata": {
"id": "jLvqtPRvGeqN",
"outputId": "6eca4f82-bf5f-4e7a-f0a3-16cc3573097a",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 424
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @members @partOfSpeech \\\n",
"13 oewn-hand-held-a oewn-handheld-a a \n",
"42 oewn-re-created-a a \n",
"49 oewn-spray-dried-a a \n",
"57 oewn-closed-captioned-a a \n",
"116 oewn-plane_figure-n oewn-two-dimensional_figure-n n \n",
"... ... ... \n",
"119954 oewn-real-time_processing-n oewn-real-time_ope... n \n",
"119976 oewn-reuptake-n oewn-re-uptake-n n \n",
"120005 oewn-slump-n oewn-slack-n oewn-drop-off-n oewn... n \n",
"120123 oewn-constant-volume_process-n oewn-isometric_... n \n",
"120127 oewn-anti-selection-n oewn-adverse_selection-n n \n",
"\n",
" @lexfile \n",
"13 adj.ppl \n",
"42 adj.ppl \n",
"49 adj.ppl \n",
"57 adj.ppl \n",
"116 noun.shape \n",
"... ... \n",
"119954 noun.process \n",
"119976 noun.process \n",
"120005 noun.process \n",
"120123 noun.process \n",
"120127 noun.process \n",
"\n",
"[6987 rows x 3 columns]"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @members | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
"
\n",
" \n",
" \n",
" \n",
" 13 | \n",
" oewn-hand-held-a oewn-handheld-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 42 | \n",
" oewn-re-created-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 49 | \n",
" oewn-spray-dried-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 57 | \n",
" oewn-closed-captioned-a | \n",
" a | \n",
" adj.ppl | \n",
"
\n",
" \n",
" 116 | \n",
" oewn-plane_figure-n oewn-two-dimensional_figure-n | \n",
" n | \n",
" noun.shape | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 119954 | \n",
" oewn-real-time_processing-n oewn-real-time_ope... | \n",
" n | \n",
" noun.process | \n",
"
\n",
" \n",
" 119976 | \n",
" oewn-reuptake-n oewn-re-uptake-n | \n",
" n | \n",
" noun.process | \n",
"
\n",
" \n",
" 120005 | \n",
" oewn-slump-n oewn-slack-n oewn-drop-off-n oewn... | \n",
" n | \n",
" noun.process | \n",
"
\n",
" \n",
" 120123 | \n",
" oewn-constant-volume_process-n oewn-isometric_... | \n",
" n | \n",
" noun.process | \n",
"
\n",
" \n",
" 120127 | \n",
" oewn-anti-selection-n oewn-adverse_selection-n | \n",
" n | \n",
" noun.process | \n",
"
\n",
" \n",
"
\n",
"
6987 rows × 3 columns
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "members_not_matching_pattern",
"summary": "{\n \"name\": \"members_not_matching_pattern\",\n \"rows\": 6987,\n \"fields\": [\n {\n \"column\": \"@members\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 6837,\n \"samples\": [\n \"oewn-ichthyolatry-n oewn-fish-worship-n\",\n \"oewn-record-breaker-n oewn-record-holder-n\",\n \"oewn-green-white-a oewn-greenish-white-a\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"@partOfSpeech\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 5,\n \"samples\": [\n \"n\",\n \"r\",\n \"s\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"@lexfile\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 43,\n \"samples\": [\n \"noun.possession\",\n \"noun.substance\",\n \"noun.location\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
}
},
"metadata": {},
"execution_count": 11
}
]
},
{
"cell_type": "code",
"source": [
"pattern = r'^(\\w+-[\\w_\\-.]+-\\w+ *)*$' # This took a couple of iterations not represented\n",
"\n",
"matches_pattern = df['@members'].str.match(pattern)\n",
"\n",
"all_match_pattern = matches_pattern.all()\n",
"all_match_pattern"
],
"metadata": {
"id": "m8Jo9CRfOANO",
"outputId": "ae4737e6-4294-4589-80ff-06329a9dd318",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"True"
]
},
"metadata": {},
"execution_count": 12
}
]
},
{
"cell_type": "code",
"source": [
"# I found this problem later on\n",
"oddball = df['@members'].str.match('.*Gravenhage.*')\n",
"oddball_member = df[oddball]['@members']"
],
"metadata": {
"id": "jsFdSy6qmhmG"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"oddball_member.iloc[0]"
],
"metadata": {
"id": "AzVbuHXGnSkK",
"outputId": "0bbd7121-73f6-4b52-b16f-932eaa0c6692",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 36
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"'oewn-The_Hague-n oewn--ap-s_Gravenhage-n oewn-Den_Haag-n'"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "string"
}
},
"metadata": {},
"execution_count": 14
}
]
},
{
"cell_type": "code",
"source": [
"df = df.assign(members=df['@members'].str.split()).explode('members')"
],
"metadata": {
"id": "J9uuPTGBqeVe"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"df.head()"
],
"metadata": {
"id": "rNbH6RL4rRPG",
"outputId": "62ad47ea-f267-4b35-9677-e2f1fdc8703f",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @members @partOfSpeech @lexfile \\\n",
"0 oewn-avenged-a a adj.ppl \n",
"1 oewn-unavenged-a a adj.ppl \n",
"2 oewn-beaten-a a adj.ppl \n",
"3 oewn-calibrated-a oewn-graduated-a a adj.ppl \n",
"3 oewn-calibrated-a oewn-graduated-a a adj.ppl \n",
"\n",
" members \n",
"0 oewn-avenged-a \n",
"1 oewn-unavenged-a \n",
"2 oewn-beaten-a \n",
"3 oewn-calibrated-a \n",
"3 oewn-graduated-a "
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @members | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
" members | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" oewn-avenged-a | \n",
" a | \n",
" adj.ppl | \n",
" oewn-avenged-a | \n",
"
\n",
" \n",
" 1 | \n",
" oewn-unavenged-a | \n",
" a | \n",
" adj.ppl | \n",
" oewn-unavenged-a | \n",
"
\n",
" \n",
" 2 | \n",
" oewn-beaten-a | \n",
" a | \n",
" adj.ppl | \n",
" oewn-beaten-a | \n",
"
\n",
" \n",
" 3 | \n",
" oewn-calibrated-a oewn-graduated-a | \n",
" a | \n",
" adj.ppl | \n",
" oewn-calibrated-a | \n",
"
\n",
" \n",
" 3 | \n",
" oewn-calibrated-a oewn-graduated-a | \n",
" a | \n",
" adj.ppl | \n",
" oewn-graduated-a | \n",
"
\n",
" \n",
"
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "df"
}
},
"metadata": {},
"execution_count": 16
}
]
},
{
"cell_type": "code",
"source": [
"df.shape"
],
"metadata": {
"id": "TTdfz_HkrT4r",
"outputId": "5e5106eb-5a4c-49e8-c726-1dd2988b906c",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(212071, 4)"
]
},
"metadata": {},
"execution_count": 17
}
]
},
{
"cell_type": "code",
"source": [
"prefixes = df['members'].str.split('-', expand=True)[0]\n",
"prefix_freq = prefixes.value_counts().reset_index()\n",
"prefix_freq.columns = ['Prefix', 'Frequency']\n",
"\n",
"prefix_freq = prefix_freq.sort_values(by='Frequency', ascending=False)\n",
"\n",
"print(prefix_freq)"
],
"metadata": {
"id": "A6zydv3gq4IZ",
"outputId": "35782af6-e6bb-46f2-e605-3e160a5a7f4c",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
" Prefix Frequency\n",
"0 oewn 212071\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"to_remove = 'oewn-'\n",
"\n",
"df['members'] = df['members'].apply(lambda x: x.replace(to_remove, '') if x.startswith(to_remove) else x)"
],
"metadata": {
"id": "orcYSJC-rL_d"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"prefixes = df['members'].str.split('-', expand=True)[0]\n",
"prefix_freq = prefixes.value_counts().reset_index()\n",
"prefix_freq.columns = ['Prefix', 'Frequency']\n",
"\n",
"prefix_freq = prefix_freq.sort_values(by='Frequency', ascending=False)\n",
"\n",
"print(prefix_freq)"
],
"metadata": {
"id": "Zne276Jardwg",
"outputId": "f5f935f5-2623-486f-e7b2-49b7d1c67309",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
" Prefix Frequency\n",
"0 self 252\n",
"1 high 102\n",
"2 well 98\n",
"3 one 85\n",
"4 cut 79\n",
"... ... ...\n",
"66494 CIA 1\n",
"66493 National_Institute_of_Standards_and_Technology 1\n",
"66492 Counterterrorist_Center 1\n",
"66491 Nonproliferation_Center 1\n",
"145809 grammatical_cohesion 1\n",
"\n",
"[145810 rows x 2 columns]\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"# Check for values starting with \"-\"\n",
"values_starting_with_dash = df[df['members'].str.startswith('-')]\n",
"\n",
"# Display the values starting with \"-\"\n",
"print(values_starting_with_dash)"
],
"metadata": {
"id": "sk2wdpTRsKhT",
"outputId": "ae7316c8-02c9-4523-a1dc-2a8635f858bb",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
" @members @partOfSpeech \\\n",
"81633 oewn-The_Hague-n oewn--ap-s_Gravenhage-n oewn-... n \n",
"106115 oewn-between-r oewn--ap-tween-r r \n",
"107858 oewn-between_decks-r oewn--ap-tween_decks-r r \n",
"114349 oewn-hood-n oewn--ap-hood-n n \n",
"\n",
" @lexfile members \n",
"81633 noun.location -ap-s_Gravenhage-n \n",
"106115 adv.all -ap-tween-r \n",
"107858 adv.all -ap-tween_decks-r \n",
"114349 noun.group -ap-hood-n \n"
]
}
]
},
{
"cell_type": "code",
"source": [
"df.head()"
],
"metadata": {
"id": "I1ihnJ0RrmHy",
"outputId": "c171d8f4-9194-4d6c-a813-9b9c48faa53e",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @members @partOfSpeech @lexfile members\n",
"0 oewn-avenged-a a adj.ppl avenged-a\n",
"1 oewn-unavenged-a a adj.ppl unavenged-a\n",
"2 oewn-beaten-a a adj.ppl beaten-a\n",
"3 oewn-calibrated-a oewn-graduated-a a adj.ppl calibrated-a\n",
"3 oewn-calibrated-a oewn-graduated-a a adj.ppl graduated-a"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @members | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
" members | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" oewn-avenged-a | \n",
" a | \n",
" adj.ppl | \n",
" avenged-a | \n",
"
\n",
" \n",
" 1 | \n",
" oewn-unavenged-a | \n",
" a | \n",
" adj.ppl | \n",
" unavenged-a | \n",
"
\n",
" \n",
" 2 | \n",
" oewn-beaten-a | \n",
" a | \n",
" adj.ppl | \n",
" beaten-a | \n",
"
\n",
" \n",
" 3 | \n",
" oewn-calibrated-a oewn-graduated-a | \n",
" a | \n",
" adj.ppl | \n",
" calibrated-a | \n",
"
\n",
" \n",
" 3 | \n",
" oewn-calibrated-a oewn-graduated-a | \n",
" a | \n",
" adj.ppl | \n",
" graduated-a | \n",
"
\n",
" \n",
"
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "df"
}
},
"metadata": {},
"execution_count": 22
}
]
},
{
"cell_type": "code",
"source": [
"df['members'] = df['members'].apply(lambda x: x[4:] if x.startswith('-ap-') else x)"
],
"metadata": {
"id": "-6a_qlCUsvh4"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"df.drop(columns=['@members'], inplace=True)"
],
"metadata": {
"id": "SXHfgstpsyJi"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"suffixes = df['members'].str.split('-').str[-1]\n",
"\n",
"# Count frequencies of suffixes\n",
"suffix_freq = suffixes.value_counts().reset_index()\n",
"suffix_freq.columns = ['Suffix', 'Frequency']\n",
"\n",
"# Sort by frequency\n",
"suffix_freq = suffix_freq.sort_values(by='Frequency', ascending=False)\n",
"\n",
"# Display suffixes ordered by frequency\n",
"print(suffix_freq[:40])"
],
"metadata": {
"id": "m3qrn1yrtDHT",
"outputId": "b62de8cb-2b3d-4400-924b-7280f9fc702c",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
" Suffix Frequency\n",
"0 n 151001\n",
"1 a 30150\n",
"2 v 25098\n",
"3 r 5595\n",
"4 1 146\n",
"5 2 69\n",
"6 s 12\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"filtered_df = df[df['members'].str.endswith(('1', '2', 's'))]\n",
"\n",
"print(filtered_df)"
],
"metadata": {
"id": "zZf0TzcLxKhe",
"outputId": "04bc8527-2c57-4944-ec5e-ccf355070200",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
" @partOfSpeech @lexfile members\n",
"286 n noun.shape lead-n-1\n",
"301 n noun.shape bow-n-1\n",
"325 n noun.shape tower-n-1\n",
"782 s adj.all panelled-s\n",
"2303 s adj.all centre-s\n",
"... ... ... ...\n",
"117472 v verb.body tear-v-2\n",
"117596 v verb.body recover-v-1\n",
"118299 v verb.communication bow-v-1\n",
"118397 v verb.communication bow-v-1\n",
"118473 v verb.communication whoop-v-1\n",
"\n",
"[227 rows x 3 columns]\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"df['members'] = df['members'].apply(lambda x: x.replace('-ap-', \"'\")) # They use this for apostrophe for some reason, probably because it was stored as yaml"
],
"metadata": {
"id": "LRCd0Zy_trIB"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# List of suffixes to remove\n",
"suffixes_to_remove = ['-n', '-a', '-v', '-r', '-1', '-2', '-s']\n",
"\n",
"# Function to remove suffixes\n",
"def remove_suffixes(member):\n",
" # Iterate until no suffixes are left\n",
" while any(member.endswith(suffix) for suffix in suffixes_to_remove):\n",
" for suffix in suffixes_to_remove:\n",
" if member.endswith(suffix):\n",
" member = member[:-len(suffix)] # Remove the suffix\n",
" return member\n",
"\n",
"# Apply the function to each member in the DataFrame\n",
"df['members'] = df['members'].apply(remove_suffixes)\n",
"\n",
"# Display the updated DataFrame\n",
"df.head()"
],
"metadata": {
"id": "_dmFfqOwx3X4",
"outputId": "0dab9c69-740b-4561-91b0-73cfe68ea050",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @partOfSpeech @lexfile members\n",
"0 a adj.ppl avenged\n",
"1 a adj.ppl unavenged\n",
"2 a adj.ppl beaten\n",
"3 a adj.ppl calibrated\n",
"3 a adj.ppl graduated"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
" members | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" a | \n",
" adj.ppl | \n",
" avenged | \n",
"
\n",
" \n",
" 1 | \n",
" a | \n",
" adj.ppl | \n",
" unavenged | \n",
"
\n",
" \n",
" 2 | \n",
" a | \n",
" adj.ppl | \n",
" beaten | \n",
"
\n",
" \n",
" 3 | \n",
" a | \n",
" adj.ppl | \n",
" calibrated | \n",
"
\n",
" \n",
" 3 | \n",
" a | \n",
" adj.ppl | \n",
" graduated | \n",
"
\n",
" \n",
"
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "df"
}
},
"metadata": {},
"execution_count": 28
}
]
},
{
"cell_type": "code",
"source": [
"df['members'] = df['members'].apply(lambda x: \" \".join(x.split(\"_\")))"
],
"metadata": {
"id": "1XbVExgWwaVo"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"df.head()"
],
"metadata": {
"id": "e4u-FcGRwkbM",
"outputId": "309f9373-f7d2-426d-9b22-321bfdb8b22b",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" @partOfSpeech @lexfile members\n",
"0 a adj.ppl avenged\n",
"1 a adj.ppl unavenged\n",
"2 a adj.ppl beaten\n",
"3 a adj.ppl calibrated\n",
"3 a adj.ppl graduated"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" @partOfSpeech | \n",
" @lexfile | \n",
" members | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" a | \n",
" adj.ppl | \n",
" avenged | \n",
"
\n",
" \n",
" 1 | \n",
" a | \n",
" adj.ppl | \n",
" unavenged | \n",
"
\n",
" \n",
" 2 | \n",
" a | \n",
" adj.ppl | \n",
" beaten | \n",
"
\n",
" \n",
" 3 | \n",
" a | \n",
" adj.ppl | \n",
" calibrated | \n",
"
\n",
" \n",
" 3 | \n",
" a | \n",
" adj.ppl | \n",
" graduated | \n",
"
\n",
" \n",
"
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "df"
}
},
"metadata": {},
"execution_count": 30
}
]
},
{
"cell_type": "code",
"source": [
"pd.get_dummies(df['@partOfSpeech'])"
],
"metadata": {
"id": "3VmUnWJel5CK",
"outputId": "cf9f3468-1c51-4536-e2ba-5afa3a66866b",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 424
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" a n r s v\n",
"0 1 0 0 0 0\n",
"1 1 0 0 0 0\n",
"2 1 0 0 0 0\n",
"3 1 0 0 0 0\n",
"3 1 0 0 0 0\n",
"... .. .. .. .. ..\n",
"120130 0 1 0 0 0\n",
"120131 0 1 0 0 0\n",
"120132 0 1 0 0 0\n",
"120133 0 1 0 0 0\n",
"120134 0 1 0 0 0\n",
"\n",
"[212071 rows x 5 columns]"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" a | \n",
" n | \n",
" r | \n",
" s | \n",
" v | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 2 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 120130 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120131 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120132 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120133 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120134 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
212071 rows × 5 columns
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe"
}
},
"metadata": {},
"execution_count": 31
}
]
},
{
"cell_type": "code",
"source": [
"pd.get_dummies(df['@lexfile'])"
],
"metadata": {
"id": "-ypW9xpkmC1W",
"outputId": "999bd669-f9db-425a-a808-2b826a715088",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 444
}
},
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" adj.all adj.pert adj.ppl adv.all noun.Tops noun.act noun.animal \\\n",
"0 0 0 1 0 0 0 0 \n",
"1 0 0 1 0 0 0 0 \n",
"2 0 0 1 0 0 0 0 \n",
"3 0 0 1 0 0 0 0 \n",
"3 0 0 1 0 0 0 0 \n",
"... ... ... ... ... ... ... ... \n",
"120130 0 0 0 0 0 0 0 \n",
"120131 0 0 0 0 0 0 0 \n",
"120132 0 0 0 0 0 0 0 \n",
"120133 0 0 0 0 0 0 0 \n",
"120134 0 0 0 0 0 0 0 \n",
"\n",
" noun.artifact noun.attribute noun.body ... verb.consumption \\\n",
"0 0 0 0 ... 0 \n",
"1 0 0 0 ... 0 \n",
"2 0 0 0 ... 0 \n",
"3 0 0 0 ... 0 \n",
"3 0 0 0 ... 0 \n",
"... ... ... ... ... ... \n",
"120130 0 0 0 ... 0 \n",
"120131 0 0 0 ... 0 \n",
"120132 0 0 0 ... 0 \n",
"120133 0 0 0 ... 0 \n",
"120134 0 0 0 ... 0 \n",
"\n",
" verb.contact verb.creation verb.emotion verb.motion \\\n",
"0 0 0 0 0 \n",
"1 0 0 0 0 \n",
"2 0 0 0 0 \n",
"3 0 0 0 0 \n",
"3 0 0 0 0 \n",
"... ... ... ... ... \n",
"120130 0 0 0 0 \n",
"120131 0 0 0 0 \n",
"120132 0 0 0 0 \n",
"120133 0 0 0 0 \n",
"120134 0 0 0 0 \n",
"\n",
" verb.perception verb.possession verb.social verb.stative \\\n",
"0 0 0 0 0 \n",
"1 0 0 0 0 \n",
"2 0 0 0 0 \n",
"3 0 0 0 0 \n",
"3 0 0 0 0 \n",
"... ... ... ... ... \n",
"120130 0 0 0 0 \n",
"120131 0 0 0 0 \n",
"120132 0 0 0 0 \n",
"120133 0 0 0 0 \n",
"120134 0 0 0 0 \n",
"\n",
" verb.weather \n",
"0 0 \n",
"1 0 \n",
"2 0 \n",
"3 0 \n",
"3 0 \n",
"... ... \n",
"120130 0 \n",
"120131 0 \n",
"120132 0 \n",
"120133 0 \n",
"120134 0 \n",
"\n",
"[212071 rows x 45 columns]"
],
"text/html": [
"\n",
" \n",
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" adj.all | \n",
" adj.pert | \n",
" adj.ppl | \n",
" adv.all | \n",
" noun.Tops | \n",
" noun.act | \n",
" noun.animal | \n",
" noun.artifact | \n",
" noun.attribute | \n",
" noun.body | \n",
" ... | \n",
" verb.consumption | \n",
" verb.contact | \n",
" verb.creation | \n",
" verb.emotion | \n",
" verb.motion | \n",
" verb.perception | \n",
" verb.possession | \n",
" verb.social | \n",
" verb.stative | \n",
" verb.weather | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 120130 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120131 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120132 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120133 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 120134 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
212071 rows × 45 columns
\n",
"
\n",
"
\n",
"
\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe"
}
},
"metadata": {},
"execution_count": 32
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "tC1ZbcL9RkV6"
},
"outputs": [],
"source": [
"df_to_upload = df_pos = pd.concat([df['members'], pd.get_dummies(df['@partOfSpeech'], pd.get_dummies(df['@lexfile']))], axis=1)"
]
},
{
"cell_type": "code",
"source": [
"df_to_upload = df_to_upload.groupby('members').max().reset_index()\n",
"df_to_upload.to_csv(\"openwordnet-categoricals.csv\")"
],
"metadata": {
"id": "WLXGuobjAIQZ"
},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.9.18"
},
"colab": {
"provenance": [],
"gpuType": "T4",
"name": "openwordnet-categorical-processor.ipynb",
"include_colab_link": true
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"cd83d7589dd94022844be6625ddc6c70": {
"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_5c6674e877b045aa9b8c93a949113b7e",
"IPY_MODEL_0e87567035c34bbd836458b5399884bb",
"IPY_MODEL_2d1063b0078840009dc811d03def1d3e"
],
"layout": "IPY_MODEL_1bc984d5ee58432d9e2457a8b5ad8273"
}
},
"5c6674e877b045aa9b8c93a949113b7e": {
"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_5412bcc57b9540189d856e2bd0d2c33c",
"placeholder": "",
"style": "IPY_MODEL_defe66b6c703472c84faf01cd7040f2e",
"value": "Downloading readme: 100%"
}
},
"0e87567035c34bbd836458b5399884bb": {
"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": "",
"description_tooltip": null,
"layout": "IPY_MODEL_afe19112e372424086988965f0f34e14",
"max": 2267,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_19d29f06a0224528b958ff1343227823",
"value": 2267
}
},
"2d1063b0078840009dc811d03def1d3e": {
"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_55d46c4e9ad04fb9ad0e09ec974124de",
"placeholder": "",
"style": "IPY_MODEL_6efc128c6a6049b0bdc45b0f025e20b1",
"value": " 2.27k/2.27k [00:00<00:00, 62.7kB/s]"
}
},
"1bc984d5ee58432d9e2457a8b5ad8273": {
"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
}
},
"5412bcc57b9540189d856e2bd0d2c33c": {
"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
}
},
"defe66b6c703472c84faf01cd7040f2e": {
"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": ""
}
},
"afe19112e372424086988965f0f34e14": {
"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
}
},
"19d29f06a0224528b958ff1343227823": {
"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": ""
}
},
"55d46c4e9ad04fb9ad0e09ec974124de": {
"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
}
},
"6efc128c6a6049b0bdc45b0f025e20b1": {
"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": ""
}
},
"6be48d20681440488a7106ce7ff8e262": {
"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_5e92cc16fc09441a92e64ccef09f1ce7",
"IPY_MODEL_3739c6c8081642f1b9ec2b6ff13d924a",
"IPY_MODEL_9255806cdfa94d7e995a8c44a97f192d"
],
"layout": "IPY_MODEL_ab5c63323f7346529c94f1fb69f724d3"
}
},
"5e92cc16fc09441a92e64ccef09f1ce7": {
"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_a6db4efd7025410fa6e5d1532e234eec",
"placeholder": "",
"style": "IPY_MODEL_11c8e1f50ec24b549c08328f41872fe7",
"value": "Downloading data: 100%"
}
},
"3739c6c8081642f1b9ec2b6ff13d924a": {
"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": "",
"description_tooltip": null,
"layout": "IPY_MODEL_b97f9428fd484c5c91fcc004d77a6470",
"max": 49044105,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_3bf0e6cd62c643838cd4cbe0f56dc1bd",
"value": 49044105
}
},
"9255806cdfa94d7e995a8c44a97f192d": {
"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_fa742c0c6a0c4a77a4628bd4168d5f96",
"placeholder": "",
"style": "IPY_MODEL_ed1955550f164dce97ad7e4c37e202bb",
"value": " 49.0M/49.0M [00:02<00:00, 24.6MB/s]"
}
},
"ab5c63323f7346529c94f1fb69f724d3": {
"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
}
},
"a6db4efd7025410fa6e5d1532e234eec": {
"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
}
},
"11c8e1f50ec24b549c08328f41872fe7": {
"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": ""
}
},
"b97f9428fd484c5c91fcc004d77a6470": {
"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
}
},
"3bf0e6cd62c643838cd4cbe0f56dc1bd": {
"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": ""
}
},
"fa742c0c6a0c4a77a4628bd4168d5f96": {
"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
}
},
"ed1955550f164dce97ad7e4c37e202bb": {
"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": ""
}
},
"9f04057c52d1494b92c305078faf9488": {
"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_51d41e64a4f049e58be20303601b135d",
"IPY_MODEL_ec6bd7afcc254bc88b6ea1034deabfc7",
"IPY_MODEL_f3927d5cbee44700960812117b897ea6"
],
"layout": "IPY_MODEL_152f8b11637749daaf645f4f25c929f1"
}
},
"51d41e64a4f049e58be20303601b135d": {
"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_3cb439a513e04220853ac6c1a7f384a4",
"placeholder": "",
"style": "IPY_MODEL_fb0f5cbcc929459ba9f596a8621caa36",
"value": "Generating train split: "
}
},
"ec6bd7afcc254bc88b6ea1034deabfc7": {
"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": "",
"description_tooltip": null,
"layout": "IPY_MODEL_da6c5d35317648b8862bb6acf6206bf3",
"max": 1,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_ff8eee65477f4a89bfca6a2c7229e9e0",
"value": 1
}
},
"f3927d5cbee44700960812117b897ea6": {
"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_83b8acabcda84ad692f0995cda06836a",
"placeholder": "",
"style": "IPY_MODEL_e9f599718f694a0e83bbcaee1e7841e2",
"value": " 120135/0 [00:01<00:00, 82372.92 examples/s]"
}
},
"152f8b11637749daaf645f4f25c929f1": {
"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
}
},
"3cb439a513e04220853ac6c1a7f384a4": {
"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
}
},
"fb0f5cbcc929459ba9f596a8621caa36": {
"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": ""
}
},
"da6c5d35317648b8862bb6acf6206bf3": {
"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"
}
},
"ff8eee65477f4a89bfca6a2c7229e9e0": {
"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": ""
}
},
"83b8acabcda84ad692f0995cda06836a": {
"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
}
},
"e9f599718f694a0e83bbcaee1e7841e2": {
"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": ""
}
}
}
},
"accelerator": "GPU"
},
"nbformat": 4,
"nbformat_minor": 0
}