This commit is contained in:
Anna Nowak 2021-05-16 12:04:03 +02:00
parent 2da1e8b7d9
commit 3833bbc547
2 changed files with 319 additions and 456 deletions

View File

@ -66,13 +66,31 @@
"name": "stdout",
"output_type": "stream",
"text": [
"C:\\Users\\domstr2\\l07\n"
"C:\\Users\\Ania\\Desktop\\System_Dialogowy_Janet\\l07\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"A subdirectory or file -p already exists.\n",
"Error occurred while processing: -p.\n",
"A subdirectory or file l07 already exists.\n",
"Error occurred while processing: l07.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"C:\\Users\\Ania\\Desktop\\System_Dialogowy_Janet\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"** Resuming transfer from byte position 8923190\n",
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
"\n",
@ -80,23 +98,7 @@
" 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n",
"\n",
" 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n",
" 1 8714k 1 95352 0 0 66216 0 0:02:14 0:00:01 0:02:13 93666\n",
"100 8714k 100 8714k 0 0 4211k 0 0:00:02 0:00:02 --:--:-- 5290k\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"C:\\Users\\domstr2\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"'unzip' is not recognized as an internal or external command,\n",
"operable program or batch file.\n"
"100 49 100 49 0 0 56 0 --:--:-- --:--:-- --:--:-- 742\n"
]
}
],
@ -116,14 +118,14 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: conllu in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (4.4)\n"
"Requirement already satisfied: conllu in c:\\programdata\\anaconda3\\lib\\site-packages (4.4)\n"
]
}
],
@ -136,9 +138,9 @@
"def nolabel2o(line, i):\n",
" return 'O' if line[i] == 'NoLabel' else line[i]\n",
"\n",
"with open('l07/Janet_test.conllu', encoding='utf-8') as trainfile:\n",
"with open('Janet_test.conllu', encoding='utf-8') as trainfile:\n",
" trainset = list(parse_incr(trainfile, fields=fields, field_parsers={'slot': nolabel2o}))\n",
"with open('l07/Janet_test.conllu', encoding='utf-8') as testfile:\n",
"with open('Janet_test.conllu', encoding='utf-8') as testfile:\n",
" testset = list(parse_incr(testfile, fields=fields, field_parsers={'slot': nolabel2o}))"
]
},
@ -151,14 +153,14 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: tabulate in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (0.8.9)"
"Requirement already satisfied: tabulate in c:\\programdata\\anaconda3\\lib\\site-packages (0.8.9)\n"
]
},
{
@ -174,16 +176,9 @@
"'<table>\\n<tbody>\\n<tr><td style=\"text-align: right;\">1</td><td>hej</td><td>greeting</td><td>O</td></tr>\\n</tbody>\\n</table>'"
]
},
"execution_count": 31,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n"
]
}
],
"source": [
@ -192,76 +187,6 @@
"tabulate(trainset[0], tablefmt='html')"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tbody>\n",
"<tr><td style=\"text-align: right;\">1</td><td>chcialbym</td><td>prescription/collect</td><td>O</td></tr>\n",
"<tr><td style=\"text-align: right;\">2</td><td>odebrac </td><td>prescription/collect</td><td>O</td></tr>\n",
"<tr><td style=\"text-align: right;\">3</td><td>receptę </td><td>prescription/collect</td><td>O</td></tr>\n",
"</tbody>\n",
"</table>"
],
"text/plain": [
"'<table>\\n<tbody>\\n<tr><td style=\"text-align: right;\">1</td><td>chcialbym</td><td>prescription/collect</td><td>O</td></tr>\\n<tr><td style=\"text-align: right;\">2</td><td>odebrac </td><td>prescription/collect</td><td>O</td></tr>\\n<tr><td style=\"text-align: right;\">3</td><td>receptę </td><td>prescription/collect</td><td>O</td></tr>\\n</tbody>\\n</table>'"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tabulate(trainset[10], tablefmt='html')"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table>\n",
"<tbody>\n",
"<tr><td style=\"text-align: right;\"> 1</td><td>dzień </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 2</td><td>dobry, </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 3</td><td>chciałbym </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 4</td><td>umówić </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 5</td><td>się </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 6</td><td>na </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 7</td><td>wizytę </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 8</td><td>do </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\"> 9</td><td>lekarza </td><td>appoinment/create_appointment</td><td>B-appoinment/doctor</td></tr>\n",
"<tr><td style=\"text-align: right;\">10</td><td>rodzinnego. </td><td>appoinment/create_appointment</td><td>I-appoinment/doctor</td></tr>\n",
"<tr><td style=\"text-align: right;\">11</td><td>najlepiej </td><td>appoinment/create_appointment</td><td>O </td></tr>\n",
"<tr><td style=\"text-align: right;\">12</td><td>dzisiaj </td><td>appoinment/create_appointment</td><td>B-datetime </td></tr>\n",
"<tr><td style=\"text-align: right;\">13</td><td>w </td><td>appoinment/create_appointment</td><td>I-datetime </td></tr>\n",
"<tr><td style=\"text-align: right;\">14</td><td>godzinach </td><td>appoinment/create_appointment</td><td>I-datetime </td></tr>\n",
"<tr><td style=\"text-align: right;\">15</td><td>popołudniowych.</td><td>appoinment/create_appointment</td><td>I-datetime </td></tr>\n",
"</tbody>\n",
"</table>"
],
"text/plain": [
"'<table>\\n<tbody>\\n<tr><td style=\"text-align: right;\"> 1</td><td>dzień </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 2</td><td>dobry, </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 3</td><td>chciałbym </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 4</td><td>umówić </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 5</td><td>się </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 6</td><td>na </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 7</td><td>wizytę </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 8</td><td>do </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\"> 9</td><td>lekarza </td><td>appoinment/create_appointment</td><td>B-appoinment/doctor</td></tr>\\n<tr><td style=\"text-align: right;\">10</td><td>rodzinnego. </td><td>appoinment/create_appointment</td><td>I-appoinment/doctor</td></tr>\\n<tr><td style=\"text-align: right;\">11</td><td>najlepiej </td><td>appoinment/create_appointment</td><td>O </td></tr>\\n<tr><td style=\"text-align: right;\">12</td><td>dzisiaj </td><td>appoinment/create_appointment</td><td>B-datetime </td></tr>\\n<tr><td style=\"text-align: right;\">13</td><td>w </td><td>appoinment/create_appointment</td><td>I-datetime </td></tr>\\n<tr><td style=\"text-align: right;\">14</td><td>godzinach </td><td>appoinment/create_appointment</td><td>I-datetime </td></tr>\\n<tr><td style=\"text-align: right;\">15</td><td>popołudniowych.</td><td>appoinment/create_appointment</td><td>I-datetime </td></tr>\\n</tbody>\\n</table>'"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tabulate(trainset[1], tablefmt='html')"
]
},
{
"cell_type": "markdown",
"metadata": {
@ -271,33 +196,6 @@
"Na potrzeby prezentacji procesu uczenia w jupyterowym notatniku zawęzimy zbiór danych do początkowych przykładów."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"trainset = trainset[:100]\n",
"testset = testset[:100]"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ąę\n"
]
}
],
"source": [
"print('ąę')"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -308,100 +206,91 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: flair in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (0.8.0.post1)\n",
"Requirement already satisfied: tqdm>=4.26.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (4.50.2)\n",
"Requirement already satisfied: matplotlib>=2.2.3 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (3.3.2)\n",
"Requirement already satisfied: hyperopt>=0.1.1 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.2.5)\n",
"Requirement already satisfied: ftfy in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (6.0.1)\n",
"Requirement already satisfied: konoha<5.0.0,>=4.0.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (4.6.4)\n",
"Requirement already satisfied: bpemb>=0.3.2 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.3.3)\n",
"Requirement already satisfied: janome in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.4.1)\n",
"Requirement already satisfied: scikit-learn>=0.21.3 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.23.2)\n",
"Requirement already satisfied: transformers>=4.0.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (4.5.1)\n",
"Requirement already satisfied: gdown==3.12.2 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (3.12.2)\n",
"Requirement already satisfied: tabulate in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.8.9)\n",
"Requirement already satisfied: langdetect in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (1.0.9)\n",
"Requirement already satisfied: python-dateutil>=2.6.1 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (2.8.1)\n",
"Requirement already satisfied: deprecated>=1.2.4 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (1.2.12)\n",
"Requirement already satisfied: huggingface-hub in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.0.8)\n",
"Requirement already satisfied: regex in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (2020.10.15)\n",
"Requirement already satisfied: numpy<1.20.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (1.19.2)\n",
"Requirement already satisfied: gensim<=3.8.3,>=3.4.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (3.8.3)\n",
"Requirement already satisfied: sqlitedict>=1.6.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (1.7.0)\n",
"Requirement already satisfied: lxml in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (4.6.1)\n",
"Requirement already satisfied: sentencepiece==0.1.95 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.1.95)\n",
"Requirement already satisfied: segtok>=1.5.7 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (1.5.10)\n",
"Requirement already satisfied: torch<=1.7.1,>=1.5.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (1.7.1)\n",
"Requirement already satisfied: mpld3==0.3 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from flair) (0.3)\n",
"Requirement already satisfied: pillow>=6.2.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (8.0.1)\n",
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (2.4.7)\n",
"Requirement already satisfied: cycler>=0.10 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (0.10.0)\n",
"Requirement already satisfied: certifi>=2020.06.20 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (2020.6.20)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (1.3.0)\n",
"Requirement already satisfied: six in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (1.15.0)\n",
"Requirement already satisfied: future in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (0.18.2)\n",
"Requirement already satisfied: scipy in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (1.5.2)\n",
"Requirement already satisfied: cloudpickle in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (1.6.0)\n",
"Requirement already satisfied: networkx>=2.2 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (2.5)\n",
"Requirement already satisfied: wcwidth in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from ftfy->flair) (0.2.5)\n",
"Requirement already satisfied: importlib-metadata<4.0.0,>=3.7.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from konoha<5.0.0,>=4.0.0->flair) (3.10.1)\n",
"Collecting requests<3.0.0,>=2.25.1\n",
" Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)\n",
"Requirement already satisfied: overrides<4.0.0,>=3.0.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from konoha<5.0.0,>=4.0.0->flair) (3.1.0)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from scikit-learn>=0.21.3->flair) (2.1.0)\n",
"Requirement already satisfied: joblib>=0.11 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from scikit-learn>=0.21.3->flair) (0.17.0)\n",
"Requirement already satisfied: sacremoses in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (0.0.45)\n",
"Requirement already satisfied: packaging in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (20.4)\n",
"Requirement already satisfied: filelock in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (3.0.12)\n",
"Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (0.10.2)\n",
"Requirement already satisfied: wrapt<2,>=1.10 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from deprecated>=1.2.4->flair) (1.12.1)\n",
"Requirement already satisfied: Cython==0.29.14 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from gensim<=3.8.3,>=3.4.0->flair) (0.29.14)\n",
"Requirement already satisfied: smart-open>=1.8.1 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from gensim<=3.8.3,>=3.4.0->flair) (5.0.0)\n",
"Requirement already satisfied: typing-extensions in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from torch<=1.7.1,>=1.5.0->flair) (3.7.4.3)\n",
"Requirement already satisfied: decorator>=4.3.0 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from networkx>=2.2->hyperopt>=0.1.1->flair) (4.4.2)\n",
"Requirement already satisfied: zipp>=0.5 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from importlib-metadata<4.0.0,>=3.7.0->konoha<5.0.0,>=4.0.0->flair) (3.4.0)\n",
"Requirement already satisfied: idna<3,>=2.5 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from requests<3.0.0,>=2.25.1->konoha<5.0.0,>=4.0.0->flair) (2.10)\n",
"Requirement already satisfied: chardet<5,>=3.0.2 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from requests<3.0.0,>=2.25.1->konoha<5.0.0,>=4.0.0->flair) (3.0.4)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from requests<3.0.0,>=2.25.1->konoha<5.0.0,>=4.0.0->flair) (1.25.11)\n",
"Requirement already satisfied: click in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from sacremoses->transformers>=4.0.0->flair) (7.1.2)\n",
"Installing collected packages: requests\n",
" Attempting uninstall: requests\n",
" Found existing installation: requests 2.24.0\n",
" Uninstalling requests-2.24.0:\n",
" Successfully uninstalled requests-2.24.0\n",
"Successfully installed requests-2.25.1\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.\n",
"\n",
"We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.\n",
"\n",
"conda 4.10.1 requires ruamel_yaml_conda>=0.11.14, which is not installed.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: torch in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (1.7.1)\n",
"Requirement already satisfied: typing-extensions in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from torch) (3.7.4.3)\n",
"Requirement already satisfied: numpy in c:\\users\\domstr2\\anaconda3\\lib\\site-packages (from torch) (1.19.2)\n"
"Requirement already satisfied: flair in c:\\programdata\\anaconda3\\lib\\site-packages (0.8.0.post1)\n",
"Requirement already satisfied: huggingface-hub in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.0.8)\n",
"Requirement already satisfied: mpld3==0.3 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.3)\n",
"Requirement already satisfied: langdetect in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (1.0.9)\n",
"Requirement already satisfied: hyperopt>=0.1.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.2.5)\n",
"Requirement already satisfied: tabulate in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.8.9)\n",
"Requirement already satisfied: torch<=1.7.1,>=1.5.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (1.7.1)\n",
"Requirement already satisfied: matplotlib>=2.2.3 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (3.3.2)\n",
"Requirement already satisfied: sentencepiece==0.1.95 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.1.95)\n",
"Requirement already satisfied: numpy<1.20.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (1.19.2)\n",
"Requirement already satisfied: sqlitedict>=1.6.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (1.7.0)\n",
"Requirement already satisfied: lxml in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (4.6.1)\n",
"Requirement already satisfied: python-dateutil>=2.6.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (2.8.1)\n",
"Requirement already satisfied: gensim<=3.8.3,>=3.4.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (3.8.3)\n",
"Requirement already satisfied: deprecated>=1.2.4 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (1.2.12)\n",
"Requirement already satisfied: gdown==3.12.2 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (3.12.2)\n",
"Requirement already satisfied: janome in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.4.1)\n",
"Requirement already satisfied: konoha<5.0.0,>=4.0.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (4.6.4)\n",
"Requirement already satisfied: bpemb>=0.3.2 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.3.3)\n",
"Requirement already satisfied: tqdm>=4.26.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (4.50.2)\n",
"Requirement already satisfied: segtok>=1.5.7 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (1.5.10)\n",
"Requirement already satisfied: transformers>=4.0.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (4.6.0)\n",
"Requirement already satisfied: regex in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (2020.10.15)\n",
"Requirement already satisfied: scikit-learn>=0.21.3 in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (0.23.2)\n",
"Requirement already satisfied: ftfy in c:\\programdata\\anaconda3\\lib\\site-packages (from flair) (6.0.1)\n",
"Requirement already satisfied: filelock in c:\\programdata\\anaconda3\\lib\\site-packages (from huggingface-hub->flair) (3.0.12)\n",
"Requirement already satisfied: requests in c:\\programdata\\anaconda3\\lib\\site-packages (from huggingface-hub->flair) (2.24.0)\n",
"Requirement already satisfied: six in c:\\programdata\\anaconda3\\lib\\site-packages (from langdetect->flair) (1.15.0)\n",
"Requirement already satisfied: future in c:\\programdata\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (0.18.2)\n",
"Requirement already satisfied: scipy in c:\\programdata\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (1.5.2)\n",
"Requirement already satisfied: cloudpickle in c:\\programdata\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (1.6.0)\n",
"Requirement already satisfied: networkx>=2.2 in c:\\programdata\\anaconda3\\lib\\site-packages (from hyperopt>=0.1.1->flair) (2.5)\n",
"Requirement already satisfied: typing-extensions in c:\\programdata\\anaconda3\\lib\\site-packages (from torch<=1.7.1,>=1.5.0->flair) (3.7.4.3)\n",
"Requirement already satisfied: certifi>=2020.06.20 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (2020.6.20)\n",
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (2.4.7)\n",
"Requirement already satisfied: pillow>=6.2.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (8.0.1)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (1.3.0)\n",
"Requirement already satisfied: cycler>=0.10 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib>=2.2.3->flair) (0.10.0)\n",
"Requirement already satisfied: Cython==0.29.14 in c:\\programdata\\anaconda3\\lib\\site-packages (from gensim<=3.8.3,>=3.4.0->flair) (0.29.14)\n",
"Requirement already satisfied: smart-open>=1.8.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from gensim<=3.8.3,>=3.4.0->flair) (5.0.0)\n",
"Requirement already satisfied: wrapt<2,>=1.10 in c:\\users\\ania\\appdata\\roaming\\python\\python38\\site-packages (from deprecated>=1.2.4->flair) (1.12.1)\n",
"Requirement already satisfied: importlib-metadata<4.0.0,>=3.7.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from konoha<5.0.0,>=4.0.0->flair) (3.10.1)\n",
"Requirement already satisfied: overrides<4.0.0,>=3.0.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from konoha<5.0.0,>=4.0.0->flair) (3.1.0)\n",
"Requirement already satisfied: packaging in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (20.4)\n",
"Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (0.10.2)\n",
"Requirement already satisfied: sacremoses in c:\\programdata\\anaconda3\\lib\\site-packages (from transformers>=4.0.0->flair) (0.0.45)\n",
"Requirement already satisfied: joblib>=0.11 in c:\\programdata\\anaconda3\\lib\\site-packages (from scikit-learn>=0.21.3->flair) (0.17.0)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from scikit-learn>=0.21.3->flair) (2.1.0)\n",
"Requirement already satisfied: wcwidth in c:\\programdata\\anaconda3\\lib\\site-packages (from ftfy->flair) (0.2.5)\n",
"Requirement already satisfied: idna<3,>=2.5 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->huggingface-hub->flair) (2.10)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->huggingface-hub->flair) (1.25.11)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in c:\\programdata\\anaconda3\\lib\\site-packages (from requests->huggingface-hub->flair) (3.0.4)\n",
"Requirement already satisfied: decorator>=4.3.0 in c:\\programdata\\anaconda3\\lib\\site-packages (from networkx>=2.2->hyperopt>=0.1.1->flair) (4.4.2)\n",
"Requirement already satisfied: zipp>=0.5 in c:\\programdata\\anaconda3\\lib\\site-packages (from importlib-metadata<4.0.0,>=3.7.0->konoha<5.0.0,>=4.0.0->flair) (3.4.0)\n",
"Requirement already satisfied: click in c:\\programdata\\anaconda3\\lib\\site-packages (from sacremoses->transformers>=4.0.0->flair) (7.1.2)\n"
]
}
],
"source": [
"!pip3 install flair"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: torch in c:\\programdata\\anaconda3\\lib\\site-packages (1.7.1)\n",
"Requirement already satisfied: typing-extensions in c:\\programdata\\anaconda3\\lib\\site-packages (from torch) (3.7.4.3)\n",
"Requirement already satisfied: numpy in c:\\programdata\\anaconda3\\lib\\site-packages (from torch) (1.19.2)\n"
]
}
],
"source": [
"!pip3 install flair\n",
"from flair.data import Corpus, Sentence, Token\n",
"from flair.datasets import SentenceDataset\n",
"from flair.embeddings import StackedEmbeddings\n",
@ -435,15 +324,15 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Corpus: 37 train + 4 dev + 41 test sentences\n",
"Dictionary with 13 tags: <unk>, O, B-appoinment/doctor, I-appoinment/doctor, B-datetime, I-datetime, B-login/id, B-login/password, B-appointment/type, I-appointment/type, B-prescription/type, <START>, <STOP>\n"
"Corpus: 36 train + 4 dev + 40 test sentences\n",
"Dictionary with 13 tags: <unk>, O, B-appoinment/doctor, I-appoinment/doctor, B-datetime, I-datetime, B-login/id, B-appointment/type, I-appointment/type, B-prescription/type, B-login/password, <START>, <STOP>\n"
]
}
],
@ -481,132 +370,9 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:01:27,807 https://flair.informatik.hu-berlin.de/resources/embeddings/token/pl-wiki-fasttext-300d-1M.vectors.npy not found in cache, downloading to C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpq9mlzfps\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 1199998928/1199998928 [00:52<00:00, 22832915.30B/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:20,552 copying C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpq9mlzfps to cache at C:\\Users\\domstr2\\.flair\\embeddings\\pl-wiki-fasttext-300d-1M.vectors.npy\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:32,864 removing temp file C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpq9mlzfps\n",
"2021-05-12 17:02:33,344 https://flair.informatik.hu-berlin.de/resources/embeddings/token/pl-wiki-fasttext-300d-1M not found in cache, downloading to C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpp2reld0s\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 40874795/40874795 [00:01<00:00, 21969279.66B/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:35,412 copying C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpp2reld0s to cache at C:\\Users\\domstr2\\.flair\\embeddings\\pl-wiki-fasttext-300d-1M\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:36,260 removing temp file C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpp2reld0s\n",
"2021-05-12 17:02:39,489 https://flair.informatik.hu-berlin.de/resources/embeddings/flair/lm-polish-forward-v0.2.pt not found in cache, downloading to C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpin9zi6n_\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 84244196/84244196 [00:03<00:00, 27120526.13B/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:42,804 copying C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpin9zi6n_ to cache at C:\\Users\\domstr2\\.flair\\embeddings\\lm-polish-forward-v0.2.pt\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:42,861 removing temp file C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmpin9zi6n_\n",
"2021-05-12 17:02:43,329 https://flair.informatik.hu-berlin.de/resources/embeddings/flair/lm-polish-backward-v0.2.pt not found in cache, downloading to C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmp30skh32n\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 84244196/84244196 [00:03<00:00, 25790261.34B/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:46,769 copying C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmp30skh32n to cache at C:\\Users\\domstr2\\.flair\\embeddings\\lm-polish-backward-v0.2.pt\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:02:46,828 removing temp file C:\\Users\\domstr2\\AppData\\Local\\Temp\\tmp30skh32n\n"
]
}
],
"outputs": [],
"source": [
"embedding_types = [\n",
" WordEmbeddings('pl'),\n",
@ -631,7 +397,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 8,
"metadata": {},
"outputs": [
{
@ -687,15 +453,15 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 17:07:41,538 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:41,539 Model: \"SequenceTagger(\n",
"2021-05-16 11:40:14,273 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:14,274 Model: \"SequenceTagger(\n",
" (embeddings): StackedEmbeddings(\n",
" (list_embedding_0): WordEmbeddings('pl')\n",
" (list_embedding_1): FlairEmbeddings(\n",
@ -728,53 +494,154 @@
" (weights): None\n",
" (weight_tensor) None\n",
")\"\n",
"2021-05-12 17:07:41,540 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:41,541 Corpus: \"Corpus: 37 train + 4 dev + 41 test sentences\"\n",
"2021-05-12 17:07:41,541 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:41,542 Parameters:\n",
"2021-05-12 17:07:41,542 - learning_rate: \"0.1\"\n",
"2021-05-12 17:07:41,543 - mini_batch_size: \"32\"\n",
"2021-05-12 17:07:41,543 - patience: \"3\"\n",
"2021-05-12 17:07:41,544 - anneal_factor: \"0.5\"\n",
"2021-05-12 17:07:41,544 - max_epochs: \"10\"\n",
"2021-05-12 17:07:41,545 - shuffle: \"True\"\n",
"2021-05-12 17:07:41,546 - train_with_dev: \"False\"\n",
"2021-05-12 17:07:41,546 - batch_growth_annealing: \"False\"\n",
"2021-05-12 17:07:41,547 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:41,547 Model training base path: \"slot-model\"\n",
"2021-05-12 17:07:41,548 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:41,549 Device: cpu\n",
"2021-05-12 17:07:41,549 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:41,550 Embeddings storage mode: cpu\n",
"2021-05-12 17:07:41,552 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:46,139 epoch 1 - iter 1/2 - loss 9.51263237 - samples/sec: 6.98 - lr: 0.100000\n",
"2021-05-12 17:07:47,186 epoch 1 - iter 2/2 - loss 7.22621894 - samples/sec: 30.58 - lr: 0.100000\n",
"2021-05-12 17:07:47,188 ----------------------------------------------------------------------------------------------------\n",
"2021-05-12 17:07:47,189 EPOCH 1 done: loss 7.2262 - lr 0.1000000\n",
"2021-05-12 17:07:48,466 DEV : loss 5.046579837799072 - score 0.0\n",
"2021-05-12 17:07:48,468 BAD EPOCHS (no improvement): 0\n",
"saving best model\n"
"2021-05-16 11:40:14,275 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:14,277 Corpus: \"Corpus: 36 train + 4 dev + 40 test sentences\"\n",
"2021-05-16 11:40:14,277 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:14,278 Parameters:\n",
"2021-05-16 11:40:14,279 - learning_rate: \"0.1\"\n",
"2021-05-16 11:40:14,280 - mini_batch_size: \"32\"\n",
"2021-05-16 11:40:14,280 - patience: \"3\"\n",
"2021-05-16 11:40:14,281 - anneal_factor: \"0.5\"\n",
"2021-05-16 11:40:14,282 - max_epochs: \"10\"\n",
"2021-05-16 11:40:14,283 - shuffle: \"True\"\n",
"2021-05-16 11:40:14,285 - train_with_dev: \"False\"\n",
"2021-05-16 11:40:14,286 - batch_growth_annealing: \"False\"\n",
"2021-05-16 11:40:14,287 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:14,288 Model training base path: \"slot-model\"\n",
"2021-05-16 11:40:14,288 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:14,289 Device: cpu\n",
"2021-05-16 11:40:14,290 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:14,292 Embeddings storage mode: cpu\n",
"2021-05-16 11:40:14,295 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:18,737 epoch 1 - iter 1/2 - loss 13.17695141 - samples/sec: 7.21 - lr: 0.100000\n",
"2021-05-16 11:40:19,989 epoch 1 - iter 2/2 - loss 11.51309586 - samples/sec: 25.57 - lr: 0.100000\n",
"2021-05-16 11:40:19,989 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:19,989 EPOCH 1 done: loss 11.5131 - lr 0.1000000\n",
"2021-05-16 11:40:20,670 DEV : loss 5.320306777954102 - score 0.0\n",
"2021-05-16 11:40:20,671 BAD EPOCHS (no improvement): 0\n",
"saving best model\n",
"2021-05-16 11:40:30,073 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:30,802 epoch 2 - iter 1/2 - loss 8.20096970 - samples/sec: 45.04 - lr: 0.100000\n",
"2021-05-16 11:40:31,005 epoch 2 - iter 2/2 - loss 5.87843704 - samples/sec: 157.40 - lr: 0.100000\n",
"2021-05-16 11:40:31,006 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:31,008 EPOCH 2 done: loss 5.8784 - lr 0.1000000\n",
"2021-05-16 11:40:31,020 DEV : loss 2.201185703277588 - score 0.0\n",
"2021-05-16 11:40:31,038 BAD EPOCHS (no improvement): 0\n",
"saving best model\n",
"2021-05-16 11:40:40,878 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:41,800 epoch 3 - iter 1/2 - loss 3.59802794 - samples/sec: 34.83 - lr: 0.100000\n",
"2021-05-16 11:40:42,230 epoch 3 - iter 2/2 - loss 7.24588382 - samples/sec: 74.64 - lr: 0.100000\n",
"2021-05-16 11:40:42,231 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:42,233 EPOCH 3 done: loss 7.2459 - lr 0.1000000\n",
"2021-05-16 11:40:42,290 DEV : loss 2.3815672397613525 - score 0.0\n",
"2021-05-16 11:40:42,295 BAD EPOCHS (no improvement): 1\n",
"2021-05-16 11:40:42,300 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:43,662 epoch 4 - iter 1/2 - loss 4.05115032 - samples/sec: 23.57 - lr: 0.100000\n",
"2021-05-16 11:40:44,013 epoch 4 - iter 2/2 - loss 3.16846037 - samples/sec: 91.53 - lr: 0.100000\n",
"2021-05-16 11:40:44,015 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:44,018 EPOCH 4 done: loss 3.1685 - lr 0.1000000\n",
"2021-05-16 11:40:44,072 DEV : loss 1.7660648822784424 - score 0.0\n",
"2021-05-16 11:40:44,075 BAD EPOCHS (no improvement): 0\n",
"saving best model\n",
"2021-05-16 11:40:53,620 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:54,419 epoch 5 - iter 1/2 - loss 3.52825356 - samples/sec: 40.10 - lr: 0.100000\n",
"2021-05-16 11:40:54,594 epoch 5 - iter 2/2 - loss 3.12245941 - samples/sec: 183.91 - lr: 0.100000\n",
"2021-05-16 11:40:54,595 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:54,596 EPOCH 5 done: loss 3.1225 - lr 0.1000000\n",
"2021-05-16 11:40:54,624 DEV : loss 1.8835055828094482 - score 0.0\n",
"2021-05-16 11:40:54,626 BAD EPOCHS (no improvement): 1\n",
"2021-05-16 11:40:54,627 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:55,393 epoch 6 - iter 1/2 - loss 2.84318709 - samples/sec: 41.88 - lr: 0.100000\n",
"2021-05-16 11:40:55,648 epoch 6 - iter 2/2 - loss 4.79819477 - samples/sec: 125.98 - lr: 0.100000\n",
"2021-05-16 11:40:55,649 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:55,650 EPOCH 6 done: loss 4.7982 - lr 0.1000000\n",
"2021-05-16 11:40:55,675 DEV : loss 1.9106686115264893 - score 0.0\n",
"2021-05-16 11:40:55,677 BAD EPOCHS (no improvement): 2\n",
"2021-05-16 11:40:55,678 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:56,467 epoch 7 - iter 1/2 - loss 3.35292196 - samples/sec: 40.66 - lr: 0.100000\n",
"2021-05-16 11:40:56,661 epoch 7 - iter 2/2 - loss 1.90253919 - samples/sec: 165.80 - lr: 0.100000\n",
"2021-05-16 11:40:56,662 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:40:56,663 EPOCH 7 done: loss 1.9025 - lr 0.1000000\n",
"2021-05-16 11:40:56,689 DEV : loss 1.5785303115844727 - score 0.0\n",
"2021-05-16 11:40:56,691 BAD EPOCHS (no improvement): 0\n",
"saving best model\n",
"2021-05-16 11:41:09,226 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:10,375 epoch 8 - iter 1/2 - loss 3.24992299 - samples/sec: 27.87 - lr: 0.100000\n",
"2021-05-16 11:41:10,744 epoch 8 - iter 2/2 - loss 3.30123496 - samples/sec: 87.17 - lr: 0.100000\n",
"2021-05-16 11:41:10,745 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:10,746 EPOCH 8 done: loss 3.3012 - lr 0.1000000\n",
"2021-05-16 11:41:10,798 DEV : loss 1.590420126914978 - score 0.0\n",
"2021-05-16 11:41:10,802 BAD EPOCHS (no improvement): 1\n",
"2021-05-16 11:41:10,807 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:12,175 epoch 9 - iter 1/2 - loss 2.74546242 - samples/sec: 23.41 - lr: 0.100000\n",
"2021-05-16 11:41:12,515 epoch 9 - iter 2/2 - loss 2.34704965 - samples/sec: 94.40 - lr: 0.100000\n",
"2021-05-16 11:41:12,518 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:12,520 EPOCH 9 done: loss 2.3470 - lr 0.1000000\n",
"2021-05-16 11:41:12,573 DEV : loss 1.6068150997161865 - score 0.0\n"
]
},
{
"ename": "RuntimeError",
"evalue": "[enforce fail at ..\\caffe2\\serialize\\inline_container.cc:274] . unexpected pos 64 vs 0",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mOSError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m~\\anaconda3\\lib\\site-packages\\torch\\serialization.py\u001b[0m in \u001b[0;36msave\u001b[1;34m(obj, f, pickle_module, pickle_protocol, _use_new_zipfile_serialization)\u001b[0m\n\u001b[0;32m 371\u001b[0m \u001b[1;32mwith\u001b[0m \u001b[0m_open_zipfile_writer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mopened_file\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mopened_zipfile\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 372\u001b[1;33m \u001b[0m_save\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mopened_zipfile\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_module\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_protocol\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 373\u001b[0m \u001b[1;32mreturn\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\anaconda3\\lib\\site-packages\\torch\\serialization.py\u001b[0m in \u001b[0;36m_save\u001b[1;34m(obj, zip_file, pickle_module, pickle_protocol)\u001b[0m\n\u001b[0;32m 477\u001b[0m \u001b[0mdata_value\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdata_buf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgetvalue\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 478\u001b[1;33m \u001b[0mzip_file\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwrite_record\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'data.pkl'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdata_value\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata_value\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 479\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mOSError\u001b[0m: [Errno 28] No space left on device",
"\nDuring handling of the above exception, another exception occurred:\n",
"\u001b[1;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-36-6f4b58920804>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mtrainer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mModelTrainer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mtagger\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcorpus\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m trainer.train('slot-model',\n\u001b[0m\u001b[0;32m 3\u001b[0m \u001b[0mlearning_rate\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mmini_batch_size\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m32\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mmax_epochs\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\anaconda3\\lib\\site-packages\\flair\\trainers\\trainer.py\u001b[0m in \u001b[0;36mtrain\u001b[1;34m(self, base_path, learning_rate, mini_batch_size, mini_batch_chunk_size, max_epochs, scheduler, cycle_momentum, anneal_factor, patience, initial_extra_patience, min_learning_rate, train_with_dev, train_with_test, monitor_train, monitor_test, embeddings_storage_mode, checkpoint, save_final_model, anneal_with_restarts, anneal_with_prestarts, batch_growth_annealing, shuffle, param_selection_mode, write_weights, num_workers, sampler, use_amp, amp_opt_level, eval_on_train_fraction, eval_on_train_shuffle, save_model_at_each_epoch, **kwargs)\u001b[0m\n\u001b[0;32m 592\u001b[0m ):\n\u001b[0;32m 593\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"saving best model\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 594\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmodel\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msave\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbase_path\u001b[0m \u001b[1;33m/\u001b[0m \u001b[1;34m\"best-model.pt\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 595\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 596\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0manneal_with_prestarts\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\anaconda3\\lib\\site-packages\\flair\\nn.py\u001b[0m in \u001b[0;36msave\u001b[1;34m(self, model_file)\u001b[0m\n\u001b[0;32m 70\u001b[0m \u001b[0mmodel_state\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_get_state_dict\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 71\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 72\u001b[1;33m \u001b[0mtorch\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msave\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmodel_state\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstr\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmodel_file\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_protocol\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m4\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 73\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 74\u001b[0m \u001b[1;33m@\u001b[0m\u001b[0mclassmethod\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\anaconda3\\lib\\site-packages\\torch\\serialization.py\u001b[0m in \u001b[0;36msave\u001b[1;34m(obj, f, pickle_module, pickle_protocol, _use_new_zipfile_serialization)\u001b[0m\n\u001b[0;32m 371\u001b[0m \u001b[1;32mwith\u001b[0m \u001b[0m_open_zipfile_writer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mopened_file\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mopened_zipfile\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 372\u001b[0m \u001b[0m_save\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mopened_zipfile\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_module\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_protocol\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 373\u001b[1;33m \u001b[1;32mreturn\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 374\u001b[0m \u001b[0m_legacy_save\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mopened_file\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_module\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mpickle_protocol\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 375\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m~\\anaconda3\\lib\\site-packages\\torch\\serialization.py\u001b[0m in \u001b[0;36m__exit__\u001b[1;34m(self, *args)\u001b[0m\n\u001b[0;32m 257\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 258\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0m__exit__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m->\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 259\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfile_like\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwrite_end_of_file\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 260\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbuffer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mflush\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 261\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mRuntimeError\u001b[0m: [enforce fail at ..\\caffe2\\serialize\\inline_container.cc:274] . unexpected pos 64 vs 0"
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-16 11:41:12,575 BAD EPOCHS (no improvement): 2\n",
"2021-05-16 11:41:12,577 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:13,690 epoch 10 - iter 1/2 - loss 2.63941884 - samples/sec: 28.79 - lr: 0.100000\n",
"2021-05-16 11:41:13,878 epoch 10 - iter 2/2 - loss 2.18226165 - samples/sec: 171.12 - lr: 0.100000\n",
"2021-05-16 11:41:13,879 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:13,880 EPOCH 10 done: loss 2.1823 - lr 0.1000000\n",
"2021-05-16 11:41:13,906 DEV : loss 1.458857536315918 - score 0.0\n",
"2021-05-16 11:41:13,907 BAD EPOCHS (no improvement): 0\n",
"saving best model\n",
"2021-05-16 11:41:33,558 ----------------------------------------------------------------------------------------------------\n",
"2021-05-16 11:41:33,559 Testing using best model ...\n",
"2021-05-16 11:41:33,560 loading file slot-model\\best-model.pt\n",
"2021-05-16 11:41:45,502 0.1765\t0.1667\t0.1714\n",
"2021-05-16 11:41:45,503 \n",
"Results:\n",
"- F1-score (micro) 0.1714\n",
"- F1-score (macro) 0.1161\n",
"\n",
"By class:\n",
"appoinment/doctor tp: 1 - fp: 9 - fn: 5 - precision: 0.1000 - recall: 0.1667 - f1-score: 0.1250\n",
"appointment/type tp: 0 - fp: 0 - fn: 2 - precision: 0.0000 - recall: 0.0000 - f1-score: 0.0000\n",
"datetime tp: 0 - fp: 1 - fn: 3 - precision: 0.0000 - recall: 0.0000 - f1-score: 0.0000\n",
"login/id tp: 2 - fp: 2 - fn: 1 - precision: 0.5000 - recall: 0.6667 - f1-score: 0.5714\n",
"login/password tp: 0 - fp: 0 - fn: 3 - precision: 0.0000 - recall: 0.0000 - f1-score: 0.0000\n",
"prescription/type tp: 0 - fp: 2 - fn: 1 - precision: 0.0000 - recall: 0.0000 - f1-score: 0.0000\n",
"2021-05-16 11:41:45,503 ----------------------------------------------------------------------------------------------------\n"
]
},
{
"data": {
"text/plain": [
"{'test_score': 0.17142857142857143,\n",
" 'dev_score_history': [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],\n",
" 'train_loss_history': [11.51309585571289,\n",
" 5.878437042236328,\n",
" 7.245883822441101,\n",
" 3.1684603691101074,\n",
" 3.1224594116210938,\n",
" 4.798194766044617,\n",
" 1.9025391936302185,\n",
" 3.3012349605560303,\n",
" 2.347049653530121,\n",
" 2.182261645793915],\n",
" 'dev_loss_history': [5.320306777954102,\n",
" 2.201185703277588,\n",
" 2.3815672397613525,\n",
" 1.7660648822784424,\n",
" 1.8835055828094482,\n",
" 1.9106686115264893,\n",
" 1.5785303115844727,\n",
" 1.590420126914978,\n",
" 1.6068150997161865,\n",
" 1.458857536315918]}"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
@ -829,14 +696,14 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2021-05-12 16:58:59,033 loading file slot-model/final-model.pt\n"
"2021-05-16 11:41:45,529 loading file slot-model/final-model.pt\n"
]
}
],
@ -854,7 +721,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@ -875,7 +742,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 20,
"metadata": {},
"outputs": [
{
@ -883,29 +750,29 @@
"text/html": [
"<table>\n",
"<tbody>\n",
"<tr><td>doktor </td><td>O</td></tr>\n",
"<tr><td>lekarz </td><td>O</td></tr>\n",
"<tr><td>wizyta </td><td>O</td></tr>\n",
"<tr><td>kolano </td><td>O</td></tr>\n",
"<tr><td>na </td><td>O</td></tr>\n",
"<tr><td>godzine</td><td>O</td></tr>\n",
"<tr><td>jutro </td><td>O</td></tr>\n",
"<tr><td>dzisiaj</td><td>O</td></tr>\n",
"<tr><td>13:00 </td><td>O</td></tr>\n",
"<tr><td>doktor </td><td>I-appoinment/doctor</td></tr>\n",
"<tr><td>lekarza </td><td>B-appoinment/doctor</td></tr>\n",
"<tr><td>rodzinnego </td><td>O </td></tr>\n",
"<tr><td>najlepiej </td><td>O </td></tr>\n",
"<tr><td>dzisiaj </td><td>O </td></tr>\n",
"<tr><td>w </td><td>O </td></tr>\n",
"<tr><td>godzinach </td><td>O </td></tr>\n",
"<tr><td>popołudniowych</td><td>O </td></tr>\n",
"<tr><td>dziś </td><td>O </td></tr>\n",
"</tbody>\n",
"</table>"
],
"text/plain": [
"'<table>\\n<tbody>\\n<tr><td>doktor </td><td>O</td></tr>\\n<tr><td>lekarz </td><td>O</td></tr>\\n<tr><td>wizyta </td><td>O</td></tr>\\n<tr><td>kolano </td><td>O</td></tr>\\n<tr><td>na </td><td>O</td></tr>\\n<tr><td>godzine</td><td>O</td></tr>\\n<tr><td>jutro </td><td>O</td></tr>\\n<tr><td>dzisiaj</td><td>O</td></tr>\\n<tr><td>13:00 </td><td>O</td></tr>\\n</tbody>\\n</table>'"
"'<table>\\n<tbody>\\n<tr><td>doktor </td><td>I-appoinment/doctor</td></tr>\\n<tr><td>lekarza </td><td>B-appoinment/doctor</td></tr>\\n<tr><td>rodzinnego </td><td>O </td></tr>\\n<tr><td>najlepiej </td><td>O </td></tr>\\n<tr><td>dzisiaj </td><td>O </td></tr>\\n<tr><td>w </td><td>O </td></tr>\\n<tr><td>godzinach </td><td>O </td></tr>\\n<tr><td>popołudniowych</td><td>O </td></tr>\\n<tr><td>dziś </td><td>O </td></tr>\\n</tbody>\\n</table>'"
]
},
"execution_count": 23,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tabulate(predict(model, 'doktor lekarz wizyta kolano na godzine jutro dzisiaj 13:00'.split()), tablefmt='html')"
"tabulate(predict(model, 'doktor lekarza rodzinnego najlepiej dzisiaj w godzinach popołudniowych dziś '.split()), tablefmt='html')"
]
},
{
@ -920,6 +787,13 @@
" 4. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, Attention is All you Need, NIPS 2017, pp. 5998-6008, https://arxiv.org/abs/1706.03762\n",
" 5. Alan Akbik, Duncan Blythe, Roland Vollgraf, Contextual String Embeddings for Sequence Labeling, Proceedings of the 27th International Conference on Computational Linguistics, pp. 16381649, https://www.aclweb.org/anthology/C18-1139.pdf\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {

View File

@ -3,11 +3,11 @@
# slots:
1 hej greeting NoLabel
# text: Dzień dobry, chciałbym umówić się na wizytę do lekarza rodzinnego. Najlepiej dzisiaj w godzinach popołudniowych.
# text: Dzień dobry chciałbym umówić się na wizytę do lekarza rodzinnego Najlepiej dzisiaj w godzinach popołudniowych
# intent: appoinment/create_appointment
# slots:
1 dzień appoinment/create_appointment NoLabel
2 dobry, appoinment/create_appointment NoLabel
2 dobry appoinment/create_appointment NoLabel
3 chciałbym appoinment/create_appointment NoLabel
4 umówić appoinment/create_appointment NoLabel
5 się appoinment/create_appointment NoLabel
@ -15,12 +15,12 @@
7 wizytę appoinment/create_appointment NoLabel
8 do appoinment/create_appointment NoLabel
9 lekarza appoinment/create_appointment B-appoinment/doctor
10 rodzinnego. appoinment/create_appointment I-appoinment/doctor
10 rodzinnego appoinment/create_appointment I-appoinment/doctor
11 najlepiej appoinment/create_appointment NoLabel
12 dzisiaj appoinment/create_appointment B-datetime
13 w appoinment/create_appointment I-datetime
14 godzinach appoinment/create_appointment I-datetime
15 popołudniowych. appoinment/create_appointment I-datetime
15 popołudniowych appoinment/create_appointment I-datetime
# text: 12345678AFD
# intent: login/enter_id
@ -52,16 +52,16 @@
1 ten appoinment/confirm NoLabel
2 termin appoinment/confirm NoLabel
3 mi appoinment/confirm NoLabel
4 odpowiada! appoinment/confirm NoLabel
4 odpowiada appoinment/confirm NoLabel
# text: Tak, bardzo dziękuję.
# text: Tak bardzo dziękuję
# intent: affirm
# slots:
1 tak, affirm NoLabel
1 tak affirm NoLabel
2 bardzo affirm NoLabel
3 dziękuję. affirm NoLabel
3 dziękuję affirm NoLabel
# text: Chciałbym też od razu zrobić badania morfologii krwi. Kiedy mogę przyjść na pobranie krwi?
# text: Chciałbym też od razu zrobić badania morfologii krwi Kiedy mogę przyjść na pobranie krwi?
# intent: appoinment/create_appointment request_information/opening_hours
# slots:
1 chciałbym appoinment/create_appointment NoLabel
@ -71,26 +71,26 @@
5 zrobić appoinment/create_appointment NoLabel
6 badania appoinment/create_appointment B-appointment/type
7 morfologii appoinment/create_appointment I-appointment/type
8 krwi. appoinment/create_appointment I-appointment/type
8 krwi appoinment/create_appointment I-appointment/type
9 kiedy request_information/opening_hours NoLabel
10 mogę request_information/opening_hours NoLabel
11 przyjść request_information/opening_hours NoLabel
12 na request_information/opening_hours NoLabel
13 pobranie request_information/opening_hours B-appointment/type
14 krwi? request_information/opening_hours I-appointment/type
14 krwi request_information/opening_hours I-appointment/type
# text: Dziękuję bardzo za informację. W takim przypadku to wszystko.
# text: Dziękuję bardzo za informację W takim przypadku to wszystko
# intent: end_conversation
# slots:
1 dziękuję end_conversation NoLabel
2 bardzo end_conversation NoLabel
3 za end_conversation NoLabel
4 informację. end_conversation NoLabel
4 informację end_conversation NoLabel
5 w end_conversation NoLabel
6 takim end_conversation NoLabel
7 przypadku end_conversation NoLabel
8 to end_conversation NoLabel
9 wszystko. end_conversation NoLabel
9 wszystko end_conversation NoLabel
# text: Dzień dobry
# intent: greeting
@ -141,10 +141,10 @@
# slots:
1 tak affirm NoLabel
# text: 12.04.2021
# text: 12042021
# intent: appoinment/set_date
# slots:
1 12.04.2021 appoinment/set_date B-datetime
1 12042021 appoinment/set_date B-datetime
# text: 13:00
# intent: appoinment/set_time
@ -176,17 +176,17 @@
# slots:
1 cześć greeting NoLabel
# text: Chciałbym się dowiedzieć, czy mam umówione jakieś wizyty.
# text: Chciałbym się dowiedzieć czy mam umówione jakieś wizyty
# intent: appoinment/check_appointments
# slots:
1 chciałbym appoinment/check_appointments NoLabel
2 się appoinment/check_appointments NoLabel
3 dowiedzieć, appoinment/check_appointments NoLabel
3 dowiedzieć appoinment/check_appointments NoLabel
4 czy appoinment/check_appointments NoLabel
5 mam appoinment/check_appointments NoLabel
6 umówione appoinment/check_appointments NoLabel
7 jakieś appoinment/check_appointments NoLabel
8 wizyty. appoinment/check_appointments NoLabel
8 wizyty appoinment/check_appointments NoLabel
# text: 34534535
# intent: login/enter_id
@ -223,7 +223,7 @@
6 państwa request_information/doctors NoLabel
7 przychodni? request_information/doctors NoLabel
# text: Chciałbym umówić wizytę do doktora Kolano.
# text: Chciałbym umówić wizytę do doktora Kolano
# intent: appoinment/create_appointment
# slots:
1 chciałbym appoinment/create_appointment NoLabel
@ -231,35 +231,34 @@
3 wizytę appoinment/create_appointment NoLabel
4 do appoinment/create_appointment NoLabel
5 doktora appoinment/create_appointment B-appoinment/doctor
6 kolano. appoinment/create_appointment I-appoinment/doctor
6 kolano appoinment/create_appointment I-appoinment/doctor
# text: Ten termin mi odpowiada.
# text: Ten termin mi odpowiada
# intent: appoinment/confirm
# slots:
1 ten appoinment/confirm NoLabel
2 termin appoinment/confirm NoLabel
3 mi appoinment/confirm NoLabel
4 odpowiada. appoinment/confirm NoLabel
4 odpowiada appoinment/confirm NoLabel
# text: tak
# intent: affirm
# slots:
1 tak affirm NoLabel
# text: Nie, to wszystko. Do widzenia.
# text: Nie to wszystko Do widzenia
# intent: end_conversation
# slots:
1 nie, end_conversation NoLabel
1 nie end_conversation NoLabel
2 to end_conversation NoLabel
3 wszystko. end_conversation NoLabel
3 wszystko end_conversation NoLabel
4 do end_conversation NoLabel
5 widzenia. end_conversation NoLabel
5 widzenia end_conversation NoLabel
# text: Cześć :)
# text: Cześć
# intent: greeting
# slots:
1 cześć greeting NoLabel
2 :) greeting NoLabel
# text: Jakie usługi medyczne są dostępne?
# intent: request_information/medical_services
@ -268,54 +267,44 @@
2 usługi request_information/medical_services NoLabel
3 medyczne request_information/medical_services NoLabel
4 są request_information/medical_services NoLabel
5 dostępne? request_information/medical_services NoLabel
5 dostępne request_information/medical_services NoLabel
# text: Chciałbym zapisać się do okulisty. Ile kosztuje wizyta?
# text: Chciałbym zapisać się do okulisty Ile kosztuje wizyta?
# intent: appoinment/create_appointment request_information/cost
# slots:
1 chciałbym appoinment/create_appointment NoLabel
2 zapisać appoinment/create_appointment NoLabel
3 się appoinment/create_appointment NoLabel
4 do appoinment/create_appointment NoLabel
5 okulisty. appoinment/create_appointment B-appoinment/doctor
5 okulisty appoinment/create_appointment B-appoinment/doctor
6 ile request_information/cost NoLabel
7 kosztuje request_information/cost NoLabel
8 wizyta? request_information/cost NoLabel
8 wizyta request_information/cost NoLabel
# text: Nie?
# intent: deny
# slots:
1 nie? deny NoLabel
# text: Nie, ten jest idealny.
# text: Nie ten jest idealny
# intent: affirm
# slots:
1 nie, affirm NoLabel
1 nie affirm NoLabel
2 ten affirm NoLabel
3 jest affirm NoLabel
4 idealny. affirm NoLabel
4 idealny affirm NoLabel
# text: Tak.
# text: Tak
# intent: affirm
# slots:
1 tak. affirm NoLabel
1 tak affirm NoLabel
# text: Dziękuję za informację : ).
# text: Dziękuję za informację
# intent: end_conversation
# slots:
1 dziękuję end_conversation NoLabel
2 za end_conversation NoLabel
3 informację end_conversation NoLabel
4 : end_conversation NoLabel
5 ). end_conversation NoLabel
# text: Nie, dziękuję - to wszystko : ).
# text: Nie dziękuję to wszystko
# intent: end_conversation
# slots:
1 nie, end_conversation NoLabel
1 nie end_conversation NoLabel
2 dziękuję end_conversation NoLabel
3 - end_conversation NoLabel
4 to end_conversation NoLabel
5 wszystko end_conversation NoLabel
6 : end_conversation NoLabel
7 ). end_conversation NoLabel
5 wszystko end_conversation NoLabel