From b323afbc525a3237f6889d701c5b057846716495 Mon Sep 17 00:00:00 2001 From: eugene Date: Fri, 2 Jun 2023 12:43:15 +0200 Subject: [PATCH] misc update --- DialogManager.ipynb | 62 ++++++++++-- dictionary.json | 70 +++++++------- product_db.json | 226 ++++++++++++++++++++++---------------------- 3 files changed, 201 insertions(+), 157 deletions(-) diff --git a/DialogManager.ipynb b/DialogManager.ipynb index f721ddf..3a1cc74 100644 --- a/DialogManager.ipynb +++ b/DialogManager.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 202, + "execution_count": 48, "metadata": {}, "outputs": [], "source": [ @@ -46,7 +46,7 @@ }, { "cell_type": "code", - "execution_count": 203, + "execution_count": 49, "metadata": {}, "outputs": [], "source": [ @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 204, + "execution_count": 50, "metadata": {}, "outputs": [ { @@ -92,7 +92,7 @@ " 'history': []}" ] }, - "execution_count": 204, + "execution_count": 50, "metadata": {}, "output_type": "execute_result" } @@ -105,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 223, + "execution_count": 51, "metadata": {}, "outputs": [], "source": [ @@ -161,7 +161,7 @@ }, { "cell_type": "code", - "execution_count": 224, + "execution_count": 52, "metadata": {}, "outputs": [ { @@ -171,7 +171,7 @@ " ['Recommend', 'product', 'Name', 'RedBull']]" ] }, - "execution_count": 224, + "execution_count": 52, "metadata": {}, "output_type": "execute_result" } @@ -186,7 +186,7 @@ }, { "cell_type": "code", - "execution_count": 225, + "execution_count": 53, "metadata": {}, "outputs": [ { @@ -208,7 +208,7 @@ }, { "cell_type": "code", - "execution_count": 228, + "execution_count": 54, "metadata": {}, "outputs": [ { @@ -218,7 +218,7 @@ " ['Recommend', 'product', 'Name', 'pomidor']]" ] }, - "execution_count": 228, + "execution_count": 54, "metadata": {}, "output_type": "execute_result" } @@ -226,6 +226,48 @@ "source": [ "agent.response([('inform', 'product', 'type', 'warzywo'), ('inform', 'product', 'price_range', 'tani'), ('inform', 'product', 'quality', 'exquisite')])" ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[['Inform', 'product', 'Choice', '11'],\n", + " ['Recommend', 'product', 'Name', 'Sok pomarańczowy']]" + ] + }, + "execution_count": 55, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "agent.response([('inform', 'product', 'type', 'napój'), ('inform', 'product', 'price_range', 'drogi'), ('inform', 'product', 'quality', 'exquisite')])" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[['Inform', 'product', 'Choice', '11'],\n", + " ['Recommend', 'product', 'Name', 'banan']]" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "agent.response([('inform', 'product', 'type', 'owoc'), ('inform', 'product', 'price_range', 'tani'), ('inform', 'product', 'quality', 'exquisite')])" + ] } ], "metadata": { diff --git a/dictionary.json b/dictionary.json index 9501364..3276cc7 100644 --- a/dictionary.json +++ b/dictionary.json @@ -1,36 +1,36 @@ -{ - "user_act":[ - - ], - "system_act":[ - - ], - "belief_state":{ - "payment":{ - "type":"", - "amount":"", - "loyalty_card":"" - }, - "delivery":{ - "type":"", - "address":"", - "time":"" - }, - "product":{ - "name":"", - "type":"", - "brand":"", - "price_range":"", - "price":"", - "quantity":"", - "quality":"" - } - }, - "request_state":{ - - }, - "terminated":false, - "history":[ - - ] +{ + "user_act":[ + + ], + "system_act":[ + + ], + "belief_state":{ + "payment":{ + "type":"", + "amount":"", + "loyalty_card":"" + }, + "delivery":{ + "type":"", + "address":"", + "time":"" + }, + "product":{ + "name":"", + "type":"", + "brand":"", + "price_range":"", + "price":"", + "quantity":"", + "quality":"" + } + }, + "request_state":{ + + }, + "terminated":false, + "history":[ + + ] } \ No newline at end of file diff --git a/product_db.json b/product_db.json index 87efa19..7f6a960 100644 --- a/product_db.json +++ b/product_db.json @@ -1,113 +1,115 @@ -{ - "database":{ - "product":[ - { - "name":"banan", - "type":"owoc", - "brand":"banpol", - "price":"21.37", - "quantity":"1 kg", - "quality":"premium" - }, - - { - "name":"pomarańcza", - "type":"owoc", - "brand":"pomarańpol", - "price":"24.37", - "quantity":"1 kg", - "quality":"premium" - }, - - { - "name":"pomidor", - "type":"warzywo", - "brand":"warzywpol", - "price_range":"tani", - "price":"15.37", - "quantity":"1 kg", - "quality":"exquisite" - }, - - { - "name":"papryka", - "type":"warzywo", - "brand":"warzywpol", - "price_range":"tani", - "price":"15.37", - "quantity":"1 kg", - "quality":"premium" - }, - - { - "name":"iPhone", - "type":"telefon", - "brand":"Ejpl", - "price":"420", - "quantity":"1 szt", - "quality":"premium" - }, - - { - "name":"Galaxy s23", - "type":"telefon", - "brand":"Samsung", - "price":"600", - "quantity":"1 szt", - "quality":"premium" - }, - - { - "name":"RedBull", - "type":"energol", - "brand":"RedBull", - "price":"0.69", - "quantity":"330ml", - "quality":"exquisite" - }, - - { - "name":"Tiger", - "type":"energol", - "brand":"Tiger", - "price":"0.79", - "quantity":"330ml", - "quality":"exquisite" - }, - - { - "name":"Sok pomarańczowy", - "type":"napój", - "brand":"Sokpol", - "price_range":"drogi", - "price":"4,56", - "quantity":"500ml", - "quality":"exquisite" - }, - - { - "name":"Sok jabłkowy", - "type":"napój", - "brand":"Sokpol", - "price_range":"drogi", - "price":"10,56", - "quantity":"500ml", - "quality":"exquisite" - }, - - { - "name":"Sok multiwitamina", - "type":"napój", - "brand":"Sokpol", - "price_range":"tani", - "price":"5,78", - "quantity":"500ml", - "quality":"exquisite" - } - - ] - - } -} - +{ + "database":{ + "product":[ + { + "name":"banan", + "type":"owoc", + "brand":"banpol", + "price":"21.37", + "price_range": "tani", + "quantity":"1 kg", + "quality":"exquisite" + }, + + { + "name":"pomarańcza", + "type":"owoc", + "brand":"pomarańpol", + "price":"24.37", + "price_range": "drogi", + "quantity":"1 kg", + "quality":"premium" + }, + + { + "name":"pomidor", + "type":"warzywo", + "brand":"warzywpol", + "price_range":"tani", + "price":"15.37", + "quantity":"1 kg", + "quality":"exquisite" + }, + + { + "name":"papryka", + "type":"warzywo", + "brand":"warzywpol", + "price_range":"tani", + "price":"15.37", + "quantity":"1 kg", + "quality":"premium" + }, + + { + "name":"iPhone", + "type":"telefon", + "brand":"Ejpl", + "price":"420", + "quantity":"1 szt", + "quality":"premium" + }, + + { + "name":"Galaxy s23", + "type":"telefon", + "brand":"Samsung", + "price":"600", + "quantity":"1 szt", + "quality":"premium" + }, + + { + "name":"RedBull", + "type":"energol", + "brand":"RedBull", + "price":"0.69", + "quantity":"330ml", + "quality":"exquisite" + }, + + { + "name":"Tiger", + "type":"energol", + "brand":"Tiger", + "price":"0.79", + "quantity":"330ml", + "quality":"exquisite" + }, + + { + "name":"Sok pomarańczowy", + "type":"napój", + "brand":"Sokpol", + "price_range":"drogi", + "price":"4,56", + "quantity":"500ml", + "quality":"exquisite" + }, + + { + "name":"Sok jabłkowy", + "type":"napój", + "brand":"Sokpol", + "price_range":"drogi", + "price":"10,56", + "quantity":"500ml", + "quality":"exquisite" + }, + + { + "name":"Sok multiwitamina", + "type":"napój", + "brand":"Sokpol", + "price_range":"tani", + "price":"5,78", + "quantity":"500ml", + "quality":"exquisite" + } + + ] + + } +} + \ No newline at end of file