{ "cells": [ { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import os\n", "from rich import print\n", "os.chdir(\"/home/p289731/NWO_FrameNet/Code/football-chains-viz\")" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "from ast import literal_eval" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
(39, 5)\n",
       "
\n" ], "text/plain": [ "\u001b[1m(\u001b[0m\u001b[1;36m39\u001b[0m, \u001b[1;36m5\u001b[0m\u001b[1m)\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
\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", " \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", " \n", "
framechanged_rolesunchanged_rolesroleschanged_role
0(0, 0, Draw, draw, NOUN)[Rangers][(COMPETITION_STAGE, [from, a, tight, Anglo-Sc...[(COMPETITION_STAGE, [from, a, tight, Anglo-Sc...Changed Something
1(0, 1, Match, contest, NOUN)[][(MATCH_LOCATION, [at, Old, Trafford]), (COMPE...[(MATCH_LOCATION, [at, Old, Trafford]), (COMPE...No Changed
2(1, 0, Competition, titleholders, NOUN)[][(TEAM, [Scottish])][(TEAM, [Scottish])]No Changed
3(1, 1, Concede_Goal, conceded, VERB)[Rangers][(CONCEDING_TEAM, [they]), (GOAL, [more, goals])][(CONCEDING_TEAM, [they]), (CONCEDING_TEAM, [W...Changed Something
4(1, 2, Competition_Stage, group, NOUN)[][(COMPETITION, [UEFA, Champions, League])][(COMPETITION, [UEFA, Champions, League])]No Changed
\n", "
" ], "text/plain": [ " frame changed_roles \\\n", "0 (0, 0, Draw, draw, NOUN) [Rangers] \n", "1 (0, 1, Match, contest, NOUN) [] \n", "2 (1, 0, Competition, titleholders, NOUN) [] \n", "3 (1, 1, Concede_Goal, conceded, VERB) [Rangers] \n", "4 (1, 2, Competition_Stage, group, NOUN) [] \n", "\n", " unchanged_roles \\\n", "0 [(COMPETITION_STAGE, [from, a, tight, Anglo-Sc... \n", "1 [(MATCH_LOCATION, [at, Old, Trafford]), (COMPE... \n", "2 [(TEAM, [Scottish])] \n", "3 [(CONCEDING_TEAM, [they]), (GOAL, [more, goals])] \n", "4 [(COMPETITION, [UEFA, Champions, League])] \n", "\n", " roles changed_role \n", "0 [(COMPETITION_STAGE, [from, a, tight, Anglo-Sc... Changed Something \n", "1 [(MATCH_LOCATION, [at, Old, Trafford]), (COMPE... No Changed \n", "2 [(TEAM, [Scottish])] No Changed \n", "3 [(CONCEDING_TEAM, [they]), (CONCEDING_TEAM, [W... Changed Something \n", "4 [(COMPETITION, [UEFA, Champions, League])] No Changed " ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data = pd.read_csv(\n", " \"data/2002829_mapped_roles.csv\", index_col=0, \n", " converters={\"frame\": literal_eval, \"changed_roles\": literal_eval, \"unchanged_roles\": literal_eval, \"roles\": literal_eval}\n", " )\n", "print(data.shape)\n", "data.head()" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sentence_idxframe_idxframe_nameframe_targetchanged_rolesroles
000Drawdraw[Rangers][(COMPETITION_STAGE, [from, a, tight, Anglo-Sc...
101Matchcontest[][(MATCH_LOCATION, [at, Old, Trafford]), (COMPE...
210Competitiontitleholders[][(TEAM, [Scottish])]
311Concede_Goalconceded[Rangers][(CONCEDING_TEAM, [they]), (CONCEDING_TEAM, [W...
412Competition_Stagegroup[][(COMPETITION, [UEFA, Champions, League])]
\n", "
" ], "text/plain": [ " sentence_idx frame_idx frame_name frame_target changed_roles \\\n", "0 0 0 Draw draw [Rangers] \n", "1 0 1 Match contest [] \n", "2 1 0 Competition titleholders [] \n", "3 1 1 Concede_Goal conceded [Rangers] \n", "4 1 2 Competition_Stage group [] \n", "\n", " roles \n", "0 [(COMPETITION_STAGE, [from, a, tight, Anglo-Sc... \n", "1 [(MATCH_LOCATION, [at, Old, Trafford]), (COMPE... \n", "2 [(TEAM, [Scottish])] \n", "3 [(CONCEDING_TEAM, [they]), (CONCEDING_TEAM, [W... \n", "4 [(COMPETITION, [UEFA, Champions, League])] " ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# max_roles_per_frame = \n", "data_ = (\n", " data\n", " .assign(sentence_idx=data[\"frame\"].apply(lambda frame: frame[0]))\n", " .assign(frame_idx=data[\"frame\"].apply(lambda frame: frame[1]))\n", " .assign(frame_name=data[\"frame\"].apply(lambda frame: frame[2]))\n", " .assign(frame_target=data[\"frame\"].apply(lambda frame: frame[3]))\n", " .drop(columns=[\"frame\"])\n", ")[[\"sentence_idx\", \"frame_idx\", \"frame_name\", \"frame_target\", \"changed_roles\", \"roles\"]]\n", "data_.head()\n" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [], "source": [ "max_sent = max(data_[\"sentence_idx\"])\n", "max_frame_per_sent = data_.groupby(\"sentence_idx\").agg({\"frame_idx\": max}).reset_index()\n", "sent_to_max_frame = dict(zip(max_frame_per_sent[\"sentence_idx\"], max_frame_per_sent[\"frame_idx\"]))" ] }, { "cell_type": "code", "execution_count": 64, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\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", " \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", " \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", " \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", " \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", " \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", " \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", " \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", " \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", " \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", " \n", "
sentence_idxframe_idxframe_nameframe_targetchanged_rolesrolestime_pointfirst_role
000Drawdraw[Rangers][(COMPETITION_STAGE, [from, a, tight, Anglo-Sc...0.000000Rangers
311Concede_Goalconceded[Rangers][(CONCEDING_TEAM, [they]), (CONCEDING_TEAM, [W...0.187500Rangers
513Bring_Offreturn[Man. United][(SUBSTITUTED_PLAYER, [Antonio, Valencia]), (T...0.229167Man. United
616Bring_Offdeparting[Man. United][(SUBSTITUTED_PLAYER, [Antonio, Valencia])]0.291667Man. United
1123Victorytriumph[Man. United][(MATCH_LOCATION, [at, Leeds, United, AFC])]0.433333Man. United
1224Deployfielding[Rangers][(COACH, [his]), (PLAYER, [of, three, central,...0.466667Rangers
1325Playerfull-backs[Rangers][(PLAYER, [Steven, Whittaker, and, Kirk, Broad...0.500000Rangers
1431Drawdraw[Man. United][(TEAM1, [United, 's]), (MATCH_LOCATION, [at, ...0.523810Man. United
1532Shotnod[Man. United][(MOVING_BALL, [Fabio, 's, right-wing, cross])...0.547619Man. United
1633Passcross[Man. United][(TARGET, [right-wing]), (PASSER, [Fabio, 's])]0.571429Man. United
1835One_On_Onetwo-on-one[Man. United, Rangers, Man. United][(MOVING_BALL, [Fabio, 's, right-wing, cross])...0.619048Man. United
2037Interveneavert[Rangers][(SHOT, [the, threat]), (INTERVENING_PLAYER, [...0.666667Rangers
2547Being_Freeisolated[Rangers][(RECIPIENT, [Kenny, Miller])]0.796296Rangers
2649Teamdefence[Man. United][(TEAM, [United, 's])]0.833333Man. United
2750Controlgot[Rangers, Man. United, Rangers][(RECIPIENT, [Kirk, Broadfoot]), (RECIPIENT, [...0.833333Rangers
2851Passcross[Rangers][(PASSER, [Steven, Naismith])]0.846154Rangers
3053Challengechallenge[Man. United][(OPPONENT_PLAYER, [Smalling])]0.871795Man. United
3154Fieldedge[Man. United][(TEAM, [United])]0.884615Man. United
3356Controllatching[Rangers][(RECIPIENT, [Kirk, Broadfoot])]0.910256Rangers
3457Shotlofted[Man. United][(TARGET, [over, the, top]), (SHOOTER, [Ryan, ...0.923077Man. United
3558Passball[Man. United][(TARGET, [over, the, top]), (PASSER, [Ryan, G...0.935897Man. United
36510Shot_Supportsshot[Man. United][(SHOOTER, [Gibson])]0.961538Man. United
37511Shotwhisker[Man. United][(TARGET, [over]), (SHOOTER, [Gibson])]0.974359Man. United
\n", "
" ], "text/plain": [ " sentence_idx frame_idx frame_name frame_target \\\n", "0 0 0 Draw draw \n", "3 1 1 Concede_Goal conceded \n", "5 1 3 Bring_Off return \n", "6 1 6 Bring_Off departing \n", "11 2 3 Victory triumph \n", "12 2 4 Deploy fielding \n", "13 2 5 Player full-backs \n", "14 3 1 Draw draw \n", "15 3 2 Shot nod \n", "16 3 3 Pass cross \n", "18 3 5 One_On_One two-on-one \n", "20 3 7 Intervene avert \n", "25 4 7 Being_Free isolated \n", "26 4 9 Team defence \n", "27 5 0 Control got \n", "28 5 1 Pass cross \n", "30 5 3 Challenge challenge \n", "31 5 4 Field edge \n", "33 5 6 Control latching \n", "34 5 7 Shot lofted \n", "35 5 8 Pass ball \n", "36 5 10 Shot_Supports shot \n", "37 5 11 Shot whisker \n", "\n", " changed_roles \\\n", "0 [Rangers] \n", "3 [Rangers] \n", "5 [Man. United] \n", "6 [Man. United] \n", "11 [Man. United] \n", "12 [Rangers] \n", "13 [Rangers] \n", "14 [Man. United] \n", "15 [Man. United] \n", "16 [Man. United] \n", "18 [Man. United, Rangers, Man. United] \n", "20 [Rangers] \n", "25 [Rangers] \n", "26 [Man. United] \n", "27 [Rangers, Man. United, Rangers] \n", "28 [Rangers] \n", "30 [Man. United] \n", "31 [Man. United] \n", "33 [Rangers] \n", "34 [Man. United] \n", "35 [Man. United] \n", "36 [Man. United] \n", "37 [Man. United] \n", "\n", " roles time_point first_role \n", "0 [(COMPETITION_STAGE, [from, a, tight, Anglo-Sc... 0.000000 Rangers \n", "3 [(CONCEDING_TEAM, [they]), (CONCEDING_TEAM, [W... 0.187500 Rangers \n", "5 [(SUBSTITUTED_PLAYER, [Antonio, Valencia]), (T... 0.229167 Man. United \n", "6 [(SUBSTITUTED_PLAYER, [Antonio, Valencia])] 0.291667 Man. United \n", "11 [(MATCH_LOCATION, [at, Leeds, United, AFC])] 0.433333 Man. United \n", "12 [(COACH, [his]), (PLAYER, [of, three, central,... 0.466667 Rangers \n", "13 [(PLAYER, [Steven, Whittaker, and, Kirk, Broad... 0.500000 Rangers \n", "14 [(TEAM1, [United, 's]), (MATCH_LOCATION, [at, ... 0.523810 Man. United \n", "15 [(MOVING_BALL, [Fabio, 's, right-wing, cross])... 0.547619 Man. United \n", "16 [(TARGET, [right-wing]), (PASSER, [Fabio, 's])] 0.571429 Man. United \n", "18 [(MOVING_BALL, [Fabio, 's, right-wing, cross])... 0.619048 Man. United \n", "20 [(SHOT, [the, threat]), (INTERVENING_PLAYER, [... 0.666667 Rangers \n", "25 [(RECIPIENT, [Kenny, Miller])] 0.796296 Rangers \n", "26 [(TEAM, [United, 's])] 0.833333 Man. United \n", "27 [(RECIPIENT, [Kirk, Broadfoot]), (RECIPIENT, [... 0.833333 Rangers \n", "28 [(PASSER, [Steven, Naismith])] 0.846154 Rangers \n", "30 [(OPPONENT_PLAYER, [Smalling])] 0.871795 Man. United \n", "31 [(TEAM, [United])] 0.884615 Man. United \n", "33 [(RECIPIENT, [Kirk, Broadfoot])] 0.910256 Rangers \n", "34 [(TARGET, [over, the, top]), (SHOOTER, [Ryan, ... 0.923077 Man. United \n", "35 [(TARGET, [over, the, top]), (PASSER, [Ryan, G... 0.935897 Man. United \n", "36 [(SHOOTER, [Gibson])] 0.961538 Man. United \n", "37 [(TARGET, [over]), (SHOOTER, [Gibson])] 0.974359 Man. United " ] }, "execution_count": 64, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_with_time = data_.assign(\n", " time_point= (data_\n", " .apply(lambda row: (row[\"sentence_idx\"] + row[\"frame_idx\"] / (sent_to_max_frame[row[\"sentence_idx\"]])) / (max_sent + 1), axis=1)\n", " )\n", ")\n", "\n", "\n", "data_with_first_roles = data_with_time.assign(\n", " first_role = data_with_time[\"changed_roles\"].apply(lambda roles: roles[0] if len(roles) > 0 else None)\n", ")\n", "\n", "data_with_first_roles.dropna(axis=0, subset=[\"first_role\"])" ] }, { "cell_type": "code", "execution_count": 66, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Man. United 14\n", "Rangers 9\n", "Name: first_role, dtype: int64" ] }, "execution_count": 66, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_with_first_roles.dropna(axis=0, subset=[\"first_role\"])[\"first_role\"].value_counts()" ] }, { "cell_type": "code", "execution_count": 81, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\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", " \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", " \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", " \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", " \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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sentence_idxframe_idxframe_nameframe_targetchanged_rolesrolestime_pointfirst_role
513Bring_Offreturn[Man. United][(SUBSTITUTED_PLAYER, [Antonio, Valencia]), (T...0.229167Man. United
616Bring_Offdeparting[Man. United][(SUBSTITUTED_PLAYER, [Antonio, Valencia])]0.291667Man. United
1123Victorytriumph[Man. United][(MATCH_LOCATION, [at, Leeds, United, AFC])]0.433333Man. United
1431Drawdraw[Man. United][(TEAM1, [United, 's]), (MATCH_LOCATION, [at, ...0.523810Man. United
1532Shotnod[Man. United][(MOVING_BALL, [Fabio, 's, right-wing, cross])...0.547619Man. United
1633Passcross[Man. United][(TARGET, [right-wing]), (PASSER, [Fabio, 's])]0.571429Man. United
1835One_On_Onetwo-on-one[Man. United, Rangers, Man. United][(MOVING_BALL, [Fabio, 's, right-wing, cross])...0.619048Man. United
2649Teamdefence[Man. United][(TEAM, [United, 's])]0.833333Man. United
3053Challengechallenge[Man. United][(OPPONENT_PLAYER, [Smalling])]0.871795Man. United
3154Fieldedge[Man. United][(TEAM, [United])]0.884615Man. United
3457Shotlofted[Man. United][(TARGET, [over, the, top]), (SHOOTER, [Ryan, ...0.923077Man. United
3558Passball[Man. United][(TARGET, [over, the, top]), (PASSER, [Ryan, G...0.935897Man. United
36510Shot_Supportsshot[Man. United][(SHOOTER, [Gibson])]0.961538Man. United
37511Shotwhisker[Man. United][(TARGET, [over]), (SHOOTER, [Gibson])]0.974359Man. United
\n", "
" ], "text/plain": [ " sentence_idx frame_idx frame_name frame_target \\\n", "5 1 3 Bring_Off return \n", "6 1 6 Bring_Off departing \n", "11 2 3 Victory triumph \n", "14 3 1 Draw draw \n", "15 3 2 Shot nod \n", "16 3 3 Pass cross \n", "18 3 5 One_On_One two-on-one \n", "26 4 9 Team defence \n", "30 5 3 Challenge challenge \n", "31 5 4 Field edge \n", "34 5 7 Shot lofted \n", "35 5 8 Pass ball \n", "36 5 10 Shot_Supports shot \n", "37 5 11 Shot whisker \n", "\n", " changed_roles \\\n", "5 [Man. United] \n", "6 [Man. United] \n", "11 [Man. United] \n", "14 [Man. United] \n", "15 [Man. United] \n", "16 [Man. United] \n", "18 [Man. United, Rangers, Man. United] \n", "26 [Man. United] \n", "30 [Man. United] \n", "31 [Man. United] \n", "34 [Man. United] \n", "35 [Man. United] \n", "36 [Man. United] \n", "37 [Man. United] \n", "\n", " roles time_point first_role \n", "5 [(SUBSTITUTED_PLAYER, [Antonio, Valencia]), (T... 0.229167 Man. United \n", "6 [(SUBSTITUTED_PLAYER, [Antonio, Valencia])] 0.291667 Man. United \n", "11 [(MATCH_LOCATION, [at, Leeds, United, AFC])] 0.433333 Man. United \n", "14 [(TEAM1, [United, 's]), (MATCH_LOCATION, [at, ... 0.523810 Man. United \n", "15 [(MOVING_BALL, [Fabio, 's, right-wing, cross])... 0.547619 Man. United \n", "16 [(TARGET, [right-wing]), (PASSER, [Fabio, 's])] 0.571429 Man. United \n", "18 [(MOVING_BALL, [Fabio, 's, right-wing, cross])... 0.619048 Man. United \n", "26 [(TEAM, [United, 's])] 0.833333 Man. United \n", "30 [(OPPONENT_PLAYER, [Smalling])] 0.871795 Man. United \n", "31 [(TEAM, [United])] 0.884615 Man. United \n", "34 [(TARGET, [over, the, top]), (SHOOTER, [Ryan, ... 0.923077 Man. United \n", "35 [(TARGET, [over, the, top]), (PASSER, [Ryan, G... 0.935897 Man. United \n", "36 [(SHOOTER, [Gibson])] 0.961538 Man. United \n", "37 [(TARGET, [over]), (SHOOTER, [Gibson])] 0.974359 Man. United " ] }, "execution_count": 81, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_with_first_roles[data_with_first_roles[\"first_role\"] == \"Man. United\"]" ] }, { "cell_type": "code", "execution_count": 79, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
{\n",
       "    'Intervene': 'Shot',\n",
       "    'Challenge': 'One_On_One',\n",
       "    'Award_Goal': 'Goal',\n",
       "    'Deny': 'One_On_One',\n",
       "    'Intercept': 'Pass',\n",
       "    'Shot_Supports': 'Shot',\n",
       "    'Save': 'Shot',\n",
       "    'Pass': 'Pass',\n",
       "    'Ball_Bounce': 'Motion',\n",
       "    'Mark': 'Pass',\n",
       "    'Goal_Kickoff': 'Shot',\n",
       "    'Finish': 'Shot',\n",
       "    'Beat': 'One_On_One',\n",
       "    'Offside': 'Foul',\n",
       "    'Bad_Pass': 'Pass',\n",
       "    'Goal': 'Goal',\n",
       "    'Set_Piece': 'Foul',\n",
       "    'Shot': 'Shot',\n",
       "    'Player_Move_With_Ball': 'Motion',\n",
       "    'Sanction': 'Foul',\n",
       "    'Move': 'Move',\n",
       "    'Control': 'Pass',\n",
       "    'Shoot_At': 'Shot',\n",
       "    'Start_End_Match': 'Match',\n",
       "    'Match': 'Match',\n",
       "    'Deploy': 'Lineup',\n",
       "    'Start': 'Lineup',\n",
       "    'Player_Move': 'Motion',\n",
       "    'Elimination': 'Match',\n",
       "    'Result': 'Match',\n",
       "    'Bring_Off': 'Substitution',\n",
       "    'Away_Game': 'Match',\n",
       "    'Possession': 'State_Of_Match',\n",
       "    'Pass_Combination': 'Pass',\n",
       "    'Lose_Ball': 'One_On_One',\n",
       "    'Defense_Shot': 'Mix-Up',\n",
       "    'Receive_Card': 'Foul',\n",
       "    'Victory': 'Match',\n",
       "    'Supply_Pass': 'Pass',\n",
       "    'Bring_On': 'Substitution',\n",
       "    'Chance': 'Chance',\n",
       "    'Multiple_Goals': 'Goal',\n",
       "    'One_On_One': 'One_On_One',\n",
       "    'Substitute': 'Substitution',\n",
       "    'Own_Goal': 'Goal',\n",
       "    'Convert_Chance': 'Goal',\n",
       "    'Ball_Land': 'Motion',\n",
       "    'Progression': 'Match',\n",
       "    'Home_Game': 'Match',\n",
       "    'Referee_Decision': 'Foul',\n",
       "    'Concede_Goal': 'Goal',\n",
       "    'Mistake': 'Mix-Up',\n",
       "    'Tactics': 'State_Of_Match',\n",
       "    'Foul': 'Foul',\n",
       "    'Being_Free': 'Pass',\n",
       "    'Lead': 'State_Of_Match',\n",
       "    'Create_Chance': 'Chance',\n",
       "    'Win_Compensation': 'Foul',\n",
       "    'Trail': 'State_Of_Match',\n",
       "    'Ball_Move': 'Motion',\n",
       "    'Defeat': 'Match',\n",
       "    'Dissent': 'Foul',\n",
       "    'Follow_Up': 'Shot',\n",
       "    'Score': 'State_Of_Match',\n",
       "    'Draw': 'Match',\n",
       "    'Pass_Back': 'Pass',\n",
       "    'Simulation': 'Foul',\n",
       "    'Miss_Goal': 'Shot',\n",
       "    'Miss_Chance': 'Chance',\n",
       "    'Flick_On': 'Pass',\n",
       "    'Ball_Escape': 'Motion',\n",
       "    'Give_Card': 'Foul',\n",
       "    'Take_On': 'One_On_One',\n",
       "    'Connect': 'Pass',\n",
       "    'Goalkeeper_Advance': 'Motion',\n",
       "    'Hit': 'Shot',\n",
       "    'Advantage': 'Foul',\n",
       "    'Feign': 'Shot',\n",
       "    'Overcome_Goalkeeper': 'Goal',\n",
       "    'Prepare_Goal': 'Goal',\n",
       "    'Ball': 'Actors',\n",
       "    'Spectator_Activity': 'State_Of_Match',\n",
       "    'Goal_Target': 'Field',\n",
       "    'Player': 'Actors',\n",
       "    'Referee': 'Actors',\n",
       "    'Field': 'Field',\n",
       "    'Team': 'Actors',\n",
       "    'Bench': 'Field',\n",
       "    'Coach': 'Actors',\n",
       "    'Concede_Compensation': 'Foul',\n",
       "    'Match_Temporal_Subdivision': 'Match',\n",
       "    'Confusion': 'Mix-up',\n",
       "    'Score_Goal': 'Goal',\n",
       "    'Celebrate_Goal': 'Goal',\n",
       "    'Suspension': 'Lineup',\n",
       "    'Spectators': 'Actors',\n",
       "    'Competition_Stage': 'Competition',\n",
       "    'Body_Parts': 'Actors',\n",
       "    'Trick': 'One_On_One',\n",
       "    'Competition': 'Competition',\n",
       "    'Stadium': 'Field',\n",
       "    'Match_Quality': 'State_Of_Match',\n",
       "    'Ball_And_Goal': 'Shot',\n",
       "    'Equipment': 'Actors',\n",
       "    'Injuries': 'Foul',\n",
       "    'Shot_Quality': 'Shot'\n",
       "}\n",
       "
\n" ], "text/plain": [ "\u001b[1m{\u001b[0m\n", " \u001b[32m'Intervene'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Challenge'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Award_Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Deny'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Intercept'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Shot_Supports'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Save'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Pass'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Ball_Bounce'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Mark'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Goal_Kickoff'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Finish'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Beat'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Offside'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Bad_Pass'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Set_Piece'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Shot'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Player_Move_With_Ball'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Sanction'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Move'\u001b[0m: \u001b[32m'Move'\u001b[0m,\n", " \u001b[32m'Control'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Shoot_At'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Start_End_Match'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Match'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Deploy'\u001b[0m: \u001b[32m'Lineup'\u001b[0m,\n", " \u001b[32m'Start'\u001b[0m: \u001b[32m'Lineup'\u001b[0m,\n", " \u001b[32m'Player_Move'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Elimination'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Result'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Bring_Off'\u001b[0m: \u001b[32m'Substitution'\u001b[0m,\n", " \u001b[32m'Away_Game'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Possession'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Pass_Combination'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Lose_Ball'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Defense_Shot'\u001b[0m: \u001b[32m'Mix-Up'\u001b[0m,\n", " \u001b[32m'Receive_Card'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Victory'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Supply_Pass'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Bring_On'\u001b[0m: \u001b[32m'Substitution'\u001b[0m,\n", " \u001b[32m'Chance'\u001b[0m: \u001b[32m'Chance'\u001b[0m,\n", " \u001b[32m'Multiple_Goals'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'One_On_One'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Substitute'\u001b[0m: \u001b[32m'Substitution'\u001b[0m,\n", " \u001b[32m'Own_Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Convert_Chance'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Ball_Land'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Progression'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Home_Game'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Referee_Decision'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Concede_Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Mistake'\u001b[0m: \u001b[32m'Mix-Up'\u001b[0m,\n", " \u001b[32m'Tactics'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Foul'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Being_Free'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Lead'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Create_Chance'\u001b[0m: \u001b[32m'Chance'\u001b[0m,\n", " \u001b[32m'Win_Compensation'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Trail'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Ball_Move'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Defeat'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Dissent'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Follow_Up'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Score'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Draw'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Pass_Back'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Simulation'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Miss_Goal'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Miss_Chance'\u001b[0m: \u001b[32m'Chance'\u001b[0m,\n", " \u001b[32m'Flick_On'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Ball_Escape'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Give_Card'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Take_On'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Connect'\u001b[0m: \u001b[32m'Pass'\u001b[0m,\n", " \u001b[32m'Goalkeeper_Advance'\u001b[0m: \u001b[32m'Motion'\u001b[0m,\n", " \u001b[32m'Hit'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Advantage'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Feign'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Overcome_Goalkeeper'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Prepare_Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Ball'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Spectator_Activity'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Goal_Target'\u001b[0m: \u001b[32m'Field'\u001b[0m,\n", " \u001b[32m'Player'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Referee'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Field'\u001b[0m: \u001b[32m'Field'\u001b[0m,\n", " \u001b[32m'Team'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Bench'\u001b[0m: \u001b[32m'Field'\u001b[0m,\n", " \u001b[32m'Coach'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Concede_Compensation'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Match_Temporal_Subdivision'\u001b[0m: \u001b[32m'Match'\u001b[0m,\n", " \u001b[32m'Confusion'\u001b[0m: \u001b[32m'Mix-up'\u001b[0m,\n", " \u001b[32m'Score_Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Celebrate_Goal'\u001b[0m: \u001b[32m'Goal'\u001b[0m,\n", " \u001b[32m'Suspension'\u001b[0m: \u001b[32m'Lineup'\u001b[0m,\n", " \u001b[32m'Spectators'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Competition_Stage'\u001b[0m: \u001b[32m'Competition'\u001b[0m,\n", " \u001b[32m'Body_Parts'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Trick'\u001b[0m: \u001b[32m'One_On_One'\u001b[0m,\n", " \u001b[32m'Competition'\u001b[0m: \u001b[32m'Competition'\u001b[0m,\n", " \u001b[32m'Stadium'\u001b[0m: \u001b[32m'Field'\u001b[0m,\n", " \u001b[32m'Match_Quality'\u001b[0m: \u001b[32m'State_Of_Match'\u001b[0m,\n", " \u001b[32m'Ball_And_Goal'\u001b[0m: \u001b[32m'Shot'\u001b[0m,\n", " \u001b[32m'Equipment'\u001b[0m: \u001b[32m'Actors'\u001b[0m,\n", " \u001b[32m'Injuries'\u001b[0m: \u001b[32m'Foul'\u001b[0m,\n", " \u001b[32m'Shot_Quality'\u001b[0m: \u001b[32m'Shot'\u001b[0m\n", "\u001b[1m}\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
{\n",
       "    'Intervene': 'ON_THE_PITCH',\n",
       "    'Challenge': 'ON_THE_PITCH',\n",
       "    'Award_Goal': 'ON_THE_PITCH',\n",
       "    'Deny': 'ON_THE_PITCH',\n",
       "    'Intercept': 'ON_THE_PITCH',\n",
       "    'Shot_Supports': 'SUPPORTS',\n",
       "    'Save': 'ON_THE_PITCH',\n",
       "    'Pass': 'ON_THE_PITCH',\n",
       "    'Ball_Bounce': 'ON_THE_PITCH',\n",
       "    'Mark': 'ON_THE_PITCH',\n",
       "    'Goal_Kickoff': 'ON_THE_PITCH',\n",
       "    'Finish': 'ON_THE_PITCH',\n",
       "    'Beat': 'ON_THE_PITCH',\n",
       "    'Offside': 'ON_THE_PITCH',\n",
       "    'Bad_Pass': 'ON_THE_PITCH',\n",
       "    'Goal': 'ON_THE_PITCH',\n",
       "    'Set_Piece': 'ON_THE_PITCH',\n",
       "    'Shot': 'ON_THE_PITCH',\n",
       "    'Player_Move_With_Ball': 'ON_THE_PITCH',\n",
       "    'Sanction': 'ON_THE_PITCH',\n",
       "    'Move': 'ON_THE_PITCH',\n",
       "    'Control': 'ON_THE_PITCH',\n",
       "    'Shoot_At': 'ON_THE_PITCH',\n",
       "    'Start_End_Match': 'MATCH_IN_A_COMPETITION',\n",
       "    'Match': 'MATCH_IN_A_COMPETITION',\n",
       "    'Deploy': 'MATCH_IN_A_COMPETITION',\n",
       "    'Start': 'MATCH_IN_A_COMPETITION',\n",
       "    'Player_Move': 'ON_THE_PITCH',\n",
       "    'Elimination': 'MATCH_IN_A_COMPETITION',\n",
       "    'Result': 'MATCH_IN_A_COMPETITION',\n",
       "    'Bring_Off': 'ON_THE_PITCH',\n",
       "    'Away_Game': 'MATCH_IN_A_COMPETITION',\n",
       "    'Possession': 'ON_THE_PITCH',\n",
       "    'Pass_Combination': 'ON_THE_PITCH',\n",
       "    'Lose_Ball': 'ON_THE_PITCH',\n",
       "    'Defense_Shot': 'ON_THE_PITCH',\n",
       "    'Receive_Card': 'SUPPORTS',\n",
       "    'Victory': 'MATCH_IN_A_COMPETITION',\n",
       "    'Supply_Pass': 'SUPPORTS',\n",
       "    'Bring_On': 'ON_THE_PITCH',\n",
       "    'Chance': 'ON_THE_PITCH',\n",
       "    'Multiple_Goals': 'ON_THE_PITCH',\n",
       "    'One_On_One': 'ON_THE_PITCH',\n",
       "    'Substitute': 'ON_THE_PITCH',\n",
       "    'Own_Goal': 'ON_THE_PITCH',\n",
       "    'Convert_Chance': 'ON_THE_PITCH',\n",
       "    'Ball_Land': 'ON_THE_PITCH',\n",
       "    'Progression': 'MATCH_IN_A_COMPETITION',\n",
       "    'Home_Game': 'MATCH_IN_A_COMPETITION',\n",
       "    'Referee_Decision': 'ON_THE_PITCH',\n",
       "    'Concede_Goal': 'SUPPORTS',\n",
       "    'Mistake': 'ON_THE_PITCH',\n",
       "    'Tactics': 'ON_THE_PITCH',\n",
       "    'Foul': 'ON_THE_PITCH',\n",
       "    'Being_Free': 'ON_THE_PITCH',\n",
       "    'Lead': 'MATCH_IN_A_COMPETITION',\n",
       "    'Create_Chance': 'ON_THE_PITCH',\n",
       "    'Win_Compensation': 'ON_THE_PITCH',\n",
       "    'Trail': 'MATCH_IN_A_COMPETITION',\n",
       "    'Ball_Move': 'ON_THE_PITCH',\n",
       "    'Defeat': 'MATCH_IN_A_COMPETITION',\n",
       "    'Dissent': 'ON_THE_PITCH',\n",
       "    'Follow_Up': 'ON_THE_PITCH',\n",
       "    'Score': 'MATCH_IN_A_COMPETITION',\n",
       "    'Draw': 'MATCH_IN_A_COMPETITION',\n",
       "    'Pass_Back': 'ON_THE_PITCH',\n",
       "    'Simulation': 'ON_THE_PITCH',\n",
       "    'Miss_Goal': 'ON_THE_PITCH',\n",
       "    'Miss_Chance': 'ON_THE_PITCH',\n",
       "    'Flick_On': 'ON_THE_PITCH',\n",
       "    'Ball_Escape': 'ON_THE_PITCH',\n",
       "    'Give_Card': 'SUPPORTS',\n",
       "    'Take_On': 'ON_THE_PITCH',\n",
       "    'Connect': 'ON_THE_PITCH',\n",
       "    'Goalkeeper_Advance': 'ON_THE_PITCH',\n",
       "    'Hit': 'ON_THE_PITCH',\n",
       "    'Advantage': 'ON_THE_PITCH',\n",
       "    'Feign': 'ON_THE_PITCH',\n",
       "    'Overcome_Goalkeeper': 'ON_THE_PITCH',\n",
       "    'Prepare_Goal': 'ON_THE_PITCH',\n",
       "    'Ball': 'ACTORS_AND_OBJECTS',\n",
       "    'Spectator_Activity': 'ON_THE_PITCH',\n",
       "    'Goal_Target': 'ACTORS_AND_OBJECTS',\n",
       "    'Player': 'ACTORS_AND_OBJECTS',\n",
       "    'Referee': 'ACTORS_AND_OBJECTS',\n",
       "    'Field': 'ACTORS_AND_OBJECTS',\n",
       "    'Team': 'ACTORS_AND_OBJECTS',\n",
       "    'Bench': 'ACTORS_AND_OBJECTS',\n",
       "    'Coach': 'ACTORS_AND_OBJECTS',\n",
       "    'Concede_Compensation': 'ON_THE_PITCH',\n",
       "    'Match_Temporal_Subdivision': 'MATCH_IN_A_COMPETITION',\n",
       "    'Confusion': 'ON_THE_PITCH',\n",
       "    'Score_Goal': 'ON_THE_PITCH',\n",
       "    'Celebrate_Goal': 'ON_THE_PITCH',\n",
       "    'Suspension': 'MATCH_IN_A_COMPETITION',\n",
       "    'Spectators': 'ACTORS_AND_OBJECTS',\n",
       "    'Competition_Stage': 'ACTORS_AND_OBJECTS',\n",
       "    'Body_Parts': 'ACTORS_AND_OBJECTS',\n",
       "    'Trick': 'ON_THE_PITCH',\n",
       "    'Competition': 'ACTORS_AND_OBJECTS',\n",
       "    'Stadium': 'ACTORS_AND_OBJECTS',\n",
       "    'Match_Quality': 'ON_THE_PITCH',\n",
       "    'Ball_And_Goal': 'ACTORS_AND_OBJECTS',\n",
       "    'Equipment': 'ACTORS_AND_OBJECTS',\n",
       "    'Injuries': 'ON_THE_PITCH',\n",
       "    'Shot_Quality': 'ON_THE_PITCH'\n",
       "}\n",
       "
\n" ], "text/plain": [ "\u001b[1m{\u001b[0m\n", " \u001b[32m'Intervene'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Challenge'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Award_Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Deny'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Intercept'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Shot_Supports'\u001b[0m: \u001b[32m'SUPPORTS'\u001b[0m,\n", " \u001b[32m'Save'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Pass'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Ball_Bounce'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Mark'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Goal_Kickoff'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Finish'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Beat'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Offside'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Bad_Pass'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Set_Piece'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Shot'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Player_Move_With_Ball'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Sanction'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Move'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Control'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Shoot_At'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Start_End_Match'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Match'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Deploy'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Start'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Player_Move'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Elimination'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Result'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Bring_Off'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Away_Game'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Possession'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Pass_Combination'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Lose_Ball'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Defense_Shot'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Receive_Card'\u001b[0m: \u001b[32m'SUPPORTS'\u001b[0m,\n", " \u001b[32m'Victory'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Supply_Pass'\u001b[0m: \u001b[32m'SUPPORTS'\u001b[0m,\n", " \u001b[32m'Bring_On'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Chance'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Multiple_Goals'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'One_On_One'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Substitute'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Own_Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Convert_Chance'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Ball_Land'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Progression'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Home_Game'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Referee_Decision'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Concede_Goal'\u001b[0m: \u001b[32m'SUPPORTS'\u001b[0m,\n", " \u001b[32m'Mistake'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Tactics'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Foul'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Being_Free'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Lead'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Create_Chance'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Win_Compensation'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Trail'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Ball_Move'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Defeat'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Dissent'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Follow_Up'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Score'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Draw'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Pass_Back'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Simulation'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Miss_Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Miss_Chance'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Flick_On'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Ball_Escape'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Give_Card'\u001b[0m: \u001b[32m'SUPPORTS'\u001b[0m,\n", " \u001b[32m'Take_On'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Connect'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Goalkeeper_Advance'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Hit'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Advantage'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Feign'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Overcome_Goalkeeper'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Prepare_Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Ball'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Spectator_Activity'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Goal_Target'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Player'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Referee'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Field'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Team'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Bench'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Coach'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Concede_Compensation'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Match_Temporal_Subdivision'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Confusion'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Score_Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Celebrate_Goal'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Suspension'\u001b[0m: \u001b[32m'MATCH_IN_A_COMPETITION'\u001b[0m,\n", " \u001b[32m'Spectators'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Competition_Stage'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Body_Parts'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Trick'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Competition'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Stadium'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Match_Quality'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Ball_And_Goal'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Equipment'\u001b[0m: \u001b[32m'ACTORS_AND_OBJECTS'\u001b[0m,\n", " \u001b[32m'Injuries'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m,\n", " \u001b[32m'Shot_Quality'\u001b[0m: \u001b[32m'ON_THE_PITCH'\u001b[0m\n", "\u001b[1m}\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from lxml import etree as ET\n", "kicktionary = ET.parse(\"kicktionary_lu_info.xml\")\n", "frame_to_scenario = {\n", " lu.attrib[\"frame\"]: lu.attrib[\"scenario\"]\n", " for lu in kicktionary.xpath(\".//LEXICAL-UNIT\") if lu.attrib[\"frame\"]\n", "}\n", "frame_to_super_scenario = {\n", " lu.attrib[\"frame\"]: lu.attrib[\"super-scenario\"]\n", " for lu in kicktionary.xpath(\".//LEXICAL-UNIT\") if lu.attrib[\"frame\"]\n", "}\n", "\n", "print(frame_to_scenario)\n", "print(frame_to_super_scenario)" ] } ], "metadata": { "interpreter": { "hash": "1c3e697aa4e6ae3f4f7b554c053a671f50a0156c07fd90d57948174b29e29a61" }, "kernelspec": { "display_name": "Python 3.9.7 ('perspredict')", "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.9.7" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }