add jupyter to requirments
This commit is contained in:
@@ -1,19 +1,22 @@
|
|||||||
{
|
{
|
||||||
"cells": [
|
"cells": [
|
||||||
{
|
{
|
||||||
"metadata": {},
|
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"source": "Import Cell\n",
|
"id": "dd72d1539056a64",
|
||||||
"id": "dd72d1539056a64"
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Import Cell\n"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"id": "12579bf734bb1a92",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2025-11-21T17:01:35.974978Z",
|
"end_time": "2025-11-23T13:53:57.753560Z",
|
||||||
"start_time": "2025-11-21T17:01:34.412508Z"
|
"start_time": "2025-11-23T13:53:56.325948Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
|
||||||
"source": [
|
"source": [
|
||||||
"import token\n",
|
"import token\n",
|
||||||
"import spacy\n",
|
"import spacy\n",
|
||||||
@@ -28,24 +31,26 @@
|
|||||||
" \"A completely different sentence about something else.\"\n",
|
" \"A completely different sentence about something else.\"\n",
|
||||||
"]"
|
"]"
|
||||||
],
|
],
|
||||||
"id": "12579bf734bb1a92",
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"execution_count": 21
|
"execution_count": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {},
|
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"source": "Keep punctuation for direct copy detection but remove for semantic/keyword based methods",
|
"id": "1c26616777253f10",
|
||||||
"id": "1c26616777253f10"
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"Keep punctuation for direct copy detection but remove for semantic/keyword based methods"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"id": "e003ac06a58cfbb4",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2025-11-20T19:03:29.658876Z",
|
"end_time": "2025-11-23T13:54:12.922343Z",
|
||||||
"start_time": "2025-11-20T19:03:27.809309Z"
|
"start_time": "2025-11-23T13:54:12.896440Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"for sent in test_sentences:\n",
|
"for sent in test_sentences:\n",
|
||||||
@@ -54,7 +59,6 @@
|
|||||||
" print(f\"Tokens: {[token.text for token in doc]}\")\n",
|
" print(f\"Tokens: {[token.text for token in doc]}\")\n",
|
||||||
" print(\"---\")\n"
|
" print(\"---\")\n"
|
||||||
],
|
],
|
||||||
"id": "e003ac06a58cfbb4",
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
@@ -72,16 +76,17 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 17
|
"execution_count": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"id": "5e488a878a5cfccb",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2025-11-21T23:26:23.172796Z",
|
"end_time": "2025-11-23T13:55:23.734853Z",
|
||||||
"start_time": "2025-11-21T23:26:21.541542Z"
|
"start_time": "2025-11-23T13:55:22.744266Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"class TextPreprocessor:\n",
|
"class TextPreprocessor:\n",
|
||||||
@@ -153,7 +158,6 @@
|
|||||||
"# print(f\"Preprocessed Sentence: {preprocessor.syntactic_analysis(sent)}\")\n",
|
"# print(f\"Preprocessed Sentence: {preprocessor.syntactic_analysis(sent)}\")\n",
|
||||||
"# print(\"-\" * 50)"
|
"# print(\"-\" * 50)"
|
||||||
],
|
],
|
||||||
"id": "5e488a878a5cfccb",
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
@@ -187,16 +191,17 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 37
|
"execution_count": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"id": "83fc18c9de2e354",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2025-11-21T23:39:48.443022Z",
|
"end_time": "2025-11-23T13:55:33.587912Z",
|
||||||
"start_time": "2025-11-21T23:39:48.411766Z"
|
"start_time": "2025-11-23T13:55:33.565711Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"def extract_parse_tree(text):\n",
|
"def extract_parse_tree(text):\n",
|
||||||
@@ -215,7 +220,6 @@
|
|||||||
" doc = extract_parse_tree(sentence)\n",
|
" doc = extract_parse_tree(sentence)\n",
|
||||||
" print(\"\\n\" + \"=\"*60 + \"\\n\")"
|
" print(\"\\n\" + \"=\"*60 + \"\\n\")"
|
||||||
],
|
],
|
||||||
"id": "83fc18c9de2e354",
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
@@ -269,22 +273,25 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 39
|
"execution_count": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {},
|
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"source": "***USE NetworkX",
|
"id": "5b5c8742d7c4c4c5",
|
||||||
"id": "5b5c8742d7c4c4c5"
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"***USE NetworkX"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"id": "e413238c1af12f62",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"ExecuteTime": {
|
"ExecuteTime": {
|
||||||
"end_time": "2025-11-21T18:20:09.575176Z",
|
"end_time": "2025-11-23T13:56:21.733459Z",
|
||||||
"start_time": "2025-11-21T18:20:09.465504Z"
|
"start_time": "2025-11-23T13:56:21.702279Z"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cell_type": "code",
|
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -295,21 +302,18 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"for sentence in test_sentences:\n",
|
"for sentence in processed_syntactic:\n",
|
||||||
" print(f\"Sentence: {sentence}\")\n",
|
" print(f\"Sentence: {sentence}\")\n",
|
||||||
" print(\"---\")\n",
|
" print(\"---\")\n",
|
||||||
" processed_sentence = preprocessor.syntactic_analysis(sentence)\n",
|
" print(f\"Processed Sentence: \" + sentence)\n",
|
||||||
" print(f\"Processed Sentence: \" + processed_sentence)\n",
|
|
||||||
" visualize_parse_tree(processed_sentence)\n",
|
|
||||||
" visualize_parse_tree(sentence)"
|
" visualize_parse_tree(sentence)"
|
||||||
],
|
],
|
||||||
"id": "e413238c1af12f62",
|
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Sentence: The cat sat on the mat.\n",
|
"Sentence: the cat sit on the mat .\n",
|
||||||
"---\n",
|
"---\n",
|
||||||
"Processed Sentence: the cat sit on the mat .\n"
|
"Processed Sentence: the cat sit on the mat .\n"
|
||||||
]
|
]
|
||||||
@@ -320,7 +324,7 @@
|
|||||||
"<IPython.core.display.HTML object>"
|
"<IPython.core.display.HTML object>"
|
||||||
],
|
],
|
||||||
"text/html": [
|
"text/html": [
|
||||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"cbdcc1a7b2c3434da049b33ce22ba9dc-0\" class=\"displacy\" width=\"650\" height=\"237.0\" direction=\"ltr\" style=\"max-width: none; height: 237.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"4ec65c2317524f6dab93c3963fcc5973-0\" class=\"displacy\" width=\"650\" height=\"237.0\" direction=\"ltr\" style=\"max-width: none; height: 237.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">the</tspan>\n",
|
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">the</tspan>\n",
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">DET</tspan>\n",
|
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">DET</tspan>\n",
|
||||||
@@ -352,126 +356,41 @@
|
|||||||
"</text>\n",
|
"</text>\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<g class=\"displacy-arrow\">\n",
|
"<g class=\"displacy-arrow\">\n",
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-cbdcc1a7b2c3434da049b33ce22ba9dc-0-0\" stroke-width=\"2px\" d=\"M70,102.0 C70,52.0 145.0,52.0 145.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-4ec65c2317524f6dab93c3963fcc5973-0-0\" stroke-width=\"2px\" d=\"M70,102.0 C70,52.0 145.0,52.0 145.0,102.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
" <textPath xlink:href=\"#arrow-4ec65c2317524f6dab93c3963fcc5973-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M70,104.0 L62,92.0 78,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M70,104.0 L62,92.0 78,92.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-1\" stroke-width=\"2px\" d=\"M170,102.0 C170,52.0 245.0,52.0 245.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-4ec65c2317524f6dab93c3963fcc5973-0-1\" stroke-width=\"2px\" d=\"M170,102.0 C170,52.0 245.0,52.0 245.0,102.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
|
" <textPath xlink:href=\"#arrow-4ec65c2317524f6dab93c3963fcc5973-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=\"M170,104.0 L162,92.0 178,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M170,104.0 L162,92.0 178,92.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-2\" stroke-width=\"2px\" d=\"M270,102.0 C270,52.0 345.0,52.0 345.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-4ec65c2317524f6dab93c3963fcc5973-0-2\" stroke-width=\"2px\" d=\"M270,102.0 C270,52.0 345.0,52.0 345.0,102.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
" <textPath xlink:href=\"#arrow-4ec65c2317524f6dab93c3963fcc5973-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M345.0,104.0 L353.0,92.0 337.0,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M345.0,104.0 L353.0,92.0 337.0,92.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-3\" stroke-width=\"2px\" d=\"M470,102.0 C470,52.0 545.0,52.0 545.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-4ec65c2317524f6dab93c3963fcc5973-0-3\" stroke-width=\"2px\" d=\"M470,102.0 C470,52.0 545.0,52.0 545.0,102.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
" <textPath xlink:href=\"#arrow-4ec65c2317524f6dab93c3963fcc5973-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M470,104.0 L462,92.0 478,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M470,104.0 L462,92.0 478,92.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-4\" stroke-width=\"2px\" d=\"M370,102.0 C370,2.0 550.0,2.0 550.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-4ec65c2317524f6dab93c3963fcc5973-0-4\" stroke-width=\"2px\" d=\"M370,102.0 C370,2.0 550.0,2.0 550.0,102.0\" 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-cbdcc1a7b2c3434da049b33ce22ba9dc-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
" <textPath xlink:href=\"#arrow-4ec65c2317524f6dab93c3963fcc5973-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M550.0,104.0 L558.0,92.0 542.0,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"</svg>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data",
|
|
||||||
"jetTransient": {
|
|
||||||
"display_id": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.HTML object>"
|
|
||||||
],
|
|
||||||
"text/html": [
|
|
||||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"03663f6b8c874937b96eb1c0bf766ed5-0\" class=\"displacy\" width=\"650\" height=\"237.0\" direction=\"ltr\" style=\"max-width: none; height: 237.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">The</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">DET</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"150\">cat</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"150\">NOUN</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"250\">sat</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"250\">VERB</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"350\">on</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"350\">ADP</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"450\">the</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"450\">DET</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"550\">mat.</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"550\">NOUN</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-03663f6b8c874937b96eb1c0bf766ed5-0-0\" stroke-width=\"2px\" d=\"M70,102.0 C70,52.0 145.0,52.0 145.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-03663f6b8c874937b96eb1c0bf766ed5-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M70,104.0 L62,92.0 78,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-03663f6b8c874937b96eb1c0bf766ed5-0-1\" stroke-width=\"2px\" d=\"M170,102.0 C170,52.0 245.0,52.0 245.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-03663f6b8c874937b96eb1c0bf766ed5-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M170,104.0 L162,92.0 178,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-03663f6b8c874937b96eb1c0bf766ed5-0-2\" stroke-width=\"2px\" d=\"M270,102.0 C270,52.0 345.0,52.0 345.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-03663f6b8c874937b96eb1c0bf766ed5-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M345.0,104.0 L353.0,92.0 337.0,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-03663f6b8c874937b96eb1c0bf766ed5-0-3\" stroke-width=\"2px\" d=\"M470,102.0 C470,52.0 545.0,52.0 545.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-03663f6b8c874937b96eb1c0bf766ed5-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M470,104.0 L462,92.0 478,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-03663f6b8c874937b96eb1c0bf766ed5-0-4\" stroke-width=\"2px\" d=\"M370,102.0 C370,2.0 550.0,2.0 550.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-03663f6b8c874937b96eb1c0bf766ed5-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M550.0,104.0 L558.0,92.0 542.0,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M550.0,104.0 L558.0,92.0 542.0,92.0\" fill=\"currentColor\"/>\n",
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
@@ -488,7 +407,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Sentence: On the mat, the cat was sitting.\n",
|
"Sentence: on the mat , the cat be sit .\n",
|
||||||
"---\n",
|
"---\n",
|
||||||
"Processed Sentence: on the mat , the cat be sit .\n"
|
"Processed Sentence: on the mat , the cat be sit .\n"
|
||||||
]
|
]
|
||||||
@@ -499,7 +418,7 @@
|
|||||||
"<IPython.core.display.HTML object>"
|
"<IPython.core.display.HTML object>"
|
||||||
],
|
],
|
||||||
"text/html": [
|
"text/html": [
|
||||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"c413fa0318d04c93b9c3ffea0645caff-0\" class=\"displacy\" width=\"750\" height=\"287.0\" direction=\"ltr\" style=\"max-width: none; height: 287.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"239d41ebf05341878765b3474355df7c-0\" class=\"displacy\" width=\"750\" height=\"287.0\" direction=\"ltr\" style=\"max-width: none; height: 287.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">on</tspan>\n",
|
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">on</tspan>\n",
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">ADP</tspan>\n",
|
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">ADP</tspan>\n",
|
||||||
@@ -536,147 +455,49 @@
|
|||||||
"</text>\n",
|
"</text>\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<g class=\"displacy-arrow\">\n",
|
"<g class=\"displacy-arrow\">\n",
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-c413fa0318d04c93b9c3ffea0645caff-0-0\" stroke-width=\"2px\" d=\"M70,152.0 C70,2.0 650.0,2.0 650.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-239d41ebf05341878765b3474355df7c-0-0\" stroke-width=\"2px\" d=\"M70,152.0 C70,2.0 650.0,2.0 650.0,152.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
" <textPath xlink:href=\"#arrow-239d41ebf05341878765b3474355df7c-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M70,154.0 L62,142.0 78,142.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M70,154.0 L62,142.0 78,142.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-1\" stroke-width=\"2px\" d=\"M170,152.0 C170,102.0 240.0,102.0 240.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-239d41ebf05341878765b3474355df7c-0-1\" stroke-width=\"2px\" d=\"M170,152.0 C170,102.0 240.0,102.0 240.0,152.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
" <textPath xlink:href=\"#arrow-239d41ebf05341878765b3474355df7c-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M170,154.0 L162,142.0 178,142.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M170,154.0 L162,142.0 178,142.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-2\" stroke-width=\"2px\" d=\"M70,152.0 C70,52.0 245.0,52.0 245.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-239d41ebf05341878765b3474355df7c-0-2\" stroke-width=\"2px\" d=\"M70,152.0 C70,52.0 245.0,52.0 245.0,152.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
" <textPath xlink:href=\"#arrow-239d41ebf05341878765b3474355df7c-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M245.0,154.0 L253.0,142.0 237.0,142.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M245.0,154.0 L253.0,142.0 237.0,142.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-3\" stroke-width=\"2px\" d=\"M370,152.0 C370,102.0 440.0,102.0 440.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-239d41ebf05341878765b3474355df7c-0-3\" stroke-width=\"2px\" d=\"M370,152.0 C370,102.0 440.0,102.0 440.0,152.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
" <textPath xlink:href=\"#arrow-239d41ebf05341878765b3474355df7c-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M370,154.0 L362,142.0 378,142.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M370,154.0 L362,142.0 378,142.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-4\" stroke-width=\"2px\" d=\"M470,152.0 C470,52.0 645.0,52.0 645.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-239d41ebf05341878765b3474355df7c-0-4\" stroke-width=\"2px\" d=\"M470,152.0 C470,52.0 645.0,52.0 645.0,152.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
|
" <textPath xlink:href=\"#arrow-239d41ebf05341878765b3474355df7c-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M470,154.0 L462,142.0 478,142.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M470,154.0 L462,142.0 478,142.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-5\" stroke-width=\"2px\" d=\"M570,152.0 C570,102.0 640.0,102.0 640.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-239d41ebf05341878765b3474355df7c-0-5\" stroke-width=\"2px\" d=\"M570,152.0 C570,102.0 640.0,102.0 640.0,152.0\" 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-c413fa0318d04c93b9c3ffea0645caff-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">aux</textPath>\n",
|
" <textPath xlink:href=\"#arrow-239d41ebf05341878765b3474355df7c-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">aux</textPath>\n",
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M570,154.0 L562,142.0 578,142.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"</svg>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data",
|
|
||||||
"jetTransient": {
|
|
||||||
"display_id": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.HTML object>"
|
|
||||||
],
|
|
||||||
"text/html": [
|
|
||||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"0a7ff36b205d4165a3261fa3265e8c53-0\" class=\"displacy\" width=\"750\" height=\"287.0\" direction=\"ltr\" style=\"max-width: none; height: 287.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">On</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">ADP</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"150\">the</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"150\">DET</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"250\">mat,</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"250\">NOUN</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"350\">the</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"350\">DET</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"450\">cat</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"450\">NOUN</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"550\">was</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"550\">AUX</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"197.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"650\">sitting.</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"650\">VERB</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-0a7ff36b205d4165a3261fa3265e8c53-0-0\" stroke-width=\"2px\" d=\"M70,152.0 C70,2.0 650.0,2.0 650.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-0a7ff36b205d4165a3261fa3265e8c53-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M70,154.0 L62,142.0 78,142.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-0a7ff36b205d4165a3261fa3265e8c53-0-1\" stroke-width=\"2px\" d=\"M170,152.0 C170,102.0 240.0,102.0 240.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-0a7ff36b205d4165a3261fa3265e8c53-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M170,154.0 L162,142.0 178,142.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-0a7ff36b205d4165a3261fa3265e8c53-0-2\" stroke-width=\"2px\" d=\"M70,152.0 C70,52.0 245.0,52.0 245.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-0a7ff36b205d4165a3261fa3265e8c53-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M245.0,154.0 L253.0,142.0 237.0,142.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-0a7ff36b205d4165a3261fa3265e8c53-0-3\" stroke-width=\"2px\" d=\"M370,152.0 C370,102.0 440.0,102.0 440.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-0a7ff36b205d4165a3261fa3265e8c53-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M370,154.0 L362,142.0 378,142.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-0a7ff36b205d4165a3261fa3265e8c53-0-4\" stroke-width=\"2px\" d=\"M470,152.0 C470,52.0 645.0,52.0 645.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-0a7ff36b205d4165a3261fa3265e8c53-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">nsubj</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M470,154.0 L462,142.0 478,142.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-0a7ff36b205d4165a3261fa3265e8c53-0-5\" stroke-width=\"2px\" d=\"M570,152.0 C570,102.0 640.0,102.0 640.0,152.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-0a7ff36b205d4165a3261fa3265e8c53-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">aux</textPath>\n",
|
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M570,154.0 L562,142.0 578,142.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M570,154.0 L562,142.0 578,142.0\" fill=\"currentColor\"/>\n",
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
@@ -693,7 +514,7 @@
|
|||||||
"name": "stdout",
|
"name": "stdout",
|
||||||
"output_type": "stream",
|
"output_type": "stream",
|
||||||
"text": [
|
"text": [
|
||||||
"Sentence: A completely different sentence about something else.\n",
|
"Sentence: a completely different sentence about something else .\n",
|
||||||
"---\n",
|
"---\n",
|
||||||
"Processed Sentence: a completely different sentence about something else .\n"
|
"Processed Sentence: a completely different sentence about something else .\n"
|
||||||
]
|
]
|
||||||
@@ -704,7 +525,7 @@
|
|||||||
"<IPython.core.display.HTML object>"
|
"<IPython.core.display.HTML object>"
|
||||||
],
|
],
|
||||||
"text/html": [
|
"text/html": [
|
||||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"358275480b4d4b099e836e8136c5b023-0\" class=\"displacy\" width=\"750\" height=\"237.0\" direction=\"ltr\" style=\"max-width: none; height: 237.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"645c3d0343ff46cfb12d7ba372193893-0\" class=\"displacy\" width=\"750\" height=\"237.0\" direction=\"ltr\" style=\"max-width: none; height: 237.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">a</tspan>\n",
|
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">a</tspan>\n",
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">DET</tspan>\n",
|
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">DET</tspan>\n",
|
||||||
@@ -741,147 +562,49 @@
|
|||||||
"</text>\n",
|
"</text>\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<g class=\"displacy-arrow\">\n",
|
"<g class=\"displacy-arrow\">\n",
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-358275480b4d4b099e836e8136c5b023-0-0\" stroke-width=\"2px\" d=\"M70,102.0 C70,2.0 350.0,2.0 350.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-645c3d0343ff46cfb12d7ba372193893-0-0\" stroke-width=\"2px\" d=\"M70,102.0 C70,2.0 350.0,2.0 350.0,102.0\" 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-358275480b4d4b099e836e8136c5b023-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
" <textPath xlink:href=\"#arrow-645c3d0343ff46cfb12d7ba372193893-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M70,104.0 L62,92.0 78,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M70,104.0 L62,92.0 78,92.0\" 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-358275480b4d4b099e836e8136c5b023-0-1\" stroke-width=\"2px\" d=\"M170,102.0 C170,52.0 245.0,52.0 245.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-645c3d0343ff46cfb12d7ba372193893-0-1\" stroke-width=\"2px\" d=\"M170,102.0 C170,52.0 245.0,52.0 245.0,102.0\" 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-358275480b4d4b099e836e8136c5b023-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">advmod</textPath>\n",
|
" <textPath xlink:href=\"#arrow-645c3d0343ff46cfb12d7ba372193893-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">advmod</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M170,104.0 L162,92.0 178,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M170,104.0 L162,92.0 178,92.0\" 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-358275480b4d4b099e836e8136c5b023-0-2\" stroke-width=\"2px\" d=\"M270,102.0 C270,52.0 345.0,52.0 345.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-645c3d0343ff46cfb12d7ba372193893-0-2\" stroke-width=\"2px\" d=\"M270,102.0 C270,52.0 345.0,52.0 345.0,102.0\" 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-358275480b4d4b099e836e8136c5b023-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n",
|
" <textPath xlink:href=\"#arrow-645c3d0343ff46cfb12d7ba372193893-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M270,104.0 L262,92.0 278,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M270,104.0 L262,92.0 278,92.0\" 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-358275480b4d4b099e836e8136c5b023-0-3\" stroke-width=\"2px\" d=\"M370,102.0 C370,52.0 445.0,52.0 445.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-645c3d0343ff46cfb12d7ba372193893-0-3\" stroke-width=\"2px\" d=\"M370,102.0 C370,52.0 445.0,52.0 445.0,102.0\" 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-358275480b4d4b099e836e8136c5b023-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
" <textPath xlink:href=\"#arrow-645c3d0343ff46cfb12d7ba372193893-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M445.0,104.0 L453.0,92.0 437.0,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M445.0,104.0 L453.0,92.0 437.0,92.0\" 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-358275480b4d4b099e836e8136c5b023-0-4\" stroke-width=\"2px\" d=\"M470,102.0 C470,52.0 545.0,52.0 545.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-645c3d0343ff46cfb12d7ba372193893-0-4\" stroke-width=\"2px\" d=\"M470,102.0 C470,52.0 545.0,52.0 545.0,102.0\" 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-358275480b4d4b099e836e8136c5b023-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
" <textPath xlink:href=\"#arrow-645c3d0343ff46cfb12d7ba372193893-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M545.0,104.0 L553.0,92.0 537.0,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M545.0,104.0 L553.0,92.0 537.0,92.0\" 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-358275480b4d4b099e836e8136c5b023-0-5\" stroke-width=\"2px\" d=\"M570,102.0 C570,52.0 645.0,52.0 645.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
" <path class=\"displacy-arc\" id=\"arrow-645c3d0343ff46cfb12d7ba372193893-0-5\" stroke-width=\"2px\" d=\"M570,102.0 C570,52.0 645.0,52.0 645.0,102.0\" 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-358275480b4d4b099e836e8136c5b023-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">advmod</textPath>\n",
|
" <textPath xlink:href=\"#arrow-645c3d0343ff46cfb12d7ba372193893-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">advmod</textPath>\n",
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M645.0,104.0 L653.0,92.0 637.0,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"</svg>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data",
|
|
||||||
"jetTransient": {
|
|
||||||
"display_id": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.HTML object>"
|
|
||||||
],
|
|
||||||
"text/html": [
|
|
||||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:lang=\"en\" id=\"bc8c620b992c40b5b591d785f5e540a4-0\" class=\"displacy\" width=\"750\" height=\"237.0\" direction=\"ltr\" style=\"max-width: none; height: 237.0px; color: #000000; background: #ffffff; font-family: Arial; direction: ltr\">\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"50\">A</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"50\">DET</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"150\">completely</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"150\">ADV</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"250\">different</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"250\">ADJ</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"350\">sentence</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"350\">NOUN</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"450\">about</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"450\">ADP</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"550\">something</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"550\">PRON</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<text class=\"displacy-token\" fill=\"currentColor\" text-anchor=\"middle\" y=\"147.0\">\n",
|
|
||||||
" <tspan class=\"displacy-word\" fill=\"currentColor\" x=\"650\">else.</tspan>\n",
|
|
||||||
" <tspan class=\"displacy-tag\" dy=\"2em\" fill=\"currentColor\" x=\"650\">ADV</tspan>\n",
|
|
||||||
"</text>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-bc8c620b992c40b5b591d785f5e540a4-0-0\" stroke-width=\"2px\" d=\"M70,102.0 C70,2.0 350.0,2.0 350.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-bc8c620b992c40b5b591d785f5e540a4-0-0\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">det</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M70,104.0 L62,92.0 78,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-bc8c620b992c40b5b591d785f5e540a4-0-1\" stroke-width=\"2px\" d=\"M170,102.0 C170,52.0 245.0,52.0 245.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-bc8c620b992c40b5b591d785f5e540a4-0-1\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">advmod</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M170,104.0 L162,92.0 178,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-bc8c620b992c40b5b591d785f5e540a4-0-2\" stroke-width=\"2px\" d=\"M270,102.0 C270,52.0 345.0,52.0 345.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-bc8c620b992c40b5b591d785f5e540a4-0-2\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">amod</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M270,104.0 L262,92.0 278,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-bc8c620b992c40b5b591d785f5e540a4-0-3\" stroke-width=\"2px\" d=\"M370,102.0 C370,52.0 445.0,52.0 445.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-bc8c620b992c40b5b591d785f5e540a4-0-3\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">prep</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M445.0,104.0 L453.0,92.0 437.0,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-bc8c620b992c40b5b591d785f5e540a4-0-4\" stroke-width=\"2px\" d=\"M470,102.0 C470,52.0 545.0,52.0 545.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-bc8c620b992c40b5b591d785f5e540a4-0-4\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">pobj</textPath>\n",
|
|
||||||
" </text>\n",
|
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M545.0,104.0 L553.0,92.0 537.0,92.0\" fill=\"currentColor\"/>\n",
|
|
||||||
"</g>\n",
|
|
||||||
"\n",
|
|
||||||
"<g class=\"displacy-arrow\">\n",
|
|
||||||
" <path class=\"displacy-arc\" id=\"arrow-bc8c620b992c40b5b591d785f5e540a4-0-5\" stroke-width=\"2px\" d=\"M570,102.0 C570,52.0 645.0,52.0 645.0,102.0\" fill=\"none\" stroke=\"currentColor\"/>\n",
|
|
||||||
" <text dy=\"1.25em\" style=\"font-size: 0.8em; letter-spacing: 1px\">\n",
|
|
||||||
" <textPath xlink:href=\"#arrow-bc8c620b992c40b5b591d785f5e540a4-0-5\" class=\"displacy-label\" startOffset=\"50%\" side=\"left\" fill=\"currentColor\" text-anchor=\"middle\">advmod</textPath>\n",
|
|
||||||
" </text>\n",
|
" </text>\n",
|
||||||
" <path class=\"displacy-arrowhead\" d=\"M645.0,104.0 L653.0,92.0 637.0,92.0\" fill=\"currentColor\"/>\n",
|
" <path class=\"displacy-arrowhead\" d=\"M645.0,104.0 L653.0,92.0 637.0,92.0\" fill=\"currentColor\"/>\n",
|
||||||
"</g>\n",
|
"</g>\n",
|
||||||
@@ -895,22 +618,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"execution_count": 32
|
"execution_count": 6
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"metadata": {},
|
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"outputs": [],
|
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"source": "",
|
"id": "6aff51eb71eb2238",
|
||||||
"id": "6aff51eb71eb2238"
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"name": "python3",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"display_name": "Python 3 (ipykernel)"
|
"name": "python3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ numpy
|
|||||||
scikit-learn
|
scikit-learn
|
||||||
spacy
|
spacy
|
||||||
matplotlib
|
matplotlib
|
||||||
seaborn
|
seaborn
|
||||||
|
jupyter
|
||||||
Reference in New Issue
Block a user