diff --git a/template_nlg.ipynb b/template_nlg.ipynb new file mode 100644 index 0000000..3b38565 --- /dev/null +++ b/template_nlg.ipynb @@ -0,0 +1,48 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import random\n", + "\n", + "\n", + "def nlg(system_act):\n", + " domain, intent, slot, value = system_act\n", + "\n", + " if intent == 'Affirm':\n", + " r = random.randint(1, 3)\n", + "\n", + " if r == 1:\n", + " return 'Tak'\n", + " elif r == 2:\n", + " return 'Zgadza się'\n", + " else:\n", + " return 'Potwierdzam'\n", + " \n", + " if intent == 'Canthelp':\n", + " r = random.randint(1, 3)\n", + "\n", + " if r == 1:\n", + " return 'Przepraszam, ale obawiam się, że nie mogę tego zrobić'\n", + " elif r == 2:\n", + " return 'Wystąpił błąd, proszę się skontaktować z obsługą'\n", + " else:\n", + " return 'ERR://23¤Y%/'\n", + " \n", + "\n", + " if domain == 'Product':\n" + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +}