75 lines
3.5 KiB
Plaintext
75 lines
3.5 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"id": "978f5cd3-eb2e-45c4-ace8-f105ccd4cb74",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"ename": "ModuleNotFoundError",
|
||
|
"evalue": "No module named 'jsgf'",
|
||
|
"output_type": "error",
|
||
|
"traceback": [
|
||
|
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
|
||
|
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
|
||
|
"\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_12388/3924194050.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mmodules\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mDST\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mDst\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[0mmodules\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mAJN\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mAjn\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
|
||
|
"\u001b[1;32mD:\\Adi\\Szkoła\\Semestr 8\\Systemy dialogowe\\Projekt\\SystemyDialogowe\\modules\\AJN.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mjsgf\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mos\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mlistdir\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mos\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpath\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0misfile\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mjoin\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[0mmypath\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m\"./grammar/\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
|
||
|
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'jsgf'"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"from modules.DST import Dst\n",
|
||
|
"from modules.AJN import Ajn\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"if __name__ == \"__main__\":\n",
|
||
|
" nlg = nlg.Nlg()\n",
|
||
|
" nlu = nlu.Nlu()\n",
|
||
|
" dst = dst.Dst()\n",
|
||
|
"\n",
|
||
|
" next_question = dst.get_next_question()\n",
|
||
|
" while (next_question):\n",
|
||
|
" print(next_question)\n",
|
||
|
" response = input()\n",
|
||
|
" res_tokenized = nlu.tokenize(response)\n",
|
||
|
" dst.save_answer(res_tokenized['slots'])\n",
|
||
|
" next_question = dst.get_next_question()\n",
|
||
|
"\n",
|
||
|
" print(dst.checklist)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "bec70f0e-c4e9-488e-8748-6d976a67beae",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3 (ipykernel)",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.9.7"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|