Lower(), poprawki

This commit is contained in:
Anna Nowak 2021-03-20 13:39:15 +01:00
parent 42b70150a4
commit 3c52479425
2 changed files with 741 additions and 197 deletions

View File

@ -20,11 +20,336 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 1,
"metadata": { "metadata": {
"id": "D7_8XDfpfH-X" "id": "D7_8XDfpfH-X"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: tflearn==0.5 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from -r requirements.txt (line 1)) (0.5.0)\n",
"Requirement already satisfied: tensorflow in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from -r requirements.txt (line 2)) (2.4.1)\n",
"Requirement already satisfied: pystempel==1.2 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from -r requirements.txt (line 3)) (1.2.0)\n",
"Requirement already satisfied: six in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tflearn==0.5->-r requirements.txt (line 1)) (1.15.0)\n",
"Requirement already satisfied: Pillow in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tflearn==0.5->-r requirements.txt (line 1)) (8.0.1)\n",
"Requirement already satisfied: numpy in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tflearn==0.5->-r requirements.txt (line 1)) (1.19.2)\n",
"Requirement already satisfied: flatbuffers~=1.12.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (1.12)\n",
"Requirement already satisfied: gast==0.3.3 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (0.3.3)\n",
"Requirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (2.4.0)\n",
"Requirement already satisfied: grpcio~=1.32.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (1.32.0)\n",
"Requirement already satisfied: wheel~=0.35 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tensorflow->-r requirements.txt (line 2)) (0.35.1)\n",
"Requirement already satisfied: wrapt~=1.12.1 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (1.12.1)\n",
"Requirement already satisfied: termcolor~=1.1.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (1.1.0)\n",
"Requirement already satisfied: google-pasta~=0.2 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (0.2.0)\n",
"Requirement already satisfied: absl-py~=0.10 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (0.12.0)\n",
"Requirement already satisfied: tensorboard~=2.4 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (2.4.1)\n",
"Requirement already satisfied: astunparse~=1.6.3 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (1.6.3)\n",
"Requirement already satisfied: opt-einsum~=3.3.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (3.3.0)\n",
"Requirement already satisfied: typing-extensions~=3.7.4 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tensorflow->-r requirements.txt (line 2)) (3.7.4.3)\n",
"Requirement already satisfied: h5py~=2.10.0 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tensorflow->-r requirements.txt (line 2)) (2.10.0)\n",
"Requirement already satisfied: keras-preprocessing~=1.1.2 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (1.1.2)\n",
"Requirement already satisfied: protobuf>=3.9.2 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorflow->-r requirements.txt (line 2)) (3.15.6)\n",
"Requirement already satisfied: sortedcontainers in c:\\users\\annad\\anaconda3\\lib\\site-packages (from pystempel==1.2->-r requirements.txt (line 3)) (2.2.2)\n",
"Requirement already satisfied: tqdm in c:\\users\\annad\\anaconda3\\lib\\site-packages (from pystempel==1.2->-r requirements.txt (line 3)) (4.50.2)\n",
"Requirement already satisfied: markdown>=2.6.8 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (3.3.4)\n",
"Requirement already satisfied: requests<3,>=2.21.0 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (2.24.0)\n",
"Requirement already satisfied: google-auth<2,>=1.6.3 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (1.28.0)\n",
"Requirement already satisfied: setuptools>=41.0.0 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (50.3.1.post20201107)\n",
"Requirement already satisfied: werkzeug>=0.11.15 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (1.0.1)\n",
"Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (1.8.0)\n",
"Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (0.4.3)\n",
"Requirement already satisfied: idna<3,>=2.5 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (2.10)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (2020.6.20)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (3.0.4)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\\users\\annad\\anaconda3\\lib\\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (1.25.11)\n",
"Requirement already satisfied: rsa<5,>=3.1.4; python_version >= \"3.6\" in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (4.7.2)\n",
"Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (0.2.8)\n",
"Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (4.2.1)\n",
"Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (1.3.0)\n",
"Requirement already satisfied: pyasn1>=0.1.3 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from rsa<5,>=3.1.4; python_version >= \"3.6\"->google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (0.4.8)\n",
"Requirement already satisfied: oauthlib>=3.0.0 in c:\\users\\annad\\appdata\\roaming\\python\\python38\\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow->-r requirements.txt (line 2)) (3.1.0)\n",
"Package Version\n",
"---------------------------------- -------------------\n",
"absl-py 0.12.0\n",
"alabaster 0.7.12\n",
"anaconda-client 1.7.2\n",
"anaconda-navigator 1.10.0\n",
"anaconda-project 0.8.3\n",
"argh 0.26.2\n",
"argon2-cffi 20.1.0\n",
"asn1crypto 1.4.0\n",
"astroid 2.4.2\n",
"astropy 4.0.2\n",
"astunparse 1.6.3\n",
"async-generator 1.10\n",
"atomicwrites 1.4.0\n",
"attrs 20.3.0\n",
"autopep8 1.5.4\n",
"Babel 2.8.1\n",
"backcall 0.2.0\n",
"backports.functools-lru-cache 1.6.1\n",
"backports.shutil-get-terminal-size 1.0.0\n",
"backports.tempfile 1.0\n",
"backports.weakref 1.0.post1\n",
"bcrypt 3.2.0\n",
"beautifulsoup4 4.9.3\n",
"bitarray 1.6.1\n",
"bkcharts 0.2\n",
"bleach 3.2.1\n",
"bokeh 2.2.3\n",
"boto 2.49.0\n",
"Bottleneck 1.3.2\n",
"brotlipy 0.7.0\n",
"cachetools 4.2.1\n",
"certifi 2020.6.20\n",
"cffi 1.14.3\n",
"chardet 3.0.4\n",
"click 7.1.2\n",
"cloudpickle 1.6.0\n",
"clyent 1.2.2\n",
"colorama 0.4.4\n",
"comtypes 1.1.7\n",
"conda 4.9.2\n",
"conda-build 3.20.5\n",
"conda-package-handling 1.7.2\n",
"conda-verify 3.4.2\n",
"contextlib2 0.6.0.post1\n",
"cryptography 3.1.1\n",
"cycler 0.10.0\n",
"Cython 0.29.21\n",
"cytoolz 0.11.0\n",
"dask 2.30.0\n",
"decorator 4.4.2\n",
"defusedxml 0.6.0\n",
"diff-match-patch 20200713\n",
"distributed 2.30.1\n",
"docutils 0.16\n",
"entrypoints 0.3\n",
"et-xmlfile 1.0.1\n",
"fastcache 1.1.0\n",
"filelock 3.0.12\n",
"flake8 3.8.4\n",
"Flask 1.1.2\n",
"flatbuffers 1.12\n",
"fsspec 0.8.3\n",
"future 0.18.2\n",
"gast 0.3.3\n",
"gevent 20.9.0\n",
"glob2 0.7\n",
"google-auth 1.28.0\n",
"google-auth-oauthlib 0.4.3\n",
"google-pasta 0.2.0\n",
"greenlet 0.4.17\n",
"grpcio 1.32.0\n",
"h5py 2.10.0\n",
"HeapDict 1.0.1\n",
"html5lib 1.1\n",
"idna 2.10\n",
"imageio 2.9.0\n",
"imagesize 1.2.0\n",
"importlib-metadata 2.0.0\n",
"iniconfig 1.1.1\n",
"intervaltree 3.1.0\n",
"ipykernel 5.3.4\n",
"ipython 7.19.0\n",
"ipython-genutils 0.2.0\n",
"ipywidgets 7.5.1\n",
"isort 5.6.4\n",
"itsdangerous 1.1.0\n",
"jdcal 1.4.1\n",
"jedi 0.17.1\n",
"Jinja2 2.11.2\n",
"joblib 0.17.0\n",
"json5 0.9.5\n",
"jsonschema 3.2.0\n",
"jupyter 1.0.0\n",
"jupyter-client 6.1.7\n",
"jupyter-console 6.2.0\n",
"jupyter-core 4.6.3\n",
"jupyterlab 2.2.6\n",
"jupyterlab-pygments 0.1.2\n",
"jupyterlab-server 1.2.0\n",
"Keras-Preprocessing 1.1.2\n",
"keyring 21.4.0\n",
"kiwisolver 1.3.0\n",
"lazy-object-proxy 1.4.3\n",
"libarchive-c 2.9\n",
"llvmlite 0.34.0\n",
"locket 0.2.0\n",
"lxml 4.6.1\n",
"Markdown 3.3.4\n",
"MarkupSafe 1.1.1\n",
"matplotlib 3.3.2\n",
"mccabe 0.6.1\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"menuinst 1.4.16\n",
"mistune 0.8.4\n",
"mkl-fft 1.2.0\n",
"mkl-random 1.1.1\n",
"mkl-service 2.3.0\n",
"mock 4.0.2\n",
"more-itertools 8.6.0\n",
"mpmath 1.1.0\n",
"msgpack 1.0.0\n",
"multipledispatch 0.6.0\n",
"navigator-updater 0.2.1\n",
"nbclient 0.5.1\n",
"nbconvert 6.0.7\n",
"nbformat 5.0.8\n",
"nest-asyncio 1.4.2\n",
"networkx 2.5\n",
"nltk 3.5\n",
"nose 1.3.7\n",
"notebook 6.1.4\n",
"numba 0.51.2\n",
"numexpr 2.7.1\n",
"numpy 1.19.2\n",
"numpydoc 1.1.0\n",
"oauthlib 3.1.0\n",
"olefile 0.46\n",
"openpyxl 3.0.5\n",
"opt-einsum 3.3.0\n",
"packaging 20.4\n",
"pandas 1.1.3\n",
"pandocfilters 1.4.3\n",
"paramiko 2.7.2\n",
"parso 0.7.0\n",
"partd 1.1.0\n",
"path 15.0.0\n",
"pathlib2 2.3.5\n",
"pathtools 0.1.2\n",
"patsy 0.5.1\n",
"pep8 1.7.1\n",
"pexpect 4.8.0\n",
"pickleshare 0.7.5\n",
"Pillow 8.0.1\n",
"pip 20.2.4\n",
"pkginfo 1.6.1\n",
"pluggy 0.13.1\n",
"ply 3.11\n",
"prometheus-client 0.8.0\n",
"prompt-toolkit 3.0.8\n",
"protobuf 3.15.6\n",
"psutil 5.7.2\n",
"py 1.9.0\n",
"pyasn1 0.4.8\n",
"pyasn1-modules 0.2.8\n",
"pycodestyle 2.6.0\n",
"pycosat 0.6.3\n",
"pycparser 2.20\n",
"pycurl 7.43.0.6\n",
"pydocstyle 5.1.1\n",
"pyflakes 2.2.0\n",
"Pygments 2.7.2\n",
"pylint 2.6.0\n",
"PyNaCl 1.4.0\n",
"pyodbc 4.0.0-unsupported\n",
"pyOpenSSL 19.1.0\n",
"pyparsing 2.4.7\n",
"pyreadline 2.1\n",
"pyrsistent 0.17.3\n",
"PySocks 1.7.1\n",
"pystempel 1.2.0\n",
"pytest 0.0.0\n",
"python-dateutil 2.8.1\n",
"python-jsonrpc-server 0.4.0\n",
"python-language-server 0.35.1\n",
"pytz 2020.1\n",
"PyWavelets 1.1.1\n",
"pywin32 227\n",
"pywin32-ctypes 0.2.0\n",
"pywinpty 0.5.7\n",
"PyYAML 5.3.1\n",
"pyzmq 19.0.2\n",
"QDarkStyle 2.8.1\n",
"QtAwesome 1.0.1\n",
"qtconsole 4.7.7\n",
"QtPy 1.9.0\n",
"regex 2020.10.15\n",
"requests 2.24.0\n",
"requests-oauthlib 1.3.0\n",
"rope 0.18.0\n",
"rsa 4.7.2\n",
"Rtree 0.9.4\n",
"ruamel-yaml 0.15.87\n",
"scikit-image 0.17.2\n",
"scikit-learn 0.23.2\n",
"scipy 1.5.2\n",
"seaborn 0.11.0\n",
"Send2Trash 1.5.0\n",
"setuptools 50.3.1.post20201107\n",
"simplegeneric 0.8.1\n",
"singledispatch 3.4.0.3\n",
"sip 4.19.13\n",
"six 1.15.0\n",
"snowballstemmer 2.0.0\n",
"sortedcollections 1.2.1\n",
"sortedcontainers 2.2.2\n",
"soupsieve 2.0.1\n",
"Sphinx 3.2.1\n",
"sphinxcontrib-applehelp 1.0.2\n",
"sphinxcontrib-devhelp 1.0.2\n",
"sphinxcontrib-htmlhelp 1.0.3\n",
"sphinxcontrib-jsmath 1.0.1\n",
"sphinxcontrib-qthelp 1.0.3\n",
"sphinxcontrib-serializinghtml 1.1.4\n",
"sphinxcontrib-websupport 1.2.4\n",
"spyder 4.1.5\n",
"spyder-kernels 1.9.4\n",
"SQLAlchemy 1.3.20\n",
"statsmodels 0.12.0\n",
"sympy 1.6.2\n",
"tables 3.6.1\n",
"tblib 1.7.0\n",
"tensorboard 2.4.1\n",
"tensorboard-plugin-wit 1.8.0\n",
"tensorflow 2.4.1\n",
"tensorflow-estimator 2.4.0\n",
"termcolor 1.1.0\n",
"terminado 0.9.1\n",
"testpath 0.4.4\n",
"tflearn 0.5.0\n",
"threadpoolctl 2.1.0\n",
"tifffile 2020.10.1\n",
"toml 0.10.1\n",
"toolz 0.11.1\n",
"tornado 6.0.4\n",
"tqdm 4.50.2\n",
"traitlets 5.0.5\n",
"typing-extensions 3.7.4.3\n",
"ujson 4.0.1\n",
"unicodecsv 0.14.1\n",
"urllib3 1.25.11\n",
"watchdog 0.10.3\n",
"wcwidth 0.2.5\n",
"webencodings 0.5.1\n",
"Werkzeug 1.0.1\n",
"wheel 0.35.1\n",
"widgetsnbextension 3.5.1\n",
"win-inet-pton 1.1.0\n",
"win-unicode-console 0.5\n",
"wincertstore 0.2\n",
"wrapt 1.12.1\n",
"xlrd 1.2.0\n",
"XlsxWriter 1.3.7\n",
"xlwings 0.20.8\n",
"xlwt 1.3.0\n",
"xmltodict 0.12.0\n",
"yapf 0.30.0\n",
"zict 2.0.0\n",
"zipp 3.4.0\n",
"zope.event 4.5.0\n",
"zope.interface 5.1.2\n"
]
}
],
"source": [ "source": [
"!pip install -r requirements.txt --user\n", "!pip install -r requirements.txt --user\n",
"!pip list" "!pip list"
@ -32,17 +357,29 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 2,
"metadata": { "metadata": {
"id": "GOGs4hL6fwwK" "id": "GOGs4hL6fwwK"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From C:\\Users\\annad\\AppData\\Roaming\\Python\\Python38\\site-packages\\tensorflow\\python\\compat\\v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"non-resource variables are not supported in the long term\n",
"curses is not supported on this machine (please install/reinstall curses for an optimal experience)\n"
]
}
],
"source": [ "source": [
"import numpy as np\n", "import numpy as np\n",
"import tflearn\n", "import tflearn\n",
"import tensorflow\n", "import tensorflow\n",
"import random\n", "import random\n",
"import json" "import json\n",
"import nltk"
] ]
}, },
{ {
@ -56,14 +393,22 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 4,
"metadata": { "metadata": {
"id": "jy4-9guXgBY3" "id": "jy4-9guXgBY3"
}, },
"outputs": [], "outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[nltk_data] Downloading package punkt to\n",
"[nltk_data] C:\\Users\\annad\\AppData\\Roaming\\nltk_data...\n",
"[nltk_data] Package punkt is already up-to-date!\n"
]
}
],
"source": [ "source": [
"import nltk\n",
"\n",
"nltk.download('punkt')\n", "nltk.download('punkt')\n",
"from nltk.stem.lancaster import LancasterStemmer\n", "from nltk.stem.lancaster import LancasterStemmer\n",
"stemmer_en = LancasterStemmer()" "stemmer_en = LancasterStemmer()"
@ -80,15 +425,23 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 5,
"metadata": { "metadata": {
"id": "XBpvJXn1gBDi" "id": "XBpvJXn1gBDi"
}, },
"outputs": [], "outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Loading: 92%|██████████████████████████████████████████████████▋ | 2051427/2225192 [00:01<00:00, 1634466.61bytes/s]"
]
}
],
"source": [ "source": [
"from stempel import StempelStemmer\n", "from stempel import StempelStemmer\n",
"\n", "\n",
"stemmer_pl = StempelStemmer.default() #może wersja \".polimorf()\" jest lepsza?" "stemmer_pl = StempelStemmer.default() #.polimorf() #jest lepsza?"
] ]
}, },
{ {
@ -111,7 +464,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 6,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -119,7 +472,15 @@
"id": "jKsIW7hHhepB", "id": "jKsIW7hHhepB",
"outputId": "09ba1cb1-bb0e-44ee-9d28-017209902934" "outputId": "09ba1cb1-bb0e-44ee-9d28-017209902934"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'intents': [{'tag': 'greeting', 'patterns': ['Cześć', 'Elo', 'Jesteś?', 'Hej', 'Dzień dobry', 'Sup', 'Witam', 'Hejka', 'Hej!'], 'responses': ['Cześć!', 'Dobrze Cię widzieć!', 'Hej, w czym mogę pomóc?'], 'context_set': ''}, {'tag': 'goodbye', 'patterns': ['narazie', 'Do zobaczenia', 'Dowidzenia', 'Dobranoc', 'Miłego dnia'], 'responses': ['Do zobaczenia później', 'Mam nadzieję, że później pogadamy', 'Narazie!'], 'context_set': ''}, {'tag': 'age', 'patterns': ['Ile masz lat', 'Ile lat ma Janet', 'Wiek', 'Jak stara jesteś', 'jaki jest twój wiek', 'Wieko', 'urodziny'], 'responses': ['Mam kilka dni', 'Urodziłam się 17.03.2021'], 'context_set': ''}, {'tag': 'name', 'patterns': ['Jak masz na imię', 'Jak Cię zwą?', 'twoje imie?', 'Imie', 'Jak cię nazywać', 'Kim jesteś'], 'responses': ['Możesz mnie nazywać Janet!', 'Jestem Janet', 'Jestem Janet, twój ulubiony chatbot'], 'context_set': ''}, {'tag': 'goout', 'patterns': ['Czy chcesz gdzieś wyjść?', 'zrobimy coś razem?', 'pójdziemy gdzieś razem?'], 'responses': ['Może kiedy indziej', 'Odezwę się latem'], 'context_set': ''}, {'tag': 'doing', 'patterns': ['Co robisz teraz?', 'co słychać', 'jakie masz plany?', 'jak się masz?'], 'responses': ['Gram w grę', 'Słucham muzyki', 'nie twój interes', 'nie mam czasu odpowiadać', ''], 'context_set': ''}, {'tag': 'game', 'patterns': ['a w co grasz?', 'a w co?', 'grasz?', 'jaka gra'], 'responses': ['nie interesuj się', 'a co cię to obchodzi', '...', 'w coś', 'W OSRS'], 'context_set': ''}, {'tag': 'music', 'patterns': ['czego?', 'czego słuchasz?', 'jakiej muzyki?', 'a czego?'], 'responses': ['Starego vinyla z 1995 roku', 'mojego ulubionego setu rejwowego', 'czegoś tam...'], 'context_set': ''}, {'tag': 'angry', 'patterns': ['bo co?', 'dlaczego?', 'jak to?'], 'responses': ['Czas zakończyć rozmowę', 'nie mam na to siły i czasu', 'zostaw mnie w spokoju'], 'context_set': ''}, {'tag': 'why', 'patterns': ['o co chodzi?', 'czemu jesteś zła', 'poczekaj'], 'responses': ['...', 'Nie pisz do mnie więcej', 'Nie lubię Cię'], 'context_set': ''}]}\n"
]
}
],
"source": [ "source": [
"with open(\"intents_pl.json\", encoding='utf-8') as file:\n", "with open(\"intents_pl.json\", encoding='utf-8') as file:\n",
" data_pl = json.load(file)\n", " data_pl = json.load(file)\n",
@ -138,7 +499,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 7,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -146,7 +507,15 @@
"id": "gJbm_CtRhNOK", "id": "gJbm_CtRhNOK",
"outputId": "157196fc-6a25-4a70-aca3-9d886c743f6c" "outputId": "157196fc-6a25-4a70-aca3-9d886c743f6c"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'intents': [{'tag': 'greeting', 'patterns': ['Cześć', 'Elo', 'Jesteś?', 'Hej', 'Dzień dobry', 'Sup'], 'responses': ['Cześć!', 'Dobrze Cię widzieć!', 'Hej, w czym mogę pomóc?'], 'context_set': ''}, {'tag': 'goodbye', 'patterns': ['narazie', 'Do zobaczenia', 'Dowidzenia', 'Dobranoc', 'Miłego dnia'], 'responses': ['Do zobaczenia później', 'Mam nadzieję, że później pogadamy', 'Narazie!'], 'context_set': ''}, {'tag': 'age', 'patterns': ['Ile masz lat', 'Ile lat ma Janet', 'Wiek', 'Jak stara jesteś', 'urodziny'], 'responses': ['Mam kilka dni', 'Urodziłam się 17.03.2021'], 'context_set': ''}, {'tag': 'name', 'patterns': ['Jak masz na imię', 'Jak Cię zwą?', 'twoje imie?', 'Imie', 'Jak cię nazywać', 'Kim jesteś'], 'responses': ['Możesz mnie nazywać Janet!', 'Jestem Janet', 'Jestem Janet, twój ulubiony chatbot'], 'context_set': ''}]}\n"
]
}
],
"source": [ "source": [
"with open(\"intents_pl_short.json\", encoding='utf-8') as file:\n", "with open(\"intents_pl_short.json\", encoding='utf-8') as file:\n",
" data_pl_short = json.load(file)\n", " data_pl_short = json.load(file)\n",
@ -165,7 +534,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 8,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -173,7 +542,15 @@
"id": "vW5FyoRqhfIc", "id": "vW5FyoRqhfIc",
"outputId": "378d8894-9c9c-46be-ade1-b6491f095179" "outputId": "378d8894-9c9c-46be-ade1-b6491f095179"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'intents': [{'tag': 'greeting', 'patterns': ['Hi', 'How are you', 'Is anyone there?', 'Hello', 'Good day', 'Whats up'], 'responses': ['Hello!', 'Good to see you again!', 'Hi there, how can I help?'], 'context_set': ''}, {'tag': 'goodbye', 'patterns': ['cya', 'See you later', 'Goodbye', 'I am Leaving', 'Have a Good day'], 'responses': ['Sad to see you go :(', 'Talk to you later', 'Goodbye!'], 'context_set': ''}, {'tag': 'age', 'patterns': ['how old', 'how old is tim', 'what is your age', 'how old are you', 'age?'], 'responses': ['I am 18 years old!', '18 years young!'], 'context_set': ''}, {'tag': 'name', 'patterns': ['what is your name', 'what should I call you', 'whats your name?'], 'responses': ['You can call me Tim.', \"I'm Tim!\", \"I'm Tim aka Tech With Tim.\"], 'context_set': ''}, {'tag': 'shop', 'patterns': ['Id like to buy something', 'whats on the menu', 'what do you reccommend?', 'could i get something to eat'], 'responses': ['We sell chocolate chip cookies for $2!', 'Cookies are on the menu!'], 'context_set': ''}, {'tag': 'hours', 'patterns': ['when are you guys open', 'what are your hours', 'hours of operation'], 'responses': ['We are open 7am-4pm Monday-Friday!'], 'context_set': ''}]}\n"
]
}
],
"source": [ "source": [
"with open(\"intents_en.json\", encoding='utf-8') as file:\n", "with open(\"intents_en.json\", encoding='utf-8') as file:\n",
" data_en = json.load(file)\n", " data_en = json.load(file)\n",
@ -192,7 +569,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 9,
"metadata": { "metadata": {
"id": "gy6p55-DjLyY" "id": "gy6p55-DjLyY"
}, },
@ -215,13 +592,13 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 10,
"metadata": { "metadata": {
"id": "nBUKwSr_kVSd" "id": "nBUKwSr_kVSd"
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"for intent in data_pl_short[\"intents\"]: #Loop przez cały json\n", "for intent in data_pl[\"intents\"]: #Loop przez cały json\n",
" for pattern in intent[\"patterns\"]: #loop przez wszystkie możliwe rodzaje przykładowego inputu użytkownika\n", " for pattern in intent[\"patterns\"]: #loop przez wszystkie możliwe rodzaje przykładowego inputu użytkownika\n",
" wrds = nltk.word_tokenize(pattern) #Tokenizing every word\n", " wrds = nltk.word_tokenize(pattern) #Tokenizing every word\n",
" words.extend(wrds) #Add every single tokenized word\n", " words.extend(wrds) #Add every single tokenized word\n",
@ -234,7 +611,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 11,
"metadata": { "metadata": {
"id": "wOyP5lbikV1e" "id": "wOyP5lbikV1e"
}, },
@ -253,9 +630,24 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Words:\n",
"['!', 'a', 'bo', 'chcieć', 'chodzić', 'co', 'coś', 'czec', 'czy', 'dlaczy', 'dnia', 'do', 'dobranoc', 'dobry', 'dowidzieć', 'dzień', 'elo', 'gra', 'grać', 'gć', 'hej', 'hejka', 'ile', 'imia', 'imie', 'jak', 'jaka', 'jaki', 'janet', 'jest', 'ki', 'lat', 'mieć', 'miłeon', 'muzy', 'na', 'narazie', 'nazywać', 'o', 'plany', 'poczekać', 'pójdziemy', 'raz', 'robić', 'się', 'star', 'supć', 'słuchać', 'słychać', 'teraa', 'to', 'twoj', 'twój', 'ty', 'urodziny', 'w', 'wiek', 'wieko', 'witać', 'wyjść', 'y', 'zobaczyć', 'zrobić', 'zwać', 'zła']\n",
"labels:\n",
"['age', 'angry', 'doing', 'game', 'goodbye', 'goout', 'greeting', 'music', 'name', 'why']\n",
"docs_y:\n",
"['greeting', 'greeting', 'greeting', 'greeting', 'greeting', 'greeting', 'greeting', 'greeting', 'greeting', 'goodbye', 'goodbye', 'goodbye', 'goodbye', 'goodbye', 'age', 'age', 'age', 'age', 'age', 'age', 'age', 'name', 'name', 'name', 'name', 'name', 'name', 'goout', 'goout', 'goout', 'doing', 'doing', 'doing', 'doing', 'game', 'game', 'game', 'game', 'music', 'music', 'music', 'music', 'angry', 'angry', 'angry', 'why', 'why', 'why']\n",
"docs_x:\n",
"[['Cześć'], ['Elo'], ['Jesteś', '?'], ['Hej'], ['Dzień', 'dobry'], ['Sup'], ['Witam'], ['Hejka'], ['Hej', '!'], ['narazie'], ['Do', 'zobaczenia'], ['Dowidzenia'], ['Dobranoc'], ['Miłego', 'dnia'], ['Ile', 'masz', 'lat'], ['Ile', 'lat', 'ma', 'Janet'], ['Wiek'], ['Jak', 'stara', 'jesteś'], ['jaki', 'jest', 'twój', 'wiek'], ['Wieko'], ['urodziny'], ['Jak', 'masz', 'na', 'imię'], ['Jak', 'Cię', 'zwą', '?'], ['twoje', 'imie', '?'], ['Imie'], ['Jak', 'cię', 'nazywać'], ['Kim', 'jesteś'], ['Czy', 'chcesz', 'gdzieś', 'wyjść', '?'], ['zrobimy', 'coś', 'razem', '?'], ['pójdziemy', 'gdzieś', 'razem', '?'], ['Co', 'robisz', 'teraz', '?'], ['co', 'słychać'], ['jakie', 'masz', 'plany', '?'], ['jak', 'się', 'masz', '?'], ['a', 'w', 'co', 'grasz', '?'], ['a', 'w', 'co', '?'], ['grasz', '?'], ['jaka', 'gra'], ['czego', '?'], ['czego', 'słuchasz', '?'], ['jakiej', 'muzyki', '?'], ['a', 'czego', '?'], ['bo', 'co', '?'], ['dlaczego', '?'], ['jak', 'to', '?'], ['o', 'co', 'chodzi', '?'], ['czemu', 'jesteś', 'zła'], ['poczekaj']]\n"
]
}
],
"source": [ "source": [
"#Podgląd zmiennych\n", "#Podgląd zmiennych\n",
"print(f\"Words:\\n{words}\")\n", "print(f\"Words:\\n{words}\")\n",
@ -293,7 +685,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 13,
"metadata": { "metadata": {
"id": "8FDKrjpjkYsE" "id": "8FDKrjpjkYsE"
}, },
@ -302,7 +694,7 @@
"for x, doc in enumerate(docs_x): #Przejście przez wszystkie słowa\n", "for x, doc in enumerate(docs_x): #Przejście przez wszystkie słowa\n",
" bag =[]\n", " bag =[]\n",
"\n", "\n",
" wrds = [stemmer_pl.stem(w) for w in doc] #podział wszystkich słów w danym zdaniu\n", " wrds = [stemmer_pl.stem(w).lower() for w in doc] #podział wszystkich słów w danym zdaniu\n",
"\n", "\n",
" for w in words:\n", " for w in words:\n",
" if w in wrds:\n", " if w in wrds:\n",
@ -322,7 +714,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 20,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -330,14 +722,33 @@
"id": "cJKUjbkC72-f", "id": "cJKUjbkC72-f",
"outputId": "7e2bff96-78ce-49ff-b27b-eee77752228d" "outputId": "7e2bff96-78ce-49ff-b27b-eee77752228d"
}, },
"outputs": [], "outputs": [
{
"data": {
"text/plain": [
"48"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"Loading: 100%|███████████████████████████████████████████████████████| 2225192/2225192 [00:20<00:00, 1720623.81bytes/s]\u001b[A"
]
}
],
"source": [ "source": [
"len(training) #dla pl_short mamy 44 słowa" "len(training) #dla pl_short mamy 44 słowa"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 11,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -345,16 +756,97 @@
"id": "Kx43VDgS7-yN", "id": "Kx43VDgS7-yN",
"outputId": "4fa6f6fe-dc58-4e76-bb26-38c1784ab79c" "outputId": "4fa6f6fe-dc58-4e76-bb26-38c1784ab79c"
}, },
"outputs": [], "outputs": [
{
"data": {
"text/plain": [
"10"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"len(output[0]) #Które można przypisać do 4 kategorii" "len(output[0]) #Które można przypisać do 4 kategorii"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[0 0 0 ... 0 0 0]\n",
" [0 0 0 ... 0 0 0]\n",
" [0 0 0 ... 0 0 0]\n",
" ...\n",
" [0 0 0 ... 0 0 0]\n",
" [0 0 0 ... 0 0 1]\n",
" [0 0 0 ... 0 0 0]]\n",
"[[0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 0 0 1 0 0 0]\n",
" [0 0 0 0 1 0 0 0 0 0]\n",
" [0 0 0 0 1 0 0 0 0 0]\n",
" [0 0 0 0 1 0 0 0 0 0]\n",
" [0 0 0 0 1 0 0 0 0 0]\n",
" [0 0 0 0 1 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [1 0 0 0 0 0 0 0 0 0]\n",
" [0 0 0 0 0 0 0 0 1 0]\n",
" [0 0 0 0 0 0 0 0 1 0]\n",
" [0 0 0 0 0 0 0 0 1 0]\n",
" [0 0 0 0 0 0 0 0 1 0]\n",
" [0 0 0 0 0 0 0 0 1 0]\n",
" [0 0 0 0 0 0 0 0 1 0]\n",
" [0 0 0 0 0 1 0 0 0 0]\n",
" [0 0 0 0 0 1 0 0 0 0]\n",
" [0 0 0 0 0 1 0 0 0 0]\n",
" [0 0 1 0 0 0 0 0 0 0]\n",
" [0 0 1 0 0 0 0 0 0 0]\n",
" [0 0 1 0 0 0 0 0 0 0]\n",
" [0 0 1 0 0 0 0 0 0 0]\n",
" [0 0 0 1 0 0 0 0 0 0]\n",
" [0 0 0 1 0 0 0 0 0 0]\n",
" [0 0 0 1 0 0 0 0 0 0]\n",
" [0 0 0 1 0 0 0 0 0 0]\n",
" [0 0 0 0 0 0 0 1 0 0]\n",
" [0 0 0 0 0 0 0 1 0 0]\n",
" [0 0 0 0 0 0 0 1 0 0]\n",
" [0 0 0 0 0 0 0 1 0 0]\n",
" [0 1 0 0 0 0 0 0 0 0]\n",
" [0 1 0 0 0 0 0 0 0 0]\n",
" [0 1 0 0 0 0 0 0 0 0]\n",
" [0 0 0 0 0 0 0 0 0 1]\n",
" [0 0 0 0 0 0 0 0 0 1]\n",
" [0 0 0 0 0 0 0 0 0 1]]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\r",
"Loading: 100%|███████████████████████████████████████████████████████| 2225192/2225192 [00:20<00:00, 1634466.61bytes/s]"
]
}
],
"source": [ "source": [
"print(training)\n", "print(training)\n",
"print(output)" "print(output)"
@ -371,7 +863,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 15,
"metadata": { "metadata": {
"id": "MDA435sI1-Xl" "id": "MDA435sI1-Xl"
}, },
@ -392,7 +884,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 16,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -400,7 +892,17 @@
"id": "XaQJh1aG2hbj", "id": "XaQJh1aG2hbj",
"outputId": "80420df0-3a78-4583-9563-2165e968713d" "outputId": "80420df0-3a78-4583-9563-2165e968713d"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From C:\\Users\\annad\\AppData\\Roaming\\Python\\Python38\\site-packages\\tflearn\\initializations.py:164: calling TruncatedNormal.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Call initializer instance with the dtype argument instead of passing it to the constructor\n"
]
}
],
"source": [ "source": [
"tensorflow.compat.v1.reset_default_graph() #Reset na wszelki wypadek (w sumie nie wiem czy to jakaś super ważna linijka kodu)\n", "tensorflow.compat.v1.reset_default_graph() #Reset na wszelki wypadek (w sumie nie wiem czy to jakaś super ważna linijka kodu)\n",
"\n", "\n",
@ -426,7 +928,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 17,
"metadata": { "metadata": {
"colab": { "colab": {
"base_uri": "https://localhost:8080/" "base_uri": "https://localhost:8080/"
@ -434,12 +936,25 @@
"id": "REzkJL_r2hwl", "id": "REzkJL_r2hwl",
"outputId": "7ab2b0c5-944f-4e22-d478-1e35b41f87db" "outputId": "7ab2b0c5-944f-4e22-d478-1e35b41f87db"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Training Step: 5999 | total loss: \u001b[1m\u001b[32m0.02785\u001b[0m\u001b[0m | time: 0.007s\n",
"| Adam | epoch: 1000 | loss: 0.02785 - acc: 0.9753 -- iter: 40/48\n",
"Training Step: 6000 | total loss: \u001b[1m\u001b[32m0.02583\u001b[0m\u001b[0m | time: 0.008s\n",
"| Adam | epoch: 1000 | loss: 0.02583 - acc: 0.9777 -- iter: 48/48\n",
"--\n",
"INFO:tensorflow:C:\\Users\\annad\\Desktop\\System Dialogowy Janet\\model.tflearn is not in all_model_checkpoint_paths. Manually adding it.\n"
]
}
],
"source": [ "source": [
"model.fit(training, output, n_epoch=1000, batch_size=8, show_metric=True)\n", "model.fit(training, output, n_epoch=1000, batch_size=8, show_metric=True)\n",
"\n", "\n",
"#Zapis Modelu\n", "#Zapis Modelu\n",
"#model.save(\"model.tflearn\")" "model.save(\"model.tflearn\")"
] ]
}, },
{ {
@ -462,7 +977,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 18,
"metadata": { "metadata": {
"id": "1IQyV1v33lC7" "id": "1IQyV1v33lC7"
}, },
@ -492,7 +1007,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 19,
"metadata": { "metadata": {
"id": "Je6OSZ679-KL" "id": "Je6OSZ679-KL"
}, },
@ -509,7 +1024,7 @@
" result_index = np.argmax(result)\n", " result_index = np.argmax(result)\n",
" tag = labels[result_index]\n", " tag = labels[result_index]\n",
" \n", " \n",
" for tg in data_pl_short[\"intents\"]: #znalezienie poprawnego tagu do zdania\n", " for tg in data_pl[\"intents\"]: #znalezienie poprawnego tagu do zdania\n",
" if tg['tag'] == tag:\n", " if tg['tag'] == tag:\n",
" responses = tg['responses']\n", " responses = tg['responses']\n",
" \n", " \n",
@ -535,7 +1050,29 @@
"id": "VZf_aCUM-Amm", "id": "VZf_aCUM-Amm",
"outputId": "9e3fcf7b-b9b3-47b0-acb5-48214f07f363" "outputId": "9e3fcf7b-b9b3-47b0-acb5-48214f07f363"
}, },
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Możesz rozpocząć rozmowę z Botem! (type quit to stop)\n",
"Ty: elo\n",
"Cześć!\n",
"Ty: w co grasz\n",
"W OSRS\n",
"Ty: nara\n",
"Hej, w czym mogę pomóc?\n",
"Ty: narazie\n",
"Narazie!\n",
"Ty: do widzenia\n",
"Mam nadzieję, że później pogadamy\n",
"Ty: dowidzenia\n",
"Narazie!\n",
"Ty: ok\n",
"Hej, w czym mogę pomóc?\n"
]
}
],
"source": [ "source": [
"chat()" "chat()"
] ]

View File

@ -8,7 +8,10 @@
"Jesteś?", "Jesteś?",
"Hej", "Hej",
"Dzień dobry", "Dzień dobry",
"Sup" "Sup",
"Witam",
"Hejka",
"Hej!"
], ],
"responses": [ "responses": [
"Cześć!", "Cześć!",
@ -40,6 +43,8 @@
"Ile lat ma Janet", "Ile lat ma Janet",
"Wiek", "Wiek",
"Jak stara jesteś", "Jak stara jesteś",
"jaki jest twój wiek",
"Wieko",
"urodziny" "urodziny"
], ],
"responses": [ "responses": [
@ -100,7 +105,8 @@
"patterns": [ "patterns": [
"a w co grasz?", "a w co grasz?",
"a w co?", "a w co?",
"grasz?" "grasz?",
"jaka gra"
], ],
"responses": [ "responses": [
"nie interesuj się", "nie interesuj się",
@ -116,7 +122,8 @@
"patterns": [ "patterns": [
"czego?", "czego?",
"czego słuchasz?", "czego słuchasz?",
"jakiej muzyki?" "jakiej muzyki?",
"a czego?"
], ],
"responses": [ "responses": [
"Starego vinyla z 1995 roku", "Starego vinyla z 1995 roku",
@ -149,7 +156,7 @@
"responses": [ "responses": [
"...", "...",
"Nie pisz do mnie więcej", "Nie pisz do mnie więcej",
"Odezwę się latem" "Nie lubię Cię"
], ],
"context_set": "" "context_set": ""
} }