aitech-moj-2023/cw/02_Jezyk.ipynb

7548 lines
152 KiB
Plaintext
Raw Normal View History

2022-02-23 15:12:56 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Ekstrakcja informacji </h1>\n",
"<h2> 0. <i>Jezyk</i> [ćwiczenia]</h2> \n",
"<h3> Jakub Pokrywka (2022)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
]
},
{
"cell_type": "code",
"execution_count": 278,
"metadata": {},
"outputs": [],
"source": [
"NR_INDEKSU = 375985"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [],
"source": [
"import random\n",
"import plotly.express as px\n",
"import numpy as np\n",
"import pandas as pd\n",
"import nltk"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"program : program\n",
"programs : program\n",
"programmer : programm\n",
"programming : program\n",
"programmers : programm\n"
]
}
],
"source": [
"ps = nltk.stem.PorterStemmer()\n",
"\n",
"for w in [\"program\", \"programs\", \"programmer\", \"programming\", \"programmers\"]:\n",
" print(w, \" : \", ps.stem(w))"
]
},
{
"cell_type": "code",
"execution_count": 77,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[nltk_data] Downloading package punkt to /home/kuba/nltk_data...\n",
"[nltk_data] Package punkt is already up-to-date!\n",
"[nltk_data] Downloading package stopwords to /home/kuba/nltk_data...\n",
"[nltk_data] Unzipping corpora/stopwords.zip.\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nltk.download('punkt')\n",
"nltk.download('stopwords')"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Python',\n",
" 'is',\n",
" 'dynamically-typed',\n",
" 'and',\n",
" 'garbage-collected',\n",
" '.',\n",
" 'It',\n",
" 'supports',\n",
" 'multiple',\n",
" 'programming',\n",
" 'paradigms',\n",
" ',',\n",
" 'including',\n",
" 'structured',\n",
" '(',\n",
" 'particularly',\n",
" ',',\n",
" 'procedural',\n",
" ')',\n",
" ',',\n",
" 'object-oriented',\n",
" 'and',\n",
" 'functional',\n",
" 'programming',\n",
" '.',\n",
" 'It',\n",
" 'is',\n",
" 'often',\n",
" 'described',\n",
" 'as',\n",
" 'a',\n",
" '``',\n",
" 'batteries',\n",
" 'included',\n",
" \"''\",\n",
" 'language',\n",
" 'due',\n",
" 'to',\n",
" 'its',\n",
" 'comprehensive',\n",
" 'standard',\n",
" 'library',\n",
" '.']"
]
},
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"text = \"\"\"Python is dynamically-typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming. It is often described as a \"batteries included\" language due to its comprehensive standard library.\"\"\"\n",
"nltk.tokenize.word_tokenize(text)"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Python is dynamically-typed and garbage-collected.',\n",
" 'It supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming.',\n",
" 'It is often described as a \"batteries included\" language due to its comprehensive standard library.']"
]
},
"execution_count": 79,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nltk.tokenize.sent_tokenize(text)"
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['aber',\n",
" 'alle',\n",
" 'allem',\n",
" 'allen',\n",
" 'aller',\n",
" 'alles',\n",
" 'als',\n",
" 'also',\n",
" 'am',\n",
" 'an',\n",
" 'ander',\n",
" 'andere',\n",
" 'anderem',\n",
" 'anderen',\n",
" 'anderer',\n",
" 'anderes',\n",
" 'anderm',\n",
" 'andern',\n",
" 'anderr',\n",
" 'anders',\n",
" 'auch',\n",
" 'auf',\n",
" 'aus',\n",
" 'bei',\n",
" 'bin',\n",
" 'bis',\n",
" 'bist',\n",
" 'da',\n",
" 'damit',\n",
" 'dann',\n",
" 'der',\n",
" 'den',\n",
" 'des',\n",
" 'dem',\n",
" 'die',\n",
" 'das',\n",
" 'dass',\n",
" 'daß',\n",
" 'derselbe',\n",
" 'derselben',\n",
" 'denselben',\n",
" 'desselben',\n",
" 'demselben',\n",
" 'dieselbe',\n",
" 'dieselben',\n",
" 'dasselbe',\n",
" 'dazu',\n",
" 'dein',\n",
" 'deine',\n",
" 'deinem',\n",
" 'deinen',\n",
" 'deiner',\n",
" 'deines',\n",
" 'denn',\n",
" 'derer',\n",
" 'dessen',\n",
" 'dich',\n",
" 'dir',\n",
" 'du',\n",
" 'dies',\n",
" 'diese',\n",
" 'diesem',\n",
" 'diesen',\n",
" 'dieser',\n",
" 'dieses',\n",
" 'doch',\n",
" 'dort',\n",
" 'durch',\n",
" 'ein',\n",
" 'eine',\n",
" 'einem',\n",
" 'einen',\n",
" 'einer',\n",
" 'eines',\n",
" 'einig',\n",
" 'einige',\n",
" 'einigem',\n",
" 'einigen',\n",
" 'einiger',\n",
" 'einiges',\n",
" 'einmal',\n",
" 'er',\n",
" 'ihn',\n",
" 'ihm',\n",
" 'es',\n",
" 'etwas',\n",
" 'euer',\n",
" 'eure',\n",
" 'eurem',\n",
" 'euren',\n",
" 'eurer',\n",
" 'eures',\n",
" 'für',\n",
" 'gegen',\n",
" 'gewesen',\n",
" 'hab',\n",
" 'habe',\n",
" 'haben',\n",
" 'hat',\n",
" 'hatte',\n",
" 'hatten',\n",
" 'hier',\n",
" 'hin',\n",
" 'hinter',\n",
" 'ich',\n",
" 'mich',\n",
" 'mir',\n",
" 'ihr',\n",
" 'ihre',\n",
" 'ihrem',\n",
" 'ihren',\n",
" 'ihrer',\n",
" 'ihres',\n",
" 'euch',\n",
" 'im',\n",
" 'in',\n",
" 'indem',\n",
" 'ins',\n",
" 'ist',\n",
" 'jede',\n",
" 'jedem',\n",
" 'jeden',\n",
" 'jeder',\n",
" 'jedes',\n",
" 'jene',\n",
" 'jenem',\n",
" 'jenen',\n",
" 'jener',\n",
" 'jenes',\n",
" 'jetzt',\n",
" 'kann',\n",
" 'kein',\n",
" 'keine',\n",
" 'keinem',\n",
" 'keinen',\n",
" 'keiner',\n",
" 'keines',\n",
" 'können',\n",
" 'könnte',\n",
" 'machen',\n",
" 'man',\n",
" 'manche',\n",
" 'manchem',\n",
" 'manchen',\n",
" 'mancher',\n",
" 'manches',\n",
" 'mein',\n",
" 'meine',\n",
" 'meinem',\n",
" 'meinen',\n",
" 'meiner',\n",
" 'meines',\n",
" 'mit',\n",
" 'muss',\n",
" 'musste',\n",
" 'nach',\n",
" 'nicht',\n",
" 'nichts',\n",
" 'noch',\n",
" 'nun',\n",
" 'nur',\n",
" 'ob',\n",
" 'oder',\n",
" 'ohne',\n",
" 'sehr',\n",
" 'sein',\n",
" 'seine',\n",
" 'seinem',\n",
" 'seinen',\n",
" 'seiner',\n",
" 'seines',\n",
" 'selbst',\n",
" 'sich',\n",
" 'sie',\n",
" 'ihnen',\n",
" 'sind',\n",
" 'so',\n",
" 'solche',\n",
" 'solchem',\n",
" 'solchen',\n",
" 'solcher',\n",
" 'solches',\n",
" 'soll',\n",
" 'sollte',\n",
" 'sondern',\n",
" 'sonst',\n",
" 'über',\n",
" 'um',\n",
" 'und',\n",
" 'uns',\n",
" 'unsere',\n",
" 'unserem',\n",
" 'unseren',\n",
" 'unser',\n",
" 'unseres',\n",
" 'unter',\n",
" 'viel',\n",
" 'vom',\n",
" 'von',\n",
" 'vor',\n",
" 'während',\n",
" 'war',\n",
" 'waren',\n",
" 'warst',\n",
" 'was',\n",
" 'weg',\n",
" 'weil',\n",
" 'weiter',\n",
" 'welche',\n",
" 'welchem',\n",
" 'welchen',\n",
" 'welcher',\n",
" 'welches',\n",
" 'wenn',\n",
" 'werde',\n",
" 'werden',\n",
" 'wie',\n",
" 'wieder',\n",
" 'will',\n",
" 'wir',\n",
" 'wird',\n",
" 'wirst',\n",
" 'wo',\n",
" 'wollen',\n",
" 'wollte',\n",
" 'würde',\n",
" 'würden',\n",
" 'zu',\n",
" 'zum',\n",
" 'zur',\n",
" 'zwar',\n",
" 'zwischen']"
]
},
"execution_count": 80,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nltk.corpus.stopwords.words('german')"
]
},
{
"cell_type": "code",
"execution_count": 84,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[('Python', 'is'), ('is', 'dynamically-typed'), ('dynamically-typed', 'and'), ('and', 'garbage-collected'), ('garbage-collected', '.'), ('.', 'It'), ('It', 'supports'), ('supports', 'multiple'), ('multiple', 'programming'), ('programming', 'paradigms'), ('paradigms', ','), (',', 'including'), ('including', 'structured'), ('structured', '('), ('(', 'particularly'), ('particularly', ','), (',', 'procedural'), ('procedural', ')'), (')', ','), (',', 'object-oriented'), ('object-oriented', 'and'), ('and', 'functional'), ('functional', 'programming'), ('programming', '.'), ('.', 'It'), ('It', 'is'), ('is', 'often'), ('often', 'described'), ('described', 'as'), ('as', 'a'), ('a', '``'), ('``', 'batteries'), ('batteries', 'included'), ('included', \"''\"), (\"''\", 'language'), ('language', 'due'), ('due', 'to'), ('to', 'its'), ('its', 'comprehensive'), ('comprehensive', 'standard'), ('standard', 'library'), ('library', '.')]\n"
]
}
],
"source": [
"nltk_tokens = nltk.word_tokenize(text)\n",
"print(list(nltk.bigrams(nltk_tokens)))"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"alignmentgroup": "True",
"hovertemplate": "słowo=%{x}<br>liczba=%{y}<extra></extra>",
"legendgroup": "",
"marker": {
"color": "#636efa",
"pattern": {
"shape": ""
}
},
"name": "",
"offsetgroup": "",
"orientation": "v",
"showlegend": false,
"textposition": "auto",
"type": "bar",
"x": [
"ma",
"ala",
"psa",
"kota"
],
"xaxis": "x",
"y": [
20,
15,
10,
10
],
"yaxis": "y"
}
],
"layout": {
"barmode": "relative",
"legend": {
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "słowo"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "liczba"
}
}
}
},
"text/html": [
"<div> <div id=\"6a18ab5a-fb1c-4ea1-bc0e-39761c079b61\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"6a18ab5a-fb1c-4ea1-bc0e-39761c079b61\")) { Plotly.newPlot( \"6a18ab5a-fb1c-4ea1-bc0e-39761c079b61\", [{\"alignmentgroup\":\"True\",\"hovertemplate\":\"s\\u0142owo=%{x}<br>liczba=%{y}<extra></extra>\",\"legendgroup\":\"\",\"marker\":{\"color\":\"#636efa\",\"pattern\":{\"shape\":\"\"}},\"name\":\"\",\"offsetgroup\":\"\",\"orientation\":\"v\",\"showlegend\":false,\"textposition\":\"auto\",\"type\":\"bar\",\"x\":[\"ma\",\"ala\",\"psa\",\"kota\"],\"xaxis\":\"x\",\"y\":[20,15,10,10],\"yaxis\":\"y\"}], {\"barmode\":\"relative\",\"legend\":{\"tracegroupgap\":0},\"margin\":{\"t\":60},\"template\":{\"data\":{\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"choropleth\"}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"contour\"}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"contourcarpet\"}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmap\"}],\"heatmapgl\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmapgl\"}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2d\"}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.88888888
" \n",
"var gd = document.getElementById('6a18ab5a-fb1c-4ea1-bc0e-39761c079b61');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" }) }; }); </script> </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df = pd.DataFrame([['ma', 20], ['ala', 15], ['psa', 10], ['kota', 10]], columns=['słowo', 'liczba'])\n",
"fig = px.bar(df, x=\"słowo\", y=\"liczba\")\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"alignmentgroup": "True",
"bingroup": "x",
"hovertemplate": "jezyk=polski<br>dlugosc=%{x}<br>count=%{y}<extra></extra>",
"legendgroup": "",
"marker": {
"color": "#636efa",
"pattern": {
"shape": ""
}
},
"name": "",
"nbinsx": 50,
"offsetgroup": "",
"orientation": "v",
"showlegend": false,
"type": "histogram",
"x": [
8,
4,
3,
8,
7,
2,
6,
7,
7,
6,
3,
9,
11,
9,
7,
2,
10,
6,
1,
2,
1,
1,
2,
8,
5,
2,
1,
3,
1,
2,
8,
1,
6,
3,
4,
11,
1,
2,
4,
1,
6,
4,
5,
4,
6,
2,
5,
4,
5,
6,
14,
2,
3,
6,
2,
6,
3,
8,
11,
2,
6,
4,
17,
6,
5,
1,
6,
2,
6,
2,
7,
3,
6,
2,
2,
3,
11,
3,
1,
1,
8,
12,
4,
8,
3,
5,
3,
5,
5,
1,
8,
2,
15,
1,
3,
1,
6,
1,
7,
5,
1,
7,
11,
2,
4,
1,
1,
1,
3,
3,
3,
1,
2,
1,
2,
1,
13,
3,
2,
1,
1,
6,
2,
7,
3,
4,
7,
5,
12,
3,
6,
5,
2,
1,
2,
4,
1,
1,
4,
1,
1,
1,
5,
3,
3,
9,
9,
1,
3,
1,
4,
5,
9,
2,
1,
1,
2,
1,
3,
1,
1,
4,
2,
1,
2,
8,
1,
2,
6,
1,
5,
1,
6,
2,
3,
15,
4,
11,
2,
14,
3,
2,
10,
1,
13,
5,
3,
9,
8,
13,
7,
12,
1,
5,
6,
1,
1,
10,
9,
1,
6,
16,
5,
2,
2,
8,
2,
8,
1,
1,
7,
1,
2,
1,
18,
10,
5,
3,
8,
14,
5,
1,
5,
10,
27,
1,
4,
3,
1,
11,
4,
7,
7,
1,
1,
1,
10,
3,
3,
2,
2,
1,
7,
3,
3,
1,
6,
11,
5,
6,
7,
2,
1,
2,
4,
8,
9,
2,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10,
2,
13,
1,
3,
15,
13,
8,
4,
3,
6,
5,
4,
2,
4,
3,
3,
2,
4,
10,
5,
5,
1,
3,
2,
2,
5,
8,
6,
6,
2,
13,
4,
13,
19,
3,
2,
3,
2,
2,
8,
1,
2,
18,
1,
3,
1,
1,
11,
9,
4,
12,
1,
1,
1,
6,
5,
7,
5,
2,
4,
2,
2,
4,
4,
3,
22,
1,
12,
3,
3,
1,
3,
4,
1,
2,
4,
1,
7,
10,
2,
4,
5,
1,
4,
3,
7,
4,
3,
7,
5,
1,
1,
5,
14,
2,
3
],
"xaxis": "x3",
"yaxis": "y3"
},
{
"alignmentgroup": "True",
"bingroup": "x",
"hovertemplate": "jezyk=hiszp<br>dlugosc=%{x}<br>count=%{y}<extra></extra>",
"legendgroup": "",
"marker": {
"color": "#636efa",
"pattern": {
"shape": ""
}
},
"name": "",
"nbinsx": 50,
"offsetgroup": "",
"orientation": "v",
"showlegend": false,
"type": "histogram",
"x": [
13,
2,
4,
3,
11,
1,
1,
8,
10,
11,
2,
1,
6,
3,
1,
3,
3,
1,
5,
1,
3,
1,
4,
4,
2,
8,
4,
5,
1,
1,
2,
2,
10,
2,
17,
8,
5,
2,
17,
5,
1,
2,
1,
8,
4,
2,
2,
15,
1,
6,
3,
4,
9,
4,
1,
2,
4,
7,
12,
3,
9,
6,
1,
4,
1,
3,
1,
6,
3,
3,
9,
10,
2,
14,
3,
19,
8,
4,
6,
7,
6,
1,
2,
14,
2,
3,
9,
2,
2,
12,
12,
11,
5,
5,
3,
3,
1,
4,
6,
4,
5,
3,
2,
1,
2,
6,
12,
10,
16,
4,
15,
7,
6,
17,
15,
2,
9,
2,
3,
3,
2,
3,
2,
4,
14,
2,
8,
13,
35,
2,
1,
1,
6,
2,
8,
3,
3,
17,
11,
3,
1,
1,
3,
2,
6,
2,
3,
4,
7,
4,
3,
7,
1,
2,
4,
2,
3,
4,
8,
1,
4,
7,
6,
2,
2,
15,
1,
7,
1,
4,
3,
13,
6,
4,
4,
20,
3,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4,
14,
1,
1,
1,
3,
6,
8,
2,
2,
7,
1,
1,
13,
1,
5,
6,
8,
3,
1,
1,
4,
7,
5,
2,
8,
1,
7,
6,
6,
9,
22,
2,
2,
3,
5,
2,
6,
7,
4,
11,
1,
1,
4,
2,
7,
5,
9,
1,
4,
1,
9,
13,
3,
3,
2,
6,
5,
6,
1,
2,
13,
5,
7,
7,
12,
1,
3,
12,
24,
7,
19,
5,
2,
4,
3,
3,
7,
5,
1,
1,
1,
5,
6,
9,
8,
5,
6,
3,
1,
7,
3,
12,
3,
2,
7,
6,
8
],
"xaxis": "x2",
"yaxis": "y2"
},
{
"alignmentgroup": "True",
"bingroup": "x",
"hovertemplate": "jezyk=ang<br>dlugosc=%{x}<br>count=%{y}<extra></extra>",
"legendgroup": "",
"marker": {
"color": "#636efa",
"pattern": {
"shape": ""
}
},
"name": "",
"nbinsx": 50,
"offsetgroup": "",
"orientation": "v",
"showlegend": false,
"type": "histogram",
"x": [
7,
2,
12,
1,
12,
1,
2,
3,
2,
18,
2,
4,
3,
8,
3,
2,
8,
4,
2,
9,
4,
9,
16,
8,
4,
2,
1,
2,
3,
2,
3,
1,
4,
1,
7,
5,
2,
3,
1,
14,
2,
1,
2,
9,
6,
1,
3,
1,
1,
2,
7,
3,
4,
4,
7,
3,
2,
3,
25,
3,
6,
8,
11,
6,
3,
1,
9,
5,
4,
4,
4,
3,
7,
4,
8,
2,
2,
1,
7,
1,
6,
4,
4,
3,
3,
5,
2,
8,
7,
3,
6,
6,
5,
1,
2,
1,
4,
7,
1,
3,
2,
1,
2,
1,
4,
2,
9,
1,
3,
3,
16,
1,
4,
1,
4,
4,
3,
6,
2,
5,
1,
10,
2,
3,
4,
5,
1,
6,
3,
9,
6,
8,
6,
5,
5,
7,
2,
8,
5,
2,
3,
9,
8,
1,
11,
2,
2,
8,
8,
4,
3,
7,
1,
4,
1,
3,
4,
19,
2,
1,
10,
4,
3,
6,
8,
3,
9,
7,
1,
1,
9,
9,
3,
1,
1,
1,
1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
7,
8,
3,
7,
3,
5,
2,
1,
17,
4,
1,
7,
3,
3,
3,
1,
1,
3,
2,
10,
1,
4,
4,
2,
5,
3,
2,
2,
1,
9,
6,
5,
1,
2,
23,
6,
3,
1,
6,
10,
3,
19,
3,
6,
11,
5,
13,
6,
13,
7,
3,
2,
6,
18,
10,
9,
16,
10,
3,
4,
8,
6,
8,
3,
7,
1,
1,
2,
1,
1,
4,
5,
2,
1,
3,
4,
5,
6,
4,
3,
1,
1,
3,
9,
3,
6,
3,
4,
4,
4,
2,
5,
2,
9,
1,
4,
6,
3
],
"xaxis": "x",
"yaxis": "y"
}
],
"layout": {
"annotations": [
{
"font": {},
"showarrow": false,
"text": "jezyk=ang",
"textangle": 90,
"x": 0.98,
"xanchor": "left",
"xref": "paper",
"y": 0.15666666666666665,
"yanchor": "middle",
"yref": "paper"
},
{
"font": {},
"showarrow": false,
"text": "jezyk=hiszp",
"textangle": 90,
"x": 0.98,
"xanchor": "left",
"xref": "paper",
"y": 0.4999999999999999,
"yanchor": "middle",
"yref": "paper"
},
{
"font": {},
"showarrow": false,
"text": "jezyk=polski",
"textangle": 90,
"x": 0.98,
"xanchor": "left",
"xref": "paper",
"y": 0.8433333333333332,
"yanchor": "middle",
"yref": "paper"
}
],
"barmode": "relative",
"legend": {
"tracegroupgap": 0
},
"margin": {
"t": 60
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0,
0.98
],
"title": {
"text": "dlugosc"
}
},
"xaxis2": {
"anchor": "y2",
"domain": [
0,
0.98
],
"matches": "x",
"showticklabels": false
},
"xaxis3": {
"anchor": "y3",
"domain": [
0,
0.98
],
"matches": "x",
"showticklabels": false
},
"yaxis": {
"anchor": "x",
"domain": [
0,
0.3133333333333333
],
"title": {
"text": "count"
}
},
"yaxis2": {
"anchor": "x2",
"domain": [
0.34333333333333327,
0.6566666666666665
],
"matches": "y",
"title": {
"text": "count"
}
},
"yaxis3": {
"anchor": "x3",
"domain": [
0.6866666666666665,
0.9999999999999998
],
"matches": "y",
"title": {
"text": "count"
}
}
}
},
"text/html": [
"<div> <div id=\"4c1ff49c-bfbe-4479-af48-39178a3ed8a7\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"4c1ff49c-bfbe-4479-af48-39178a3ed8a7\")) { Plotly.newPlot( \"4c1ff49c-bfbe-4479-af48-39178a3ed8a7\", [{\"alignmentgroup\":\"True\",\"bingroup\":\"x\",\"hovertemplate\":\"jezyk=polski<br>dlugosc=%{x}<br>count=%{y}<extra></extra>\",\"legendgroup\":\"\",\"marker\":{\"color\":\"#636efa\",\"pattern\":{\"shape\":\"\"}},\"name\":\"\",\"nbinsx\":50,\"offsetgroup\":\"\",\"orientation\":\"v\",\"showlegend\":false,\"type\":\"histogram\",\"x\":[8,4,3,8,7,2,6,7,7,6,3,9,11,9,7,2,10,6,1,2,1,1,2,8,5,2,1,3,1,2,8,1,6,3,4,11,1,2,4,1,6,4,5,4,6,2,5,4,5,6,14,2,3,6,2,6,3,8,11,2,6,4,17,6,5,1,6,2,6,2,7,3,6,2,2,3,11,3,1,1,8,12,4,8,3,5,3,5,5,1,8,2,15,1,3,1,6,1,7,5,1,7,11,2,4,1,1,1,3,3,3,1,2,1,2,1,13,3,2,1,1,6,2,7,3,4,7,5,12,3,6,5,2,1,2,4,1,1,4,1,1,1,5,3,3,9,9,1,3,1,4,5,9,2,1,1,2,1,3,1,1,4,2,1,2,8,1,2,6,1,5,1,6,2,3,15,4,11,2,14,3,2,10,1,13,5,3,9,8,13,7,12,1,5,6,1,1,10,9,1,6,16,5,2,2,8,2,8,1,1,7,1,2,1,18,10,5,3,8,14,5,1,5,10,27,1,4,3,1,11,4,7,7,1,1,1,10,3,3,2,2,1,7,3,3,1,6,11,5,6,7,2,1,2,4,8,9,2,1,3,6,8,6,11,2,3,16,2,2,1,22,4,4,12,8,3,5,3,2,9,4,5,5,1,2,1,1,9,6,1,5,2,7,8,16,17,6,2,3,3,7,4,5,5,2,1,4,4,9,1,2,5,3,1,9,2,1,3,2,3,15,1,2,13,7,2,2,8,7,4,1,3,7,4,6,2,6,7,4,4,1,4,1,1,2,1,6,13,6,11,14,31,6,5,7,10,3,12,2,1,3,1,9,12,8,1,13,6,2,4,2,8,3,8,10,6,32,4,1,5,1,5,5,6,1,1,5,8,8,3,1,10,2,4,8,15,7,11,1,2,1,7,5,1,5,3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,9,11,2,7,7,1,3,8,3,3,8,3,1,12,3,3,3,7,1,9,3,8,1,2,6,5,6,4,6,6,10,4,3,2,1,4,1,8,4,4,4,5,1,1,3,5,4,10,6,2,5,11,13,6,5,2,5,6,9,4,7,1,2,5,7,4,8,1,20,12,2,5,11,2,1,3,10,5,7,3,4,7,1,1
" \n",
"var gd = document.getElementById('4c1ff49c-bfbe-4479-af48-39178a3ed8a7');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" }) }; }); </script> </div>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df = pd.DataFrame([[random.choice(['ang','polski','hiszp']), np.random.geometric(0.2)] for i in range(5000) ], columns=['jezyk', 'dlugosc'])\n",
"fig = px.histogram(df, x=\"dlugosc\",facet_row='jezyk',nbins=50, hover_data=df.columns)\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"?px.histogram"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ZADANIE 1 \n",
"\n",
"ZNAJDŹ PRZYKŁAD TEKSTÓW Z TEJ SAMEJ DOMENY 1_000_000 słów (20 punktów):\n",
"- język angielski \n",
"- język polski\n",
"- język z rodziny romańskich\n",
"\n",
"Narzędzia:\n",
"- nltk, plotly express\n",
"\n",
"\n",
"Dla każdego z języków:\n",
"- policz ilosć unikalnych lowercase słów (ze stemmingiem i bez)\n",
"- policz ilosć znaków\n",
"- policz ilosć unikalnych znaków\n",
"- policz ilosć zdań zdań\n",
"- policz ilosć unikalnych zdań\n",
"- podaj min, max, średnią oraz medianę ilości znaków w słowie \n",
"- podaj min, max, średnią oraz medianę ilości słów w zdaniu\n",
"- wygeneruj word cloud (normalnie i po usunięciu stopwordów)\n",
"- wypisz 20 najbardziej popularnych słów (normalnie i po usunięciu stopwordów) (lowercase)\n",
"- wypisz 20 najbardziej popularnych bigramów (normalnie i po usunięciu stopwordów)\n",
"- narysuj wykres częstotliwości słów (histogram) w taki sposób żeby był maksymalnie czytelny, wypróbuj skali logarytmicznej x, y, usuwanie słów poniżej limitu wystąpień itp. \n",
"- dla próbki 10000 zdań sprawdź jak często langdetect https://pypi.org/project/langdetect/ się myli i jakie języki odgaduje \n",
"- zilustruj prawo zipfa ( px.line z zaznaczonymi punktami)\n",
"- napisz wnioski (20-50 zdań)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### START ZADANIA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### KONIEC ZADANIA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## ZADANIE\n",
"\n",
"Weź teksty w języku polskim (mają składać sie po 5 osobnych dokumentów każdy:\n",
"- tekst prawny\n",
"- tekst naukowy\n",
"- tekst z polskiego z powieści (np. wolne lektury)\n",
"- tekst z polskiego internetu (reddit, wykop, komentarze)\n",
"- transkrypcja tekstu mówionego\n",
"\n",
"\n",
"- zilustruj gunning_fog INDEX z https://pypi.org/project/textstat/ (oś y) i średnią długość zdania (oś x) na jednym wykresie narysuj dla wszystkich tekstów na jednym wykresie , domeny oznacz kolorami (px.scatter)\n",
"- zilustruj prawo Heap'a dla wszystkich tekstów na jednym wykresie, domeny oznacz kolorami (px.scatter)\n",
"- napisz wnioski (20-50 zdań)\n",
"\n",
"NAPISZ WNIOSKI\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### START ZADANIA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### KONIEC ZADANIA"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## WYKONANIE ZADAŃ\n",
"Zgodnie z instrukcją 01_Kodowanie_tekstu.ipynb"
]
}
],
"metadata": {
"author": "Jakub Pokrywka",
"email": "kubapok@wmi.amu.edu.pl",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"lang": "pl",
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
},
"subtitle": "0.Informacje na temat przedmiotu[ćwiczenia]",
"title": "Ekstrakcja informacji",
"year": "2021"
},
"nbformat": 4,
"nbformat_minor": 4
}