add images

This commit is contained in:
shoneyj 2023-05-25 23:00:58 +02:00
parent 5c2989618f
commit c451e4bebe
4 changed files with 197 additions and 202 deletions

View file

@ -7,3 +7,6 @@ A Wikipedia dump file is also required for this procedure the latest such Englis
You can export the text and editing history of a particular page or set of pages wrapped in XML. \cite{kdnug} You can export the text and editing history of a particular page or set of pages wrapped in XML. \cite{kdnug}
We exported XML file witg We exported XML file witg
\includesvg{images/pronoun.svg}

89
doc/images/pronoun.svg Normal file
View file

@ -0,0 +1,89 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" id="331d5f4823ee4589a364fe16cc1fffe6-0" class="displacy" width="1250" height="362.0" direction="ltr" style="max-width: none; height: 362.0px; color: black; background: white; font-family: Source Sans Pro; direction: ltr">
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="50">Ford</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="50">PROPN</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="200">does</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="200">AUX</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="350">not</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="350">PART</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="500">recomend</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="500">VERB</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="650">Fx01.</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="650">PROPN</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="800">It</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="800">PRON</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="950">recommends</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="950">VERB</tspan>
</text>
<text class="displacy-token" fill="currentColor" text-anchor="middle" y="272.0">
<tspan class="displacy-word" fill="currentColor" x="1100">Fx05</tspan>
<tspan class="displacy-tag" dy="2em" fill="currentColor" x="1100">PROPN</tspan>
</text>
<g class="displacy-arrow">
<path class="displacy-arc" id="arrow-331d5f4823ee4589a364fe16cc1fffe6-0-0" stroke-width="2px" d="M62,227.0 62,152.0 500.0,152.0 500.0,227.0" fill="none" stroke="currentColor"/>
<text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
<textPath xlink:href="#arrow-331d5f4823ee4589a364fe16cc1fffe6-0-0" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">nsubj</textPath>
</text>
<path class="displacy-arrowhead" d="M62,229.0 L58,221.0 66,221.0" fill="currentColor"/>
</g>
<g class="displacy-arrow">
<path class="displacy-arc" id="arrow-331d5f4823ee4589a364fe16cc1fffe6-0-1" stroke-width="2px" d="M212,227.0 212,177.0 497.0,177.0 497.0,227.0" fill="none" stroke="currentColor"/>
<text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
<textPath xlink:href="#arrow-331d5f4823ee4589a364fe16cc1fffe6-0-1" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">aux</textPath>
</text>
<path class="displacy-arrowhead" d="M212,229.0 L208,221.0 216,221.0" fill="currentColor"/>
</g>
<g class="displacy-arrow">
<path class="displacy-arc" id="arrow-331d5f4823ee4589a364fe16cc1fffe6-0-2" stroke-width="2px" d="M362,227.0 362,202.0 494.0,202.0 494.0,227.0" fill="none" stroke="currentColor"/>
<text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
<textPath xlink:href="#arrow-331d5f4823ee4589a364fe16cc1fffe6-0-2" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">neg</textPath>
</text>
<path class="displacy-arrowhead" d="M362,229.0 L358,221.0 366,221.0" fill="currentColor"/>
</g>
<g class="displacy-arrow">
<path class="displacy-arc" id="arrow-331d5f4823ee4589a364fe16cc1fffe6-0-3" stroke-width="2px" d="M512,227.0 512,202.0 644.0,202.0 644.0,227.0" fill="none" stroke="currentColor"/>
<text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
<textPath xlink:href="#arrow-331d5f4823ee4589a364fe16cc1fffe6-0-3" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">dobj</textPath>
</text>
<path class="displacy-arrowhead" d="M644.0,229.0 L648.0,221.0 640.0,221.0" fill="currentColor"/>
</g>
<g class="displacy-arrow">
<path class="displacy-arc" id="arrow-331d5f4823ee4589a364fe16cc1fffe6-0-4" stroke-width="2px" d="M812,227.0 812,202.0 944.0,202.0 944.0,227.0" fill="none" stroke="currentColor"/>
<text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
<textPath xlink:href="#arrow-331d5f4823ee4589a364fe16cc1fffe6-0-4" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">nsubj</textPath>
</text>
<path class="displacy-arrowhead" d="M812,229.0 L808,221.0 816,221.0" fill="currentColor"/>
</g>
<g class="displacy-arrow">
<path class="displacy-arc" id="arrow-331d5f4823ee4589a364fe16cc1fffe6-0-5" stroke-width="2px" d="M962,227.0 962,202.0 1094.0,202.0 1094.0,227.0" fill="none" stroke="currentColor"/>
<text dy="1.25em" style="font-size: 0.8em; letter-spacing: 1px">
<textPath xlink:href="#arrow-331d5f4823ee4589a364fe16cc1fffe6-0-5" class="displacy-label" startOffset="50%" side="left" fill="currentColor" text-anchor="middle">dobj</textPath>
</text>
<path class="displacy-arrowhead" d="M1094.0,229.0 L1098.0,221.0 1090.0,221.0" fill="currentColor"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -1,5 +1,7 @@
\documentclass[12pt,a4paper,twoside]{report} \documentclass[12pt,a4paper,twoside]{report}
\usepackage[sorting=ynt,backend=biber]{biblatex} \usepackage[sorting=ynt,backend=biber]{biblatex}
% \usepackage{svg}
\usepackage[inkscapeformat=png]{svg}
\addbibresource{References.bib} \addbibresource{References.bib}
\includeonly{preliminary/title.tex,% \includeonly{preliminary/title.tex,%
preliminary/dedication.tex,% preliminary/dedication.tex,%

View file

@ -10,30 +10,30 @@
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"Requirement already satisfied: spacy in /home/shoney/dev/.venv/lib/python3.9/site-packages (3.5.3)\n", "Requirement already satisfied: spacy in /home/shoney/dev/.venv/lib/python3.9/site-packages (3.5.3)\n",
"Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.0.4)\n", "Requirement already satisfied: typer<0.8.0,>=0.3.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (0.7.0)\n",
"Requirement already satisfied: jinja2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.1.2)\n",
"Requirement already satisfied: setuptools in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (57.4.0)\n",
"Requirement already satisfied: numpy>=1.15.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.24.3)\n", "Requirement already satisfied: numpy>=1.15.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.24.3)\n",
"Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.3.0)\n",
"Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.0.8)\n",
"Requirement already satisfied: smart-open<7.0.0,>=5.2.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (6.3.0)\n",
"Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.0.12)\n", "Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.0.12)\n",
"Requirement already satisfied: packaging>=20.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (23.1)\n", "Requirement already satisfied: packaging>=20.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (23.1)\n",
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.0.7)\n",
"Requirement already satisfied: typer<0.8.0,>=0.3.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (0.7.0)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.0.9)\n",
"Requirement already satisfied: jinja2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.1.2)\n",
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.0.8)\n",
"Requirement already satisfied: requests<3.0.0,>=2.13.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.31.0)\n", "Requirement already satisfied: requests<3.0.0,>=2.13.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.31.0)\n",
"Requirement already satisfied: setuptools in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (57.4.0)\n", "Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.10.8)\n",
"Requirement already satisfied: pathy>=0.10.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (0.10.1)\n",
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (4.65.0)\n", "Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (4.65.0)\n",
"Requirement already satisfied: thinc<8.2.0,>=8.1.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (8.1.10)\n", "Requirement already satisfied: thinc<8.2.0,>=8.1.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (8.1.10)\n",
"Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.4.6)\n", "Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.0.4)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.0.9)\n",
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.0.8)\n",
"Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.0.8)\n",
"Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (3.3.0)\n",
"Requirement already satisfied: pathy>=0.10.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (0.10.1)\n",
"Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.1.1)\n", "Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.1.1)\n",
"Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (1.10.8)\n", "Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.0.7)\n",
"Requirement already satisfied: smart-open<7.0.0,>=5.2.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (6.3.0)\n",
"Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy) (2.4.6)\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy) (4.6.1)\n", "Requirement already satisfied: typing-extensions>=4.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy) (4.6.1)\n",
"Requirement already satisfied: idna<4,>=2.5 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (3.4)\n", "Requirement already satisfied: idna<4,>=2.5 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (3.4)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (3.1.0)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (2.0.2)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (2.0.2)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (3.1.0)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (2023.5.7)\n", "Requirement already satisfied: certifi>=2017.4.17 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy) (2023.5.7)\n",
"Requirement already satisfied: blis<0.8.0,>=0.7.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy) (0.7.9)\n", "Requirement already satisfied: blis<0.8.0,>=0.7.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy) (0.7.9)\n",
"Requirement already satisfied: confection<1.0.0,>=0.0.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy) (0.0.4)\n", "Requirement already satisfied: confection<1.0.0,>=0.0.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy) (0.0.4)\n",
@ -59,35 +59,35 @@
"text": [ "text": [
"Collecting en-core-web-sm==3.5.0\n", "Collecting en-core-web-sm==3.5.0\n",
" Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl (12.8 MB)\n", " Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl (12.8 MB)\n",
"\u001b[K |████████████████████████████████| 12.8 MB 7.9 MB/s eta 0:00:01\n", "\u001b[K |████████████████████████████████| 12.8 MB 625 kB/s eta 0:00:01\n",
"\u001b[?25hRequirement already satisfied: spacy<3.6.0,>=3.5.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from en-core-web-sm==3.5.0) (3.5.3)\n", "\u001b[?25hRequirement already satisfied: spacy<3.6.0,>=3.5.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from en-core-web-sm==3.5.0) (3.5.3)\n",
"Requirement already satisfied: setuptools in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (57.4.0)\n", "Requirement already satisfied: numpy>=1.15.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.24.3)\n",
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.0.8)\n", "Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.0.8)\n",
"Requirement already satisfied: jinja2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.1.2)\n",
"Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.1.1)\n",
"Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.4.6)\n",
"Requirement already satisfied: packaging>=20.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (23.1)\n", "Requirement already satisfied: packaging>=20.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (23.1)\n",
"Requirement already satisfied: thinc<8.2.0,>=8.1.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (8.1.10)\n",
"Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.10.8)\n",
"Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.0.4)\n",
"Requirement already satisfied: requests<3.0.0,>=2.13.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.31.0)\n",
"Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.0.8)\n",
"Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.0.12)\n",
"Requirement already satisfied: typer<0.8.0,>=0.3.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.7.0)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.0.9)\n",
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.0.7)\n",
"Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.3.0)\n",
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (4.65.0)\n",
"Requirement already satisfied: pathy>=0.10.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.10.1)\n", "Requirement already satisfied: pathy>=0.10.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.10.1)\n",
"Requirement already satisfied: smart-open<7.0.0,>=5.2.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (6.3.0)\n", "Requirement already satisfied: smart-open<7.0.0,>=5.2.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (6.3.0)\n",
"Requirement already satisfied: numpy>=1.15.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.24.3)\n", "Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.0.4)\n",
"Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.0.12)\n",
"Requirement already satisfied: typer<0.8.0,>=0.3.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.7.0)\n",
"Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.4.6)\n",
"Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.3.0)\n",
"Requirement already satisfied: requests<3.0.0,>=2.13.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.31.0)\n",
"Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.0.8)\n",
"Requirement already satisfied: setuptools in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (57.4.0)\n",
"Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.10.8)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.0.9)\n",
"Requirement already satisfied: jinja2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.1.2)\n",
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.0.7)\n",
"Requirement already satisfied: thinc<8.2.0,>=8.1.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (8.1.10)\n",
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (4.65.0)\n",
"Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (1.1.1)\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (4.6.1)\n", "Requirement already satisfied: typing-extensions>=4.2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (4.6.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2023.5.7)\n", "Requirement already satisfied: certifi>=2017.4.17 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2023.5.7)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.1.0)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.0.2)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.0.2)\n",
"Requirement already satisfied: idna<4,>=2.5 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.4)\n", "Requirement already satisfied: idna<4,>=2.5 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.4)\n",
"Requirement already satisfied: charset-normalizer<4,>=2 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from requests<3.0.0,>=2.13.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (3.1.0)\n",
"Requirement already satisfied: confection<1.0.0,>=0.0.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.0.4)\n",
"Requirement already satisfied: blis<0.8.0,>=0.7.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.7.9)\n", "Requirement already satisfied: blis<0.8.0,>=0.7.8 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.7.9)\n",
"Requirement already satisfied: confection<1.0.0,>=0.0.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from thinc<8.2.0,>=8.1.8->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (0.0.4)\n",
"Requirement already satisfied: click<9.0.0,>=7.1.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from typer<0.8.0,>=0.3.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (8.1.3)\n", "Requirement already satisfied: click<9.0.0,>=7.1.1 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from typer<0.8.0,>=0.3.0->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (8.1.3)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from jinja2->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.1.2)\n", "Requirement already satisfied: MarkupSafe>=2.0 in /home/shoney/dev/.venv/lib/python3.9/site-packages (from jinja2->spacy<3.6.0,>=3.5.0->en-core-web-sm==3.5.0) (2.1.2)\n",
"\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.1.2 is available.\n", "\u001b[33mWARNING: You are using pip version 21.2.3; however, version 23.1.2 is available.\n",
@ -103,13 +103,17 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"import spacy\n", "import spacy\n",
"from spacy import displacy\n", "from spacy import displacy\n",
"nlp = spacy.load(\"en_core_web_sm\")" "from pathlib import Path\n",
"nlp = spacy.load(\"en_core_web_sm\")\n",
"\n",
"options = {\"compact\": True, \"bg\": \"white\",\n",
" \"color\": \"black\", \"font\": \"Source Sans Pro\"}"
] ]
}, },
{ {
@ -152,13 +156,13 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/html": [ "text/html": [
"<span class=\"tex2jax_ignore\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"64d48cc34c4541a2a0de32a9004ec6d5-0\" class=\"displacy\" width=\"3725\" height=\"399.5\" direction=\"ltr\" style=\"max-width: none; height: 399.5px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n", "<span class=\"tex2jax_ignore\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"0b9417964b38464fae70b5e94898d8e5-0\" class=\"displacy\" width=\"3725\" height=\"399.5\" direction=\"ltr\" style=\"max-width: none; height: 399.5px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n", "<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">Motor</tspan>\n", " <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">Motor</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">NOUN</tspan>\n", " <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">NOUN</tspan>\n",
@ -265,161 +269,161 @@
"</text>\n", "</text>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-0\" stroke-width=\"2px\" d=\"M70,264.5 C70,177.0 215.0,177.0 215.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-0\" stroke-width=\"2px\" d=\"M70,264.5 C70,177.0 215.0,177.0 215.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M70,266.5 L62,254.5 78,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M70,266.5 L62,254.5 78,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-1\" stroke-width=\"2px\" d=\"M245,264.5 C245,2.0 1275.0,2.0 1275.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-1\" stroke-width=\"2px\" d=\"M245,264.5 C245,2.0 1275.0,2.0 1275.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M245,266.5 L237,254.5 253,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M245,266.5 L237,254.5 253,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-2\" stroke-width=\"2px\" d=\"M420,264.5 C420,177.0 565.0,177.0 565.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-2\" stroke-width=\"2px\" d=\"M420,264.5 C420,177.0 565.0,177.0 565.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M420,266.5 L412,254.5 428,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M420,266.5 L412,254.5 428,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-3\" stroke-width=\"2px\" d=\"M245,264.5 C245,89.5 570.0,89.5 570.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-3\" stroke-width=\"2px\" d=\"M245,264.5 C245,89.5 570.0,89.5 570.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">conj</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">conj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M570.0,266.5 L578.0,254.5 562.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M570.0,266.5 L578.0,254.5 562.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-4\" stroke-width=\"2px\" d=\"M595,264.5 C595,177.0 740.0,177.0 740.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-4\" stroke-width=\"2px\" d=\"M595,264.5 C595,177.0 740.0,177.0 740.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">cc</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">cc</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M740.0,266.5 L748.0,254.5 732.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M740.0,266.5 L748.0,254.5 732.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-5\" stroke-width=\"2px\" d=\"M945,264.5 C945,177.0 1090.0,177.0 1090.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-5\" stroke-width=\"2px\" d=\"M945,264.5 C945,177.0 1090.0,177.0 1090.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M945,266.5 L937,254.5 953,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M945,266.5 L937,254.5 953,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-6\" stroke-width=\"2px\" d=\"M595,264.5 C595,89.5 1095.0,89.5 1095.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-6\" stroke-width=\"2px\" d=\"M595,264.5 C595,89.5 1095.0,89.5 1095.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-6\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">conj</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-6\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">conj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M1095.0,266.5 L1103.0,254.5 1087.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M1095.0,266.5 L1103.0,254.5 1087.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-7\" stroke-width=\"2px\" d=\"M1470,264.5 C1470,177.0 1615.0,177.0 1615.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-7\" stroke-width=\"2px\" d=\"M1470,264.5 C1470,177.0 1615.0,177.0 1615.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-7\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-7\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M1470,266.5 L1462,254.5 1478,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M1470,266.5 L1462,254.5 1478,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-8\" stroke-width=\"2px\" d=\"M1295,264.5 C1295,89.5 1620.0,89.5 1620.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-8\" stroke-width=\"2px\" d=\"M1295,264.5 C1295,89.5 1620.0,89.5 1620.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-8\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">attr</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-8\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">attr</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M1620.0,266.5 L1628.0,254.5 1612.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M1620.0,266.5 L1628.0,254.5 1612.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-9\" stroke-width=\"2px\" d=\"M1645,264.5 C1645,177.0 1790.0,177.0 1790.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-9\" stroke-width=\"2px\" d=\"M1645,264.5 C1645,177.0 1790.0,177.0 1790.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-9\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-9\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M1790.0,266.5 L1798.0,254.5 1782.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M1790.0,266.5 L1798.0,254.5 1782.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-10\" stroke-width=\"2px\" d=\"M1995,264.5 C1995,177.0 2140.0,177.0 2140.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-10\" stroke-width=\"2px\" d=\"M1995,264.5 C1995,177.0 2140.0,177.0 2140.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-10\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-10\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M1995,266.5 L1987,254.5 2003,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M1995,266.5 L1987,254.5 2003,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-11\" stroke-width=\"2px\" d=\"M1820,264.5 C1820,89.5 2145.0,89.5 2145.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-11\" stroke-width=\"2px\" d=\"M1820,264.5 C1820,89.5 2145.0,89.5 2145.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-11\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-11\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M2145.0,266.5 L2153.0,254.5 2137.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M2145.0,266.5 L2153.0,254.5 2137.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-12\" stroke-width=\"2px\" d=\"M2170,264.5 C2170,177.0 2315.0,177.0 2315.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-12\" stroke-width=\"2px\" d=\"M2170,264.5 C2170,177.0 2315.0,177.0 2315.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-12\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">acl</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-12\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">acl</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M2315.0,266.5 L2323.0,254.5 2307.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M2315.0,266.5 L2323.0,254.5 2307.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-13\" stroke-width=\"2px\" d=\"M2345,264.5 C2345,177.0 2490.0,177.0 2490.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-13\" stroke-width=\"2px\" d=\"M2345,264.5 C2345,177.0 2490.0,177.0 2490.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-13\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-13\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M2490.0,266.5 L2498.0,254.5 2482.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M2490.0,266.5 L2498.0,254.5 2482.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-14\" stroke-width=\"2px\" d=\"M2695,264.5 C2695,177.0 2840.0,177.0 2840.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-14\" stroke-width=\"2px\" d=\"M2695,264.5 C2695,177.0 2840.0,177.0 2840.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-14\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-14\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M2695,266.5 L2687,254.5 2703,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M2695,266.5 L2687,254.5 2703,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-15\" stroke-width=\"2px\" d=\"M2520,264.5 C2520,89.5 2845.0,89.5 2845.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-15\" stroke-width=\"2px\" d=\"M2520,264.5 C2520,89.5 2845.0,89.5 2845.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-15\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-15\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M2845.0,266.5 L2853.0,254.5 2837.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M2845.0,266.5 L2853.0,254.5 2837.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-16\" stroke-width=\"2px\" d=\"M2870,264.5 C2870,177.0 3015.0,177.0 3015.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-16\" stroke-width=\"2px\" d=\"M2870,264.5 C2870,177.0 3015.0,177.0 3015.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-16\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-16\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M3015.0,266.5 L3023.0,254.5 3007.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M3015.0,266.5 L3023.0,254.5 3007.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-17\" stroke-width=\"2px\" d=\"M3220,264.5 C3220,177.0 3365.0,177.0 3365.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-17\" stroke-width=\"2px\" d=\"M3220,264.5 C3220,177.0 3365.0,177.0 3365.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-17\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-17\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M3220,266.5 L3212,254.5 3228,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M3220,266.5 L3212,254.5 3228,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-18\" stroke-width=\"2px\" d=\"M3395,264.5 C3395,177.0 3540.0,177.0 3540.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-18\" stroke-width=\"2px\" d=\"M3395,264.5 C3395,177.0 3540.0,177.0 3540.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-18\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-18\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">compound</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M3395,266.5 L3387,254.5 3403,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M3395,266.5 L3387,254.5 3403,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-19\" stroke-width=\"2px\" d=\"M3045,264.5 C3045,89.5 3545.0,89.5 3545.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-0b9417964b38464fae70b5e94898d8e5-0-19\" stroke-width=\"2px\" d=\"M3045,264.5 C3045,89.5 3545.0,89.5 3545.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-64d48cc34c4541a2a0de32a9004ec6d5-0-19\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n", " <textPath xlink:href=\"#arrow-0b9417964b38464fae70b5e94898d8e5-0-19\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M3545.0,266.5 L3553.0,254.5 3537.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M3545.0,266.5 L3553.0,254.5 3537.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
@ -439,7 +443,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -448,7 +452,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -457,13 +461,13 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/html": [ "text/html": [
"<span class=\"tex2jax_ignore\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"91d65d933d1640e28fd146ee61e3c29e-0\" class=\"displacy\" width=\"925\" height=\"399.5\" direction=\"ltr\" style=\"max-width: none; height: 399.5px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n", "<span class=\"tex2jax_ignore\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"fcfa2b32828649efa0e87b9843c5b0e1-0\" class=\"displacy\" width=\"925\" height=\"399.5\" direction=\"ltr\" style=\"max-width: none; height: 399.5px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n", "<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">Ford</tspan>\n", " <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">Ford</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">PROPN</tspan>\n", " <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">PROPN</tspan>\n",
@ -490,33 +494,33 @@
"</text>\n", "</text>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-91d65d933d1640e28fd146ee61e3c29e-0-0\" stroke-width=\"2px\" d=\"M70,264.5 C70,2.0 575.0,2.0 575.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-0\" stroke-width=\"2px\" d=\"M70,264.5 C70,2.0 575.0,2.0 575.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-91d65d933d1640e28fd146ee61e3c29e-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n", " <textPath xlink:href=\"#arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M70,266.5 L62,254.5 78,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M70,266.5 L62,254.5 78,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-91d65d933d1640e28fd146ee61e3c29e-0-1\" stroke-width=\"2px\" d=\"M245,264.5 C245,89.5 570.0,89.5 570.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-1\" stroke-width=\"2px\" d=\"M245,264.5 C245,89.5 570.0,89.5 570.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-91d65d933d1640e28fd146ee61e3c29e-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">aux</textPath>\n", " <textPath xlink:href=\"#arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">aux</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M245,266.5 L237,254.5 253,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M245,266.5 L237,254.5 253,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-91d65d933d1640e28fd146ee61e3c29e-0-2\" stroke-width=\"2px\" d=\"M420,264.5 C420,177.0 565.0,177.0 565.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-2\" stroke-width=\"2px\" d=\"M420,264.5 C420,177.0 565.0,177.0 565.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-91d65d933d1640e28fd146ee61e3c29e-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">neg</textPath>\n", " <textPath xlink:href=\"#arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">neg</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M420,266.5 L412,254.5 428,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M420,266.5 L412,254.5 428,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
"\n", "\n",
"<g class=\"displacy-arrow\">\n", "<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-91d65d933d1640e28fd146ee61e3c29e-0-3\" stroke-width=\"2px\" d=\"M595,264.5 C595,177.0 740.0,177.0 740.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n", " <path class=\"displacy-arc\" id=\"arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-3\" stroke-width=\"2px\" d=\"M595,264.5 C595,177.0 740.0,177.0 740.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n", " <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-91d65d933d1640e28fd146ee61e3c29e-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">dobj</textPath>\n", " <textPath xlink:href=\"#arrow-fcfa2b32828649efa0e87b9843c5b0e1-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">dobj</textPath>\n",
" </text>\n", " </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M740.0,266.5 L748.0,254.5 732.0,254.5\" fill=\"currentColor\"/>\n", " <path class=\"displacy-arrowhead\" d=\"M740.0,266.5 L748.0,254.5 732.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n", "</g>\n",
@ -536,130 +540,27 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"text = (\"Ford does not recomend Fx01. It recommends Fx05\")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"doc = nlp(text)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/html": [
"<span class=\"tex2jax_ignore\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"fc7afdff0cb24e4698ca4340c5b3e800-0\" class=\"displacy\" width=\"1450\" height=\"399.5\" direction=\"ltr\" style=\"max-width: none; height: 399.5px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">Ford</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">PROPN</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"225\">does</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"225\">AUX</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"400\">not</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"400\">PART</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"575\">recomend</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"575\">VERB</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"750\">Fx01.</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"750\">PROPN</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"925\">It</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"925\">PRON</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"1100\">recommends</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"1100\">VERB</tspan>\n",
"</text>\n",
"\n",
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"309.5\">\n",
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"1275\">Fx05</tspan>\n",
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"1275\">PROPN</tspan>\n",
"</text>\n",
"\n",
"<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-0\" stroke-width=\"2px\" d=\"M70,264.5 C70,2.0 575.0,2.0 575.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
" </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M70,266.5 L62,254.5 78,254.5\" fill=\"currentColor\"/>\n",
"</g>\n",
"\n",
"<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-1\" stroke-width=\"2px\" d=\"M245,264.5 C245,89.5 570.0,89.5 570.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">aux</textPath>\n",
" </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M245,266.5 L237,254.5 253,254.5\" fill=\"currentColor\"/>\n",
"</g>\n",
"\n",
"<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-2\" stroke-width=\"2px\" d=\"M420,264.5 C420,177.0 565.0,177.0 565.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">neg</textPath>\n",
" </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M420,266.5 L412,254.5 428,254.5\" fill=\"currentColor\"/>\n",
"</g>\n",
"\n",
"<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-3\" stroke-width=\"2px\" d=\"M595,264.5 C595,177.0 740.0,177.0 740.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">dobj</textPath>\n",
" </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M740.0,266.5 L748.0,254.5 732.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n",
"\n",
"<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-4\" stroke-width=\"2px\" d=\"M945,264.5 C945,177.0 1090.0,177.0 1090.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
" </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M945,266.5 L937,254.5 953,254.5\" fill=\"currentColor\"/>\n",
"</g>\n",
"\n",
"<g class=\"displacy-arrow\">\n",
" <path class=\"displacy-arc\" id=\"arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-5\" stroke-width=\"2px\" d=\"M1120,264.5 C1120,177.0 1265.0,177.0 1265.0,264.5\" fill=\"none\" stroke=\"currentColor\"/>\n",
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
" <textPath xlink:href=\"#arrow-fc7afdff0cb24e4698ca4340c5b3e800-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">dobj</textPath>\n",
" </text>\n",
" <path class=\"displacy-arrowhead\" d=\"M1265.0,266.5 L1273.0,254.5 1257.0,254.5\" fill=\"currentColor\"/>\n",
"</g>\n",
"</svg></span>"
],
"text/plain": [ "text/plain": [
"<IPython.core.display.HTML object>" "5776"
] ]
}, },
"execution_count": 8,
"metadata": {}, "metadata": {},
"output_type": "display_data" "output_type": "execute_result"
} }
], ],
"source": [ "source": [
"displacy.render(doc, style=\"dep\")" "text = (\"Ford does not recomend Fx01. It recommends Fx05\")\n",
"doc = nlp(text)\n",
"svg = displacy.render(doc, style=\"dep\",options=options,jupyter=False)\n",
"\n",
"output_path = Path(\"../doc/images/pronoun.svg\") # you can keep there only \"dependency_plot.svg\" if you want to save it in the same folder where you run the script \n",
"output_path.open(\"w\", encoding=\"utf-8\").write(svg)"
] ]
}, },
{ {