diff --git a/.gitignore b/.gitignore index 6736c07c57e..6589b094f9f 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,10 @@ tokens.dat graph.png graph.html debug.md +examples/restaurantbot/models* +examples/moodbot/*.png +examples/moodbot/errors.json +examples/formbot/models* examples/concertbot/data* examples/concertbot/models* examples/moodbot/models* diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1b8df63f3bb..07c609b4eb7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,6 +41,17 @@ Added - environment variables specified with ``${env_variable}`` in a yaml configuration file are now replaced with the value of the environment variable - detailed documentation on how to deploy Rasa with Docker +- add ``FormPolicy`` to handle form action prediction +- add ``ActionExecutionRejection`` exception and ``ActionExecutionRejected`` event +- add default action ``ActionDeactivateForm()`` +- add ``formbot`` example +- add ability to turn off auto slot filling with entity for each slot in domain.yml +- add ``InvalidDomain`` exception +- add ``active_form_...`` to state dictionary +- add ``active_form`` and ``latest_action_name`` properties to ``DialogueStateTracker`` +- add ``Form`` and ``FormValidation`` events +- add ``REQUESTED_SLOT`` constant +- add ability to read ``action_listen`` from stories Changed ------- @@ -50,7 +61,10 @@ Changed - the core container does not load the nlu model by default anymore. Instead it can be connected to a nlu server. - stories are now visualized as ``.html`` page instead of an image - +- move and deduplicate restaurantbot nlu data from ``franken_data.json`` to ``nlu_data.md`` +- forms were completely reworked, see changelog in ``rasa_core_sdk`` +- state featurization if some form is active changed +- ``Domain`` raises ``InvalidDomain`` exception Removed ------- diff --git a/data/test_domains/form.yml b/data/test_domains/form.yml new file mode 100644 index 00000000000..5237c029210 --- /dev/null +++ b/data/test_domains/form.yml @@ -0,0 +1,35 @@ +intents: + - greet + - default + - goodbye + - start_form + - stop + - affirm + - deny + - inform + +slots: + cuisine: + type: text + location: + type: text + +entities: + - name + +templates: + utter_greet: + - hey there! + utter_goodbye: + - goodbye :( + utter_default: + - default message + +actions: + - utter_default + - utter_greet + - utter_goodbye + - utter_ask_continue + +forms: + - some_form \ No newline at end of file diff --git a/data/test_stories/stories_form.md b/data/test_stories/stories_form.md new file mode 100644 index 00000000000..a468677d849 --- /dev/null +++ b/data/test_stories/stories_form.md @@ -0,0 +1,61 @@ +## simple_story_with_multiple_turns +* greet + - utter_greet +* default + - utter_default +* goodbye + - utter_goodbye + +## simple_story_with_form_happy +* greet + - utter_greet +* start_form + - some_form + - form{"name": "some_form"} +* form: inform + - form: some_form + - form{"name": null} +* default + - utter_default +* goodbye + - utter_goodbye + +## simple_story_with_form_unhappy +* greet + - utter_greet +* start_form + - some_form + - form{"name": "some_form"} +* default + - utter_default + - some_form + - form{"name": null} +* goodbye + - utter_goodbye + +## simple_story_with_form_stop_continue +* greet + - utter_greet +* start_form + - some_form + - form{"name": "some_form"} +* stop + - utter_ask_continue +* affirm + - some_form + - form{"name": null} +* goodbye + - utter_goodbye + +## simple_story_with_form_stop_deactivate +* greet + - utter_greet +* start_form + - some_form + - form{"name": "some_form"} +* stop + - utter_ask_continue +* deny + - action_deactivate_form + - form{"name": null} + - utter_goodbye \ No newline at end of file diff --git a/data/test_trackers/tracker_moodbot.json b/data/test_trackers/tracker_moodbot.json index 6c8d6eb8a67..939c417d6bc 100644 --- a/data/test_trackers/tracker_moodbot.json +++ b/data/test_trackers/tracker_moodbot.json @@ -22,6 +22,8 @@ ] }, "sender_id": "mysender", + "latest_action_name": "action_listen", + "active_form": {}, "paused": false, "latest_event_time": 1517821726.211042, "followup_action": null, diff --git a/docs/api/featurizer.rst b/docs/api/featurizer.rst index 5f302f3eaa9..524bc651bb7 100644 --- a/docs/api/featurizer.rst +++ b/docs/api/featurizer.rst @@ -68,8 +68,9 @@ of the tracker has a couple steps: If the domain defines the possible ``actions``, ``[ActionGreet, ActionGoodbye]``, - two additional default actions are added: - ``[ActionListen, ActionRestart]``. + ``4`` additional default actions are added: + ``[ActionListen(), ActionRestart(), + ActionDefaultFallback(), ActionDeactivateForm()]``. Therefore, label ``0`` indicates default action listen, label ``1`` default restart, label ``2`` a greeting and ``3`` indicates goodbye. diff --git a/docs/api/slots_api.rst b/docs/api/slots_api.rst index 7b92dc05779..336177a9dcb 100644 --- a/docs/api/slots_api.rst +++ b/docs/api/slots_api.rst @@ -99,6 +99,8 @@ List Slot set value, the feature will be ``0``. The **length of the list stored in the slot does not influence the dialogue**. +Unfeaturized Slot +----------------- .. option:: unfeaturized diff --git a/docs/interactive_learning.rst b/docs/interactive_learning.rst index 2954479af57..7eb4721730d 100644 --- a/docs/interactive_learning.rst +++ b/docs/interactive_learning.rst @@ -6,21 +6,21 @@ Interactive Learning ==================== -Interactive learning means giving feedback to your bot while you talk -to it. It is a powerful tool! Interactive learning is a powerful way +In interactive learning mode, you provide feedback to your bot while you talk +to it. This is a powerful way to explore what your bot can do, and the easiest way to fix any mistakes -it makes. One advantage of machine learning based dialogue is that when +it makes. One advantage of machine learning-based dialogue is that when your bot doesn't know how to do something yet, you can just teach it! -Some people are calling this `Software 2.0 `_. +Some people call this `Software 2.0 `_. Load up an existing bot ^^^^^^^^^^^^^^^^^^^^^^^ -We have a basic working bot, and want to teach it by providing -feedback on mistakes it makes. +We have created some initial stories, and now want to improve our bot +by providing feedback on mistakes it makes. -Run the following to start interactive learning: +Run the following command to start interactive learning: .. code-block:: bash @@ -29,15 +29,15 @@ Run the following to start interactive learning: python -m rasa_core.train \ --interactive -o models/dialogue \ -d domain.yml -s stories.md \ - --endpoints endpoints.yml - -To include an existing model to identify intents use --nlu models/current/nlu in the above command. Else interactive learning will use a default REGEX to intentify default intents from the user input text. + --nlu models/current/nlu \ + --endpoints endpoints.yml The first command starts the action server (see :ref:`customactions`). The second command starts the bot in interactive mode. -In interactive mode, the bot will ask you to confirm it has chosen -the right action before proceeding: +In interactive mode, the bot will ask you to confirm every prediction +made by NLU and Core before proceeding. +Here's an example: .. code-block:: text @@ -62,12 +62,15 @@ the right action before proceeding: ? The bot wants to run 'utter_greet', correct? (Y/n) -This gives you all the info you should hopefully need to decide -what the bot *should* have done. In this case, the bot chose the +The chat history and slot values are printed to the screen, which +should be all the information your need to decide what the correct +next action is. + +In this case, the bot chose the right action (``utter_greet``), so we type ``y``. -Then we type ``y`` again, because 'action_listen' is the correct -action after greeting. We continue this loop until the bot chooses -the wrong action. +Then we type ``y`` again, because ``action_listen`` is the correct +action after greeting. We continue this loop, chatting with the bot, +until the bot chooses the wrong action. Providing feedback on errors ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -135,26 +138,131 @@ reviews!) so we select that action. Now we can keep talking to the bot for as long as we like to create a longer conversation. At any point you can press ``Ctrl-C`` and the bot will -provide you with exit options, e.g. writing the created conversations as -stories to a file. Make sure to combine the dumped story with your original -training data for the next training. +provide you with exit options. You can write your newly-created stories and NLU +data to files. You can also go back a step if you made a mistake when providing +feedback. +Make sure to combine the dumped stories and NLU examples with your original +training data for the next training. Visualization of conversations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ During the interactive learning, Core will plot the current conversation -and close surrounding conversations from the training data to help you +and a few similar conversations from the training data to help you keep track of where you are. You can view the visualization at http://localhost:5005/visualization.html -as soon as you have started the interactive learning. +as soon as you've started interactive learning. To skip the visualization, pass ``--skip_visualization`` to the training script. .. image:: _static/images/interactive_learning_graph.gif -.. include:: feedback.inc +.. _section_interactive_learning_forms: + +Interactive Learning with Forms +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you're using a FormAction, there are some additional things to keep in mind +when using interactive learning. + +The ``form:`` prefix +~~~~~~~~~~~~~~~~~~~~ + +The form logic is described by your ``FormAction`` class, and not by the stories. +The machine learning policies should not have to learn this behavior, and should +not get confused if you later change your form action, for example by adding or +removing a required slot. +When you user interactive learning to generate stories containing a form, +the conversation steps handled by the form +get a :code:`form:` prefix. This tells Rasa Core to ignore these steps when training +your other policies. There is nothing special you have to do here, all of the form's +happy paths are still covered by the basic story given in :ref:`section_form_basics`. + +Here is an example: + +.. code-block:: story + + * request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + - slot{"requested_slot": "cuisine"} + * form: inform{"cuisine": "mexican"} + - slot{"cuisine": "mexican"} + - form: restaurant_form + - slot{"cuisine": "mexican"} + - slot{"requested_slot": "num_people"} + * form: inform{"number": "2"} + - form: restaurant_form + - slot{"num_people": "2"} + - form{"name": null} + - slot{"requested_slot": null} + - utter_slots_values + + +Input validation +~~~~~~~~~~~~~~~~ + +Every time the user responds with something *other* than the requested slot or +any of the required slots, +you will be asked whether you want the form action to try and extract a slot +from the user's message when returning to the form. This is best explained with +and example: + +.. code-block:: text + + 7 restaurant_form 1.00 + slot{"num_people": "3"} + slot{"requested_slot": "outdoor_seating"} + do you want to sit outside? + action_listen 1.00 + ───────────────────────────────────────────────────────────────────────────────────── + 8 /stop + intent: stop 1.00 + ───────────────────────────────────────────────────────────────────────────────────── + 9 utter_ask_continue 1.00 + do you want to continue? + action_listen 1.00 + ───────────────────────────────────────────────────────────────────────────────────── + 10 /affirm + intent: affirm 1.00 + Current slots: + cuisine: greek, feedback: None, num_people: 3, outdoor_seating: None, + preferences: None, requested_slot: outdoor_seating + + ------ + 2018-11-05 21:36:53 DEBUG rasa_core.tracker_store - Recreating tracker for id 'default' + ? The bot wants to run 'restaurant_form', correct? Yes + 2018-11-05 21:37:08 DEBUG rasa_core.tracker_store - Recreating tracker for id 'default' + ? Should 'restaurant_form' validate user input to fill the slot 'outdoor_seating'? (Y/n) + +Here the user asked to stop the form, and the bot asks the user whether they're sure +they don't want to continue. The user says they want to continue (the ``/affirm`` intent). +Here ``outdoor_seating`` has a ``from_intent`` slot mapping (mapping +the ``/affirm`` intent to ``True``), so this user input could be used to fill +that slot. However, in this case the user is just responding to the +"do you want to continue?" question and so you select ``n``, the user input +should not be validated. The bot will then continue to ask for the +``outdoor_seating`` slot again. + +.. warning:: + + If there is a conflicting story in your training data, i.e. you just chose + to validate the input (meaning it will be printed with the ``forms:`` prefix), + but your stories file contains the same story where you don't validate + the input (meaning it's without the ``forms:`` prefix), you will need to make + sure to remove this conflicting story. When this happens, there is a warning + prompt that reminds you to do this: + + **WARNING: FormPolicy predicted no form validation based on previous training + stories. Make sure to remove contradictory stories from training data** + + Once you've removed that story, you can press enter and continue with + interactive learning + + +.. include:: feedback.inc diff --git a/docs/migrations.rst b/docs/migrations.rst index d5bfcccf5ec..eedaeb7d740 100644 --- a/docs/migrations.rst +++ b/docs/migrations.rst @@ -7,6 +7,37 @@ Migration Guide This page contains information about changes between major versions and how you can migrate from one version to another. +.. _migration-to-0-12-0: + +0.11.x to 0.12.0 +---------------- + +.. warning:: + + This is major new version with a lot of changes under the hood as well + as on the API level. Please take a careful look at the mentioned + before updating. Please make sure to + **retrain your models when switching to this version**. + +Forms +~~~~~ + +- Forms were completely reworked, please follow :ref:`slotfilling` + for instructions how to use them. +- ``FormField`` class and its subclasses were removed, + overwrite ``FormAction.slot_mapping()`` method to specify the mapping between + user input and requested slot in the form + utilizing helper methods ``FormAction.from_entity(...)``, + ``FormAction.from_intent(...)`` and ``FormAction.from_text(...)`` +- stories for forms need to be written differently, + it is recommended to use interactive learning to create form stories +- functionality of ``FormAction.get_other_slots(...)`` was moved to + ``FormAction.extract_other_slots(...)`` +- functionality of ``FormAction.get_requested_slot(...)`` was moved to + ``FormAction.extract_requested_slot(...)`` +- overwrite ``FormAction.validate(...)`` method to validate user input against + the slot requested by the form + .. _migration-to-0-11-0: 0.10.x to 0.11.0 diff --git a/docs/policies.rst b/docs/policies.rst index 1bf5a6d95f3..f39c2f21f4c 100644 --- a/docs/policies.rst +++ b/docs/policies.rst @@ -142,7 +142,8 @@ For example: Pass the YAML file's name to the train script using the ``--config`` argument (or just ``-c``). If no config.yaml is given, the policies -default to ``[KerasPolicy(), MemoizationPolicy(), FallbackPolicy()]``. +default to +``[KerasPolicy(), MemoizationPolicy(), FallbackPolicy(), FormPolicy()]``. .. note:: diff --git a/docs/slotfilling.rst b/docs/slotfilling.rst index 6b20262f7c0..e7caec7a034 100644 --- a/docs/slotfilling.rst +++ b/docs/slotfilling.rst @@ -3,214 +3,337 @@ Slot Filling ============ -One of the most common conversation patterns -is to collect a few pieces of information -from a user in order to do something (book a restaurant, call an API, search a database, etc.). -This is also called **slot filling**. +.. contents:: +One of the most common conversation patterns is to collect a few pieces of +information from a user in order to do something (book a restaurant, call an +API, search a database, etc.). This is also called **slot filling**. -Example: Providing the Weather ------------------------------- +If you need to collect multiple pieces of information in a row, we recommended +that you create a ``FormAction``. This is a single action which contains the +logic to loop over the required slots and ask the user for this information. +There is a full example using forms in the ``examples/formbot`` directory of +Rasa Core. +You can take a look at the FormAction base class by clicking this link: -Let's say you are building a weather bot ⛅️. If somebody asks you for the weather, you will -need to know their location. Users might say that right away, e.g. `What's the weather in Caracas?` -When they don't provide this information, you'll have to ask them for it. -We can provide two stories to Rasa Core, so that it can learn to handle both cases: +.. autoclass:: rasa_core_sdk.forms.FormAction + +.. _section_form_basics: + +Basics +------ + +Using a ``FormAction``, you can describe *all* of the happy paths with a single +story. By "happy path", we mean that whenever you ask a user for some information, +they respond with what you asked for. + +If we take the example of the restaurant bot, this single story describes all of the +happy paths. .. code-block:: story - # story1 - * ask_weather{"location": "Caracas"} - - action_weather_api + ## happy path + * request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + - form{"name": null} - # story2 - * ask_weather - - utter_ask_location - * inform{"location": "Caracas"} - - action_weather_api +The ``FormAction`` will only requests slots which haven't already been set. +If a user says +"I'd like a vegetarian Chinese restaurant for 8 people", they won't be +asked about the ``cuisine`` and ``num_people`` slots. -Here we are assuming you have defined an ``inform`` intent, which captures the cases where a user -is just providing information. +Note that for this story to work, your slots should be `unfeaturized +`_. +If they're not, you should add all the slots that have been set by the form. -But :ref:`customactions` can also set slots, and these can also influence the conversation. -For example, a location like `San Jose` could refer to multiple places, in this case, probably in -Costa Rica 🇨🇷 or California 🇺🇸 +The ``restaurant_form`` in the story above is the name of our form action. +Here is an example of what it looks like. +You need to define three methods: -Let's add a call to a location API to deal with this. -Start by defining a ``location_match`` slot: +- ``name``: the name of this action +- ``required_slots``: a list of slots that need to be filled for the ``submit`` method to work. +- ``submit``: what to do at the end of the form, when all the slots have been filled. -.. code-block:: yaml - slots: - location_match: - type: categorical - values: - - zero - - one - - multiple +.. code-block:: python + class RestaurantForm(FormAction): + """Example of a custom form action""" -And our location api action will have to use the API response to fill in this slot. -It can ``return [SlotSet("location_match", value)]``, where ``value`` is one of ``"zero"``, ``"one"``, or -``"multiple"``, depending on what the API sends back. + def name(self): + # type: () -> Text + """Unique identifier of the form""" -We then define stories for each of these cases: + return "restaurant_form" + @staticmethod + def required_slots(tracker): + # type: () -> List[Text] + """A list of required slots that the form has to fill""" -.. code-block:: story - :emphasize-lines: 12-13, 18-19, 24-25 - - # story1 - * ask_weather{"location": "Caracas"} - - action_location_api - - slot{"location_match": "one"} - - action_weather_api - - # story2 - * ask_weather - - utter_ask_location - * inform{"location": "Caracas"} - - action_location_api - - slot{"location_match": "one"} - - action_weather_api - - # story3 - * ask_weather{"location": "the Moon"} - - action_location_api - - slot{"location_match": "none"} - - utter_location_not_found - - # story4 - * ask_weather{"location": "San Jose"} - - action_location_api - - slot{"location_match": "multiple"} - - utter_ask_which_location - - -Now we've given Rasa Core a few examples of how to handle the different values -that the ``location_match`` slot can take. -Right now, we still only have four stories, which is not a lot of training data. -:ref:`interactive_learning` is a great way to explore more conversations -that aren't in your stories already. -The best way to improve your model is to test it yourself, have other people test it, -and correct the mistakes it makes. + return ["cuisine", "num_people", "outdoor_seating", + "preferences", "feedback"] + def submit(self, dispatcher, tracker, domain): + # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict] + """Define what the form has to do + after all required slots are filled""" -Debugging -~~~~~~~~~ + # utter submit template + dispatcher.utter_template('utter_submit', tracker) + return [] -The first thing to try is to run your bot with the ``debug`` flag, see :ref:`debugging` for details. -If you are just getting started, you probably only have a few hand-written stories. -This is a great starting point, but -you should give your bot to people to test **as soon as possible**. One of the guiding principles -behind Rasa Core is: -.. pull-quote:: Learning from real conversations is more important than designing hypothetical ones +Once the form action gets called for the first time, +the form gets activated and the ``FormPolicy`` jumps in. +The ``FormPolicy`` is extremely simple and just always predicts the form action. +See :ref:`section_unhappy` for how to work with unexpected user input. -So don't try to cover every possibility in your hand-written stories before giving it to testers. -Real user behavior will always surprise you! +Every time the form action gets called, it will ask the user for the next slot in +``required_slots`` which is not already set. +It does this by looking for a template called ``utter_ask_{slot_name}``, +so you need to define these in your domain file for each required slot. +Once all the slots are filled, the ``submit()`` method is called, where you can +use the information you've collected to do something for the user, for example +querying a restaurant API. +If you don't want your form to do anything at the end, just use ``return []`` +as your submit method. +After the submit method is called, the form is deactivated, +and other policies in your Core model will be used to predict the next action. -Slot Filling with a ``FormAction`` ----------------------------------- +Custom slot mappings +-------------------- -If you need to collect multiple pieces of information in a row, it is sometimes easier -to create a ``FormAction``. -This lets you have a single action that is called multiple times, rather than separate actions for each question, -e.g. ``utter_ask_cuisine``, ``utter_ask_numpeople``, in a restaurant bot. +Some slots (like ``cuisine``) can be picked up using a single entity, but a +``FormAction`` can also support yes/no questions and free-text input. +The ``slot_mapping`` method defines how to extract slot values from user responses. +Here's an example for the restaurant bot: -.. note:: - You don't *have* to use a ``FormAction`` to do slot filling! It just means you need - fewer stories to get the initial flow working. +.. code-block:: python -A form action has a set of required fields, which you define for the class: + def slot_mapping(self): + # type: () -> Dict[Text: Union[Text, Dict, List[Text, Dict]]] + """A dictionary to map required slots to + - an extracted entity + - intent: value pairs + - a whole message + or a list of them, where the first match will be picked""" + + return {"cuisine": self.from_entity(entity="cuisine", + intent="inform"), + "num_people": self.from_entity(entity="number"), + "outdoor_seating": [self.from_entity(entity="seating"), + self.from_intent(intent='affirm', + value=True), + self.from_intent(intent='deny', + value=False)], + "preferences": [self.from_text(intent='inform'), + self.from_intent(intent='deny', + value="no additional " + "preferences")], + "feedback": [self.from_entity(entity="feedback"), + self.from_text()]} + +The predefined functions work as follows: + +- ``self.from_entity(entity=entity_name, intent=intent_name)`` + will look for an entity called ``entity_name`` to fill a slot + ``slot_name`` regardless of user intent if ``intent_name`` is ``None`` + else only if the users intent is ``intent_name``. +- ``self.from_intent(intent=intent_name, value=value)`` + will fill slot ``slot_name`` with ``value`` if user intent is ``intent_name``. + To make a boolean slot, take a look at the definition of ``outdoor_seating`` + above. +- ``self.from_text(intent=intent_name)`` will use the next + user utterance to fill the text slot ``slot_name`` regardless of user intent + if ``intent_name`` is ``None`` else only if user intent is ``intent_name``. +- If you want to allow a combination of these, provide them as a list as in the + example above + + +Validating user input +--------------------- + +After extracting a slot value from user input, the form will try to validate the +value of the slot. By default, this only checks if the requested slot was extracted. +If you want to add custom validation, for example to check a value against a database, +you can do this by overwriting the ``validate()`` method. +Here is an example which checks if the extracted cuisine slot belongs to a +list of supported cuisines. .. code-block:: python - class ActionSearchRestaurants(FormAction): + @staticmethod + def cuisine_db(): + # type: () -> List[Text] + """Database of supported cuisines""" + return ["caribbean", "chinese", "french", "greek", "indian", + "italian", "mexican"] + + def validate(self, dispatcher, tracker, domain): + # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict] + """"Validate extracted requested slot else raise an error""" + slot_to_fill = tracker.get_slot(REQUESTED_SLOT) + + # extract requested slot from a user input by using `slot_mapping` + events = self.extract(dispatcher, tracker, domain) + if events is None: + # raise an error if nothing was extracted + raise ActionExecutionRejection(self.name(), + "Failed to validate slot {0} " + "with action {1}" + "".format(slot_to_fill, + self.name())) + + extracted_slots = [] + validated_events = [] + for e in events: + if e['event'] == 'slot': + # get values of extracted slots to validate them later + extracted_slots.append(e['value']) + else: + # add other events without validating them + validated_events.append(e) + + for slot in extracted_slots: + if slot_to_fill == 'cuisine': + if slot.lower() not in self.cuisine_db(): + dispatcher.utter_template('utter_wrong_cuisine', tracker) + # validation failed, set this slot to None, meaning the + user will be asked for the slot again + validated_events.append(SlotSet(slot_to_fill, None)) + else: + # validation succeeded + validated_events.append(SlotSet(slot_to_fill, slot)) + + else: + # no validation needed + validated_events.append(SlotSet(slot_to_fill, slot)) + + return validated_events + +If nothing is extracted from the user's utterance for any of the required slots, an +``ActionExecutionRejection`` error will be raised, meaning the action execution +was rejected and therefore Core will fall back onto a different policy to +predict another action. + +.. _section_unhappy: + +Handling unhappy paths +---------------------- + +Of course your users will not always respond with the information you ask of them. +Typically, users will ask questions, make chitchat, change their mind, or otherwise +stray from the happy path. The way this works with forms is that a form will raise +an ``ActionExecutionRejection`` if the user didn't provide the requested information. +You need to handle events that might cause ``ActionExecutionRejection`` errors +in your stories. For example, if you expect your users to chitchat with your bot, +you could add a story like this: + +.. code-block:: story - RANDOMIZE = False + ## chitchat + * request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + * chitchat + - utter_chitchat + - restaurant_form + - form{"name": null} + +It is **strongly** recommended that you build these stories using interactive learning. +If you write these stories by hand you will likely miss important things. +Please read :ref:`section_interactive_learning_forms` +on how to use interactive learning with forms. + +The requested_slot slot +----------------------- + +The slot ``requested_slot`` is automatically added to the domain as an +unfeaturized slot. If you want to make it featurized, you need to add it +to your domain file as a categorical slot. You might want to do this if you +want to handle your unhappy paths differently depending on what slot is +currently being asked from the user. For example, say your users respond +to one of the bot's questions with another question, like *why do you need to know that?* +The response to this ``explain`` intent depends on where we are in the story. +In the restaurant case, your stories would look something like this: - @staticmethod - def required_fields(): - return [ - EntityFormField("cuisine", "cuisine"), - EntityFormField("number", "people"), - BooleanFormField("vegetarian", "affirm", "deny") - ] +.. code-block:: story - def name(self): - return 'action_search_restaurants' + ## explain cuisine slot + * request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + - slot{"requested_slot": "cuisine"} + * explain + - utter_explain_cuisine + - restaurant_form + - slot{"cuisine": "greek"} + ( ... all other slots the form set ... ) + - form{"name": null} + + ## explain num_people slot + * request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + - slot{"requested_slot": "num_people"} + * explain + - utter_explain_num_people + - restaurant_form + - slot{"cuisine": "greek"} + ( ... all other slots the form set ... ) + - form{"name": null} + +Again, is is **strongly** recommended that you use interactive +learning to build these stories. +Please read :ref:`section_interactive_learning_forms` +on how to use interactive learning with forms. + +Handling conditional slot logic +------------------------------- + +Many forms require more logic than just requesting a list of fields. +For example, if someone requests ``greek`` as their cuisine, you may want to +ask if they are looking for somewhere with outside seating. + +You can achieve this by writing some logic into the ``required_slots()`` method, +for example: - def submit(self, dispatcher, tracker, domain): - results = RestaurantAPI().search( - tracker.get_slot("cuisine"), - tracker.get_slot("people"), - tracker.get_slot("vegetarian")) - return [SlotSet("search_results", results)] +.. code-block:: python + @staticmethod + def required_slots(tracker): + # type: () -> List[Text] + """A list of required slots that the form has to fill""" -The way this works is that every time you call this action, it will pick one of the -``REQUIRED_FIELDS`` that's still missing and ask the user for it. You can also ask a yes/no -question with a ``BooleanFormField``. + if tracker.get_slot('cuisine') == 'greek': + return ["cuisine", "num_people", "outdoor_seating", + "preferences", "feedback"] + else: + return ["cuisine", "num_people", + "preferences", "feedback"] -The form action will set a slot called ``requested_slot`` to keep track if what it has asked the user. -So a story will look something like this: +This mechanism is quite general and you can use it to build many different +kinds of logic into your forms. -.. code-block:: story +Debugging +--------- - * request_restaurant - - action_restaurant_form - - slot{"requested_slot": "people"} - * inform{"number": 3} - - action_restaurant_form - - slot{"people": 3} - - slot{"requested_slot": "cuisine"} - * inform{"cuisine": "chinese"} - - action_restaurant_form - - slot{"cuisine": "chinese"} - - slot{"requested_slot": "vegetarian"} - * deny - - action_restaurant_form - - slot{"vegetarian": false} - -Some important things to consider: - -- The ``submit()`` method is called when the action is run and all slots are filled, in this case after the ``deny`` intent. - If you are just collecting some information and don't need to make an API call at the end, your ``submit()`` method - should just ``return []``. -- Your domain needs to have a slot called ``requested_slot``. You can make this an unfeaturized slot. -- You need to define utterances for asking for each slot in your domain, e.g. ``utter_ask_{slot_name}``. -- We strongly recommend that you create these stories using interactive learning, because if you - type these by hand you will probably forget to include the lines for the ``requested_slot``. -- Any slots that are already set won't be asked for. E.g. if someone says "I'd like a vegetarian Chinese restaurant for 8 people" the ``submit`` function should get called right away. - - -Form Fields and Free-text Input -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The pre-defined ``FormField`` types are: - -- ``EntityFormField(entity_name, slot_name)``, which will - look for an entity called ``entity_name`` to fill a slot ``slot_name``. -- ``BooleanFormField(slot_name, affirm_intent, deny_intent)``, which looks for the intents ``affirm_intent`` - and ``deny_intent`` to fill a boolean slot called ``slot_name``. -- ``FreeTextFormField(slot_name)``, which will use the next user utterance to fill the text slot ``slot_name``. - -For any subclass of ``FormField``, its ``validate()`` method will be called before setting it -as a slot. By default this just checks that the value isn't ``None``, but if you want to check -the value against a DB, or check a pattern is matched, you can do so by defining your own class -like ``MyCustomFormField`` and overriding the ``validate()`` method. - -.. warning:: - - The ``FreeTextFormField`` class will just extract the user message as a value. - However, there is currently no way to write a 'wildcard' intent in Rasa Core stories as of now. - Typically your NLU model will assign this free-text input to 2-3 different intents. - It's easiest to add stories for each of these. +The first thing to try is to run your bot with the ``debug`` flag, see :ref:`debugging` for details. +If you are just getting started, you probably only have a few hand-written stories. +This is a great starting point, but +you should give your bot to people to test **as soon as possible**. One of the guiding principles +behind Rasa Core is: + +.. pull-quote:: Learning from real conversations is more important than designing hypothetical ones + +So don't try to cover every possibility in your hand-written stories before giving it to testers. +Real user behavior will always surprise you! .. include:: feedback.inc diff --git a/examples/formbot/Makefile b/examples/formbot/Makefile new file mode 100644 index 00000000000..261cb17fb2f --- /dev/null +++ b/examples/formbot/Makefile @@ -0,0 +1,34 @@ +help: + @echo " train-core" + @echo " Train a dialogue model using Rasa core." + @echo " run-core" + @echo " Spin up the core server on the command line" + @echo " run-actions" + @echo " Spin up the action server" + @echo " run" + @echo " Spin up both core and the action server" + @echo " visualize" + @echo " Show your stories as a graph" + + +train-core: + python -m rasa_core.train -s data/stories.md -d domain.yml -o models/dialogue --epochs 100 --debug + +run-core: + python -m rasa_core.run --core models/dialogue --nlu models/nlu/current --debug --endpoints endpoints.yml + +run-actions: + python -m rasa_core_sdk.endpoint --actions actions + +run: + make run-actions& + make run-core + +train-interactive: + python -m rasa_core.train --interactive -s data/stories.md -d domain.yml -o models/dialogue --debug --endpoints endpoints.yml + +visualize: + python -m rasa_core.visualize -s data/stories.md -d domain.yml -o story_graph.png + +train-nlu: + python -m rasa_nlu.train -c nlu_tensorflow.yml --fixed_model_name current --data data/nlu_data.md -o models --project nlu --verbose diff --git a/examples/formbot/actions.py b/examples/formbot/actions.py new file mode 100644 index 00000000000..f2f64343be2 --- /dev/null +++ b/examples/formbot/actions.py @@ -0,0 +1,148 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + +import typing +from typing import Dict, Text, Any, List, Union + +from rasa_core_sdk import ActionExecutionRejection +from rasa_core_sdk.forms import FormAction, REQUESTED_SLOT +from rasa_core_sdk.events import SlotSet + +if typing.TYPE_CHECKING: + from rasa_core_sdk import Tracker + from rasa_core_sdk.executor import CollectingDispatcher + + +class RestaurantForm(FormAction): + """Example of a custom form action""" + + def name(self): + # type: () -> Text + """Unique identifier of the form""" + + return "restaurant_form" + + @staticmethod + def required_slots(tracker): + # type: (Tracker) -> List[Text] + """A list of required slots that the form has to fill""" + + return ["cuisine", "num_people", "outdoor_seating", + "preferences", "feedback"] + + def slot_mappings(self): + # type: () -> Dict[Text: Union[Dict, List[Dict]]] + """A dictionary to map required slots to + - an extracted entity + - intent: value pairs + - a whole message + or a list of them, where a first match will be picked""" + + return {"cuisine": self.from_entity(entity="cuisine", + not_intent="chitchat"), + "num_people": [self.from_entity(entity="num_people", + intent=["inform", + "request_restaurant"]), + self.from_entity(entity="number")], + "outdoor_seating": [self.from_entity(entity="seating"), + self.from_intent(intent='affirm', + value=True), + self.from_intent(intent='deny', + value=False)], + "preferences": [self.from_intent(intent='deny', + value="no additional " + "preferences"), + self.from_text(not_intent="affirm")], + "feedback": [self.from_entity(entity="feedback"), + self.from_text()]} + + @staticmethod + def cuisine_db(): + # type: () -> List[Text] + """Database of supported cuisines""" + return ["caribbean", + "chinese", + "french", + "greek", + "indian", + "italian", + "mexican"] + + @staticmethod + def is_int(string): + # type: (Text) -> bool + """Check if a string is an integer""" + try: + int(string) + return True + except ValueError: + return False + + def validate(self, dispatcher, tracker, domain): + # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict] + """Validate extracted requested slot + else reject the execution of the form action + """ + # extract other slots that were not requested + # but set by corresponding entity + slot_values = self.extract_other_slots(dispatcher, tracker, domain) + + # extract requested slot + slot_to_fill = tracker.get_slot(REQUESTED_SLOT) + if slot_to_fill: + slot_values.update(self.extract_requested_slot(dispatcher, + tracker, domain)) + if not slot_values: + # reject form action execution + # if some slot was requested but nothing was extracted + # it will allow other policies to predict another action + raise ActionExecutionRejection(self.name(), + "Failed to validate slot {0} " + "with action {1}" + "".format(slot_to_fill, + self.name())) + + # we'll check when validation failed in order + # to add appropriate utterances + for slot, value in slot_values.items(): + if slot == 'cuisine': + if value.lower() not in self.cuisine_db(): + dispatcher.utter_template('utter_wrong_cuisine', tracker) + # validation failed, set slot to None + slot_values[slot] = None + + elif slot == 'num_people': + if not self.is_int(value) or int(value) <= 0: + dispatcher.utter_template('utter_wrong_num_people', + tracker) + # validation failed, set slot to None + slot_values[slot] = None + + elif slot == 'outdoor_seating': + if isinstance(value, str): + if 'out' in value: + # convert "out..." to True + slot_values[slot] = True + elif 'in' in value: + # convert "in..." to False + slot_values[slot] = False + else: + dispatcher.utter_template('utter_wrong_outdoor_seating', + tracker) + # validation failed, set slot to None + slot_values[slot] = None + + # validation succeed, set the slots values to the extracted values + return [SlotSet(slot, value) for slot, value in slot_values.items()] + + def submit(self, dispatcher, tracker, domain): + # type: (CollectingDispatcher, Tracker, Dict[Text, Any]) -> List[Dict] + """Define what the form has to do + after all required slots are filled""" + + # utter submit template + dispatcher.utter_template('utter_submit', tracker) + return [] diff --git a/examples/formbot/data/nlu_data.md b/examples/formbot/data/nlu_data.md new file mode 100644 index 00000000000..74b8a3e4d6e --- /dev/null +++ b/examples/formbot/data/nlu_data.md @@ -0,0 +1,254 @@ +## intent:request_restaurant +- im looking for a restaurant +- can i get [swedish](cuisine) food in any area +- a restaurant that serves [caribbean](cuisine) food +- id like a restaurant +- im looking for a restaurant that serves [mediterranean](cuisine) food +- can i find a restaurant that serves [chinese](cuisine) +- i am looking for any place that serves [indonesian](cuisine) food for [three](num_people:3) +- i need to find a restaurant +- uh im looking for a restaurant that serves [kosher](cuisine) food +- uh can i find a restaurant and it should serve [brazilian](cuisine) food +- im looking for a restaurant serving [italian](cuisine) food +- restaurant please +- i'd like to book a table for [two](num_people:2) with [spanish](cuisine) cuisine +- i need a table for [4](num_people) + +## intent:affirm +- yeah a cheap restaurant serving international food +- correct +- ye +- uh yes +- let's do it +- yeah +- uh yes +- um yes +- yes knocking +- that's correct +- yes yes +- right +- yea +- yes +- yes right +- yes and i dont care +- right on +- i love that + +## intent:deny +- no +- no new selection +- no thanks +- no thank you +- uh no +- breath no +- do you have something else +- no this does not work for me + +## intent:inform +- [afghan](cuisine) food +- how bout [asian oriental](cuisine) +- what about [indian](cuisine) food +- uh how about [turkish](cuisine) type of food +- um [english](cuisine) +- im looking for [tuscan](cuisine) food +- id like [moroccan](cuisine) food +- [seafood](cuisine) +- [french](cuisine) food +- serves [british](cuisine) food +- id like [canapes](cuisine) +- serving [jamaican](cuisine) food +- um what about [italian](cuisine) food +- im looking for [corsica](cuisine) food +- im looking for [world](cuisine) food +- serves [french](cuisine) food +- how about [indian](cuisine) food +- can i get [chinese](cuisine) food +- [irish](cuisine) food +- [english](cuisine) food +- [spanish](cuisine) food +- how bout one that serves [portuguese](cuisine) food and is cheap +- [german](cuisine) +- [korean](cuisine) food +- im looking for [romanian](cuisine) food +- serves [canapes](cuisine) food +- [gastropub](cuisine) +- i want [french](cuisine) food +- how about [modern european](cuisine) type of food +- it should serve [scandinavian](cuisine) food +- how [european](cuisine) +- how about [european](cuisine) food +- serves [traditional](cuisine) food +- [indonesian](cuisine) food +- [modern european](cuisine) +- serves [brazilian](cuisine) +- i would like [modern european](cuisine) food +- looking for [lebanese](cuisine) food +- [portuguese](cuisine) +- [european](cuisine) +- i want [polish](cuisine) food +- id like [thai](cuisine) +- i want to find [moroccan](cuisine) food +- [afghan](cuisine) +- [scottish](cuisine) food +- how about [vietnamese](cuisine) +- hi im looking for [mexican](cuisine) food +- how about [indian](cuisine) type of food +- [polynesian](cuisine) food +- [mexican](cuisine) +- instead could it be for [four](num_people:4) people +- any [japanese](cuisine) food +- what about [thai](cuisine) food +- how about [asian oriental](cuisine) food +- im looking for [japanese](cuisine) food +- im looking for [belgian](cuisine) food +- im looking for [turkish](cuisine) food +- serving [corsica](cuisine) food +- serving [gastro pub](cuisine:gastropub) +- is there [british](cuisine) food +- [world](cuisine) food +- im looking for something serves [japanese](cuisine) food +- id like a [greek](cuisine) +- im looking for [malaysian](cuisine) food +- i want to find [world](cuisine) food +- serves [pan asian](cuisine:asian) food +- looking for [afghan](cuisine) food +- that serves [portuguese](cuisine) food +- [asian oriental](cuisine:asian) food +- [russian](cuisine) food +- [corsica](cuisine) +- [asian oriental](cuisine:asian) +- serving [basque](cuisine) food +- how about [italian](cuisine) +- looking for [spanish](cuisine) food in the center of town +- it should serve [gastropub](cuisine) food +- [welsh](cuisine) food +- i want [vegetarian](cuisine) food +- im looking for [swedish](cuisine) food +- um how about [chinese](cuisine) food +- [world](cuisine) food +- can i have a [seafood](cuisine) please +- how about [italian](cuisine) food +- how about [korean](cuisine) +- [corsica](cuisine) food +- [scandinavian](cuisine) +- [vegetarian](cuisine) food +- what about [italian](cuisine) +- how about [portuguese](cuisine) food +- serving [french](cuisine) food +- [tuscan](cuisine) food +- how about uh [gastropub](cuisine) +- im looking for [creative](cuisine) food +- im looking for [malaysian](cuisine) food +- im looking for [unusual](cuisine) food +- [danish](cuisine) food +- how about [spanish](cuisine) food +- im looking for [vietnamese](cuisine) food +- [spanish](cuisine) +- a restaurant serving [romanian](cuisine) food +- im looking for [lebanese](cuisine) food +- [italian](cuisine) food +- a restaurant with [afghan](cuisine) food +- im looking for [traditional](cuisine) food +- uh i want [cantonese](cuisine) food +- im looking for [thai](cuisine) +- i want to seat [outside](seating) +- i want to seat [inside](seating) +- i want to seat [outdoor](seating) +- i want to seat [indoor](seating) +- let's go [inside](seating) +- [inside](seating) +- [outdoor](seating) +- my feedback is [good](feedback) +- my feedback is [great](feedback) +- it was [terrible](feedback) +- i consider it [success](feedback) +- you are [awful](feedback) + +## intent:thankyou +- um thank you good bye +- okay cool uh good bye thank you +- okay thank you good bye +- you rock +- and thats all thank you and good bye +- thank you and good bye +- sorry about my mistakes thank you good bye +- noise thank you good bye +- thank you goodbye noise +- okay thank you goodbye +- uh thank you good bye +- thank you goodbye +- thank you goodbye noise thank you goodbye +- breath thank you goodbye +- thank you +- okay thank you +- thanks goodbye +- ah thank you goodbye +- thank you noise +- thank you good bye +- breath thank you very much goodbye +- thanks +- noise thank you goodbye +- unintelligible thank you goodbye +- uh okay thank you good bye +- thank you bye +- um okay thank you good bye + +## intent:chitchat +- can you share your boss with me? +- i want to get to know your owner +- i want to know the company which designed you +- i want to know the company which generated you +- i want to know the company which invented you +- i want to know who invented you +- May I ask who invented you? +- please tell me the company who created you +- please tell me who created you +- tell me more about your creators +- tell me more about your founders +- Ahoy matey how are you? +- are you alright +- are you having a good day +- Are you ok? +- are you okay +- Do you feel good? +- how are things going +- how are things with you? +- How are things? +- how are you +- how are you doing +- how are you doing this morning +- how are you feeling +- how are you today +- How are you? +- How is the weather today? +- What's the weather like? +- How is the weather? +- What is the weather at your place? +- Do you have good weather? +- Is it raining? +- What's it like out there? +- Is it hot or cold? +- Beautiful day, isn't it? +- What's the weather forecast? +- Is it quite breezy outside? + +## intent:stop +- ok then you cant help me +- that was shit, you're not helping +- you can't help me +- you can't help me with what i need +- i guess you can't help me then +- ok i guess you can't help me +- that's not what i want +- ok, but that doesnt help me +- this is leading to nothing +- this conversation is not really helpful +- you cannot help me with what I want +- I think you cant help me +- hm i don't think you can do what i want +- stop +- stop go back +- do you get anything? +- and you call yourself bot company? pff +- and that's it? +- nothing else? \ No newline at end of file diff --git a/examples/formbot/data/stories.md b/examples/formbot/data/stories.md new file mode 100644 index 00000000000..1e0403f7422 --- /dev/null +++ b/examples/formbot/data/stories.md @@ -0,0 +1,170 @@ +## happy path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## unhappy path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* chitchat + - utter_chitchat + - restaurant_form + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## very unhappy path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* chitchat + - utter_chitchat + - restaurant_form +* chitchat + - utter_chitchat + - restaurant_form +* chitchat + - utter_chitchat + - restaurant_form + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## stop but continue path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* stop + - utter_ask_continue +* affirm + - restaurant_form + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## stop and really stop path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* stop + - utter_ask_continue +* deny + - action_deactivate_form + - form{"name": null} + +## chitchat stop but continue path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* chitchat + - utter_chitchat + - restaurant_form +* stop + - utter_ask_continue +* affirm + - restaurant_form + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## stop but continue and chitchat path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* stop + - utter_ask_continue +* affirm + - restaurant_form +* chitchat + - utter_chitchat + - restaurant_form + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## chitchat stop but continue and chitchat path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* chitchat + - utter_chitchat + - restaurant_form +* stop + - utter_ask_continue +* affirm + - restaurant_form +* chitchat + - utter_chitchat + - restaurant_form + - form{"name": null} + - utter_slots_values +* thankyou + - utter_noworries + +## chitchat, stop and really stop path +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} +* chitchat + - utter_chitchat + - restaurant_form +* stop + - utter_ask_continue +* deny + - action_deactivate_form + - form{"name": null} + +## Generated Story 3490283781720101690 (example from interactive learning, "form: " will be excluded from training) +* request_restaurant + - restaurant_form + - form{"name": "restaurant_form"} + - slot{"requested_slot": "cuisine"} +* chitchat + - utter_chitchat + - restaurant_form + - slot{"requested_slot": "cuisine"} +* form: inform{"cuisine": "mexican"} + - slot{"cuisine": "mexican"} + - form: restaurant_form + - slot{"cuisine": "mexican"} + - slot{"requested_slot": "num_people"} +* form: inform{"number": "2"} + - form: restaurant_form + - slot{"num_people": "2"} + - slot{"requested_slot": "outdoor_seating"} +* chitchat + - utter_chitchat + - restaurant_form + - slot{"requested_slot": "outdoor_seating"} +* stop + - utter_ask_continue +* affirm + - restaurant_form + - slot{"requested_slot": "outdoor_seating"} +* form: affirm + - form: restaurant_form + - slot{"outdoor_seating": true} + - slot{"requested_slot": "preferences"} +* form: inform + - form: restaurant_form + - slot{"preferences": "/inform"} + - slot{"requested_slot": "feedback"} +* form: inform{"feedback": "great"} + - slot{"feedback": "great"} + - form: restaurant_form + - slot{"feedback": "great"} + - form{"name": null} + - slot{"requested_slot": null} + - utter_slots_values +* thankyou + - utter_noworries diff --git a/examples/formbot/domain.yml b/examples/formbot/domain.yml new file mode 100644 index 00000000000..eb1bd914e97 --- /dev/null +++ b/examples/formbot/domain.yml @@ -0,0 +1,80 @@ +intents: + - request_restaurant: + use_entities: false + - chitchat: + use_entities: false + - inform + - affirm + - deny + - stop + - thankyou + +entities: + - cuisine + - num_people + - number + - feedback + - seating + +slots: + cuisine: + type: unfeaturized + auto_fill: false + num_people: + type: unfeaturized + auto_fill: false + outdoor_seating: + type: unfeaturized + auto_fill: false + preferences: + type: unfeaturized + auto_fill: false + feedback: + type: unfeaturized + auto_fill: false + requested_slot: + type: unfeaturized + +templates: + utter_ask_cuisine: + - text: "what cuisine?" + utter_ask_num_people: + - text: "how many people?" + utter_ask_outdoor_seating: + - text: "do you want to seat outside?" + utter_ask_preferences: + - text: "please provide additional preferences" + utter_ask_feedback: + - text: "please give your feedback" + utter_submit: + - text: "done!" + utter_slots_values: + - text: "got slots:\n + - cuisine: {cuisine}\n + - num_people: {num_people}\n + - outdoor_seating: {outdoor_seating}\n + - preferences: {preferences}\n + - feedback: {feedback}" + utter_noworries: + - text: "you are welcome :)" + utter_chitchat: + - text: "chitchat" + utter_ask_continue: + - text: "do you want to continue?" + utter_wrong_cuisine: + - text: "cuisine type is not in the database, please try again" + utter_wrong_num_people: + - text: "number of people should be a positive integer, please try again" + utter_wrong_outdoor_seating: + - text: "could not convert input to boolean value, please try again" + utter_default: + - text: "sorry, I didn't understand you, please try input something else" + +actions: + - utter_slots_values + - utter_noworries + - utter_chitchat + - utter_ask_continue + +forms: + - restaurant_form diff --git a/examples/formbot/endpoints.yml b/examples/formbot/endpoints.yml new file mode 100644 index 00000000000..e8d74ad61f3 --- /dev/null +++ b/examples/formbot/endpoints.yml @@ -0,0 +1,2 @@ +action_endpoint: + url: http://localhost:5055/webhook diff --git a/examples/formbot/nlu_tensorflow.yml b/examples/formbot/nlu_tensorflow.yml new file mode 100644 index 00000000000..183d2846dcc --- /dev/null +++ b/examples/formbot/nlu_tensorflow.yml @@ -0,0 +1,12 @@ +pipeline: +- name: tokenizer_whitespace +- name: ner_crf +- name: ner_synonyms +- name: intent_featurizer_count_vectors + token_pattern: (?u)\b\w+\b +- name: intent_classifier_tensorflow_embedding +- name: ner_duckling_http + url: http://localhost:8000 + dimensions: + - number +language: en diff --git a/examples/restaurantbot/bot.py b/examples/restaurantbot/bot.py index d9e8e3a83f2..815b4e3bc5d 100644 --- a/examples/restaurantbot/bot.py +++ b/examples/restaurantbot/bot.py @@ -44,7 +44,7 @@ def train_nlu(): from rasa_nlu import config from rasa_nlu.model import Trainer - training_data = load_data('data/franken_data.json') + training_data = load_data('data/nlu_data.md') trainer = Trainer(config.load("nlu_model_config.yml")) trainer.train(training_data) model_directory = trainer.persist('models/nlu/', diff --git a/examples/restaurantbot/data/franken_data.json b/examples/restaurantbot/data/franken_data.json deleted file mode 100644 index e89126d551c..00000000000 --- a/examples/restaurantbot/data/franken_data.json +++ /dev/null @@ -1,17758 +0,0 @@ -{ - "rasa_nlu_data": { - "common_examples": [ - { - "text": "moderately priced restaurant that serves creative food", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 49, - "value": "creative", - "entity": "cuisine" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about modern european", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 25, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 41, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 29, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "venetian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "venetian", - "entity": "cuisine" - } - ] - }, - { - "text": "ok what about indian", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 20, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "on the south part of town", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 12, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "oh no and cheap", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant welsh food", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 26, - "value": "welsh", - "entity": "cuisine" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "british", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "scandinavian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 12, - "value": "scandinavian", - "entity": "cuisine" - } - ] - }, - { - "text": "asian oriental", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant east part of town", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 25, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for an expensive restaurant that serves afghan food", - "intent": "inform", - "entities": [ - { - "start": 48, - "end": 54, - "value": "afghan", - "entity": "cuisine" - }, - { - "start": 15, - "end": 24, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about an expensive restaurant that serves european food", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 54, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 42, - "value": "east", - "entity": "location" - }, - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a moderately priced restaurant that serves brazilian", - "intent": "inform", - "entities": [ - { - "start": 55, - "end": 64, - "value": "brazilian", - "entity": "cuisine" - }, - { - "start": 14, - "end": 24, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how bout asian oriental", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 23, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "east noise", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "noise anything expensive", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 24, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "id like a restaurant in the north part of town that serves cross over food", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 33, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "id like a greek restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 34, - "end": 38, - "value": "east", - "entity": "location" - }, - { - "start": 10, - "end": 15, - "value": "greek", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like an expensive thai restaurant", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 25, - "value": "thai", - "entity": "cuisine" - }, - { - "start": 11, - "end": 20, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 34, - "end": 39, - "value": "north", - "entity": "location" - }, - { - "start": 10, - "end": 15, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "no im looking for pan asian", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i would like a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 55, - "value": "west", - "entity": "location" - }, - { - "start": 15, - "end": 25, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "i would like european food", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 21, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "can i get a restaurant with vegetarian food", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 38, - "value": "vegetarian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about turkish", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "scottish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "scottish", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you bye", - "intent": "thankyou" - }, - { - "text": "caribbean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "caribbean", - "entity": "cuisine" - } - ] - }, - { - "text": "modern european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 15, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "spanish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "malaysian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "malaysian", - "entity": "cuisine" - } - ] - }, - { - "text": "mediterranean", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 40, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "international food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "danish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "danish", - "entity": "cuisine" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "spanish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "asian oriental", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "yes knocking", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "brazilian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "brazilian", - "entity": "cuisine" - } - ] - }, - { - "text": "korean", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves turkish food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 47, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the east part of town", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 8, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "british food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "polish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "polish", - "entity": "cuisine" - } - ] - }, - { - "text": "how about italian", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the south part of town", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi im looking for mexican food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 25, - "value": "mexican", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant and it should be served international food", - "intent": "inform", - "entities": [ - { - "start": 63, - "end": 76, - "value": "international", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "im looking for an expensive restaurant and it should serve international food", - "intent": "inform", - "entities": [ - { - "start": 59, - "end": 72, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "system european food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 15, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a cheap restaurant and it should be in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 62, - "value": "east", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant and it should be the east part of town", - "intent": "inform", - "entities": [ - { - "start": 60, - "end": 64, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for moderately priced restaurant and it should serve halal food", - "intent": "inform", - "entities": [ - { - "start": 64, - "end": 69, - "value": "halal", - "entity": "cuisine" - }, - { - "start": 15, - "end": 25, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "asian oriental type of food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for greek food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 20, - "value": "greek", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i want to find a moderately priced restaurant and it should serve asian food", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "is there a restaurant that has british food", - "intent": "inform", - "entities": [ - { - "start": 31, - "end": 38, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "how about persian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "persian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about british type food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant and it should be in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 63, - "end": 68, - "value": "south", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant and it should serve polynesian food", - "intent": "inform", - "entities": [ - { - "start": 66, - "end": 76, - "value": "polynesian", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "no indian food", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "id like to find an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 19, - "end": 28, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "in the east part", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "corsica", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "corsica", - "entity": "cuisine" - } - ] - }, - { - "text": "uh indian", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 9, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "the east part", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 8, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 33, - "end": 37, - "value": "west", - "entity": "location" - }, - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "um english", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 10, - "value": "english", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "korean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i need a restaurant serving corsica food", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 35, - "value": "corsica", - "entity": "cuisine" - } - ] - }, - { - "text": "i need indian food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 13, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderate priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 48, - "value": "north", - "entity": "location" - }, - { - "start": 9, - "end": 17, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "lets see im looking for a restaurant in the north part of town that serves vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 44, - "end": 49, - "value": "north", - "entity": "location" - }, - { - "start": 75, - "end": 85, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "serves british food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 14, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "find moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "west", - "entity": "location" - }, - { - "start": 5, - "end": 15, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "find a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 12, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "unusual food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "unusual", - "entity": "cuisine" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "polynesian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant scottish food", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 29, - "value": "scottish", - "entity": "cuisine" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "british expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "yeah", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "moderate restaurant south part of town", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 25, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate price west part of town", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 19, - "value": "west", - "entity": "location" - }, - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant south part of town", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i am looking for a cheap restaurant and it should be in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 60, - "end": 64, - "value": "west", - "entity": "location" - }, - { - "start": 19, - "end": 24, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i would like to find a restaurant in the center and it should serve korean food", - "intent": "inform", - "entities": [ - { - "start": 68, - "end": 74, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "yes that serves korean food", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves russian food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 47, - "value": "russian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about mediterranean food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 23, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "iam looking for an expensive restaurant and it should be in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 64, - "end": 69, - "value": "south", - "entity": "location" - }, - { - "start": 19, - "end": 28, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves bistro food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 46, - "value": "bistro", - "entity": "cuisine" - } - ] - }, - { - "text": "yeah", - "intent": "affirm" - }, - { - "text": "how about turkish food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "im looking for a restaurant in any area that serves bistro food", - "intent": "inform", - "entities": [ - { - "start": 52, - "end": 58, - "value": "bistro", - "entity": "cuisine" - } - ] - }, - { - "text": "turkish type of food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "uh id like steakhouse food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 21, - "value": "steakhouse", - "entity": "cuisine" - } - ] - }, - { - "text": "uh how about turkish type of food", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "un unusual food", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 10, - "value": "unusual", - "entity": "cuisine" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "greek", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "greek", - "entity": "cuisine" - } - ] - }, - { - "text": "uh italian", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 10, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking a restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 31, - "end": 35, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "belgian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "belgian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "gastropub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "spanish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant east", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 15, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "greek food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "greek", - "entity": "cuisine" - } - ] - }, - { - "text": "indian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a moderately priced restaurant that serves canapes food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 65, - "value": "canapes", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town that serves african food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 66, - "end": 73, - "value": "african", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find an expensive restaurant that serves swedish food", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 58, - "value": "swedish", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about korean", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a restaurant in the center and it should serve lebanese food", - "intent": "inform", - "entities": [ - { - "start": 62, - "end": 70, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a restaurant south part of town", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 18, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "moderate price range please", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap european food", - "intent": "inform", - "entities": [ - { - "start": 6, - "end": 14, - "value": "european", - "entity": "cuisine" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "expensive european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "yes in the moderately priced", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "yes id like an expensive restaurant in the east part of town", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "north", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "i need a moderately priced restaurant serving fusion food", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 52, - "value": "fusion", - "entity": "cuisine" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "breath can i get a restaurant serving chinese food", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 45, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "no chinese", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "what about the west part of town", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 19, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "can i find an expensive restaurant that serves traditional food", - "intent": "inform", - "entities": [ - { - "start": 47, - "end": 58, - "value": "traditional", - "entity": "cuisine" - }, - { - "start": 14, - "end": 23, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "serving modern european food", - "intent": "inform", - "entities": [ - { - "start": 8, - "end": 23, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "can i have a seafood restaurant please", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "seafood", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a restaurant that serves lebanese food", - "intent": "inform", - "entities": [ - { - "start": 37, - "end": 45, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 51, - "value": "south", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant serving fusion food", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 60, - "value": "fusion", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "spanish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a restaurant serving world food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 41, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "how about spanish food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moroccan restaurant in the center of town", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 25, - "value": "moroccan", - "entity": "cuisine" - } - ] - }, - { - "text": "im looking for a thai restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 21, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no thai", - "intent": "deny" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "how about moderately priced thai food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 20, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a restaurant cheap north part of town", - "intent": "inform", - "entities": [ - { - "start": 19, - "end": 24, - "value": "north", - "entity": "location" - }, - { - "start": 13, - "end": 18, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 26, - "end": 30, - "value": "west", - "entity": "location" - }, - { - "start": 2, - "end": 7, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "european food any price", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant on the east part of town that serves scandinavia food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "scandinavian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 12, - "value": "scandinavian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "uh no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need cheap hungarian restaurant", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 22, - "value": "hungarian", - "entity": "cuisine" - }, - { - "start": 7, - "end": 12, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced serving gastro pub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant serving world food", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 34, - "value": "world", - "entity": "cuisine" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 26, - "end": 31, - "value": "south", - "entity": "location" - }, - { - "start": 2, - "end": 7, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant in the east", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 32, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "im looking for world food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 20, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately pri", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "catalan", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "catalan", - "entity": "cuisine" - } - ] - }, - { - "text": "spanish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "um yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "catalan", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "catalan", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "cheap jamaican", - "intent": "inform", - "entities": [ - { - "start": 6, - "end": 14, - "value": "jamaican", - "entity": "cuisine" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "i want a restaurant serving greek food", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 33, - "value": "greek", - "entity": "cuisine" - } - ] - }, - { - "text": "how about korean type food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you bye", - "intent": "thankyou" - }, - { - "text": "i want a cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 33, - "end": 38, - "value": "south", - "entity": "location" - }, - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "uh a cheap restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 33, - "value": "east", - "entity": "location" - }, - { - "start": 5, - "end": 10, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves gastropub food any price range", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 49, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thats correct gastropub food", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town that serves belgian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 66, - "end": 73, - "value": "belgian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 51, - "value": "south", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "creative food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "creative", - "entity": "cuisine" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "international food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "creative food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "creative", - "entity": "cuisine" - } - ] - }, - { - "text": "no center", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate restaurant kosher food", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 26, - "value": "kosher", - "entity": "cuisine" - }, - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant any area japanese food", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 28, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate restaurant south part of town", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 25, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you noise", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "expensive restaurant south part of town", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 26, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "fancy restaurant moroccan food", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 25, - "value": "moroccan", - "entity": "cuisine" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "a restaurant in the east part of town that serves caribbean food", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 24, - "value": "east", - "entity": "location" - }, - { - "start": 50, - "end": 59, - "value": "caribbean", - "entity": "cuisine" - } - ] - }, - { - "text": "chinese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "restaurant in the west part of town that serves airitran food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 22, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant serving indian food", - "intent": "inform", - "entities": [ - { - "start": 37, - "end": 43, - "value": "indian", - "entity": "cuisine" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "korean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no thank you good bye", - "intent": "deny" - }, - { - "text": "cheap italian food", - "intent": "inform", - "entities": [ - { - "start": 6, - "end": 13, - "value": "italian", - "entity": "cuisine" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "ah thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "christmas food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "christmas", - "entity": "cuisine" - } - ] - }, - { - "text": "asian oriental", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurants", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cuban food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cuban", - "entity": "cuisine" - } - ] - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i would like to find an expensive restaurant that serves corsica food", - "intent": "inform", - "entities": [ - { - "start": 57, - "end": 64, - "value": "corsica", - "entity": "cuisine" - }, - { - "start": 24, - "end": 33, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "uh how about north american", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 27, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 40, - "value": "west", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i would like to find a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 59, - "end": 64, - "value": "north", - "entity": "location" - }, - { - "start": 23, - "end": 33, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town serving jamaican food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - }, - { - "start": 62, - "end": 70, - "value": "jamaican", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "no chinese", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like to find a moderately priced restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 58, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 28, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "the south", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "no new selection", - "intent": "deny" - }, - { - "text": "no im looking in the south of the town", - "intent": "deny" - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town that serves traditional food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 65, - "end": 76, - "value": "traditional", - "entity": "cuisine" - } - ] - }, - { - "text": "what about indian food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 17, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a restaurant that serves world food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 45, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "what about french food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 17, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant serving romanian food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 44, - "value": "romanian", - "entity": "cuisine" - } - ] - }, - { - "text": "what about vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 21, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town that serves malaysian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - }, - { - "start": 66, - "end": 75, - "value": "malaysian", - "entity": "cuisine" - } - ] - }, - { - "text": "what about portuguese food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 21, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the center of town that serves african food", - "intent": "inform", - "entities": [ - { - "start": 62, - "end": 69, - "value": "african", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced in the west", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 29, - "value": "west", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "international food in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 26, - "end": 30, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 13, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant that serves tuscan food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 64, - "value": "tuscan", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about uh gastropub", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 22, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "okay thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i need a cheap restaurant that serves indonesian food", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 48, - "value": "indonesian", - "entity": "cuisine" - }, - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about indian", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town thats expensive", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 59, - "end": 68, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant serving malaysian food", - "intent": "inform", - "entities": [ - { - "start": 47, - "end": 56, - "value": "malaysian", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about british food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "no british food", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant south part of town", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 26, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "no south part of town", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i want a restaurant in the west part of town that serves australian food", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 31, - "value": "west", - "entity": "location" - }, - { - "start": 57, - "end": 67, - "value": "australian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about italian", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "i want vegetarian food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 17, - "value": "vegetarian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about portuguese", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 20, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "i want malaysian food in any area", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 16, - "value": "malaysian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about korean", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "i want expensive food in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 33, - "value": "east", - "entity": "location" - }, - { - "start": 7, - "end": 16, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "im looking for a restaurant in the north part of town serving indian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 62, - "end": 68, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "is there anything in the cheap price range", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 30, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "im looking for a restaurant serving asian oriental food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 50, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 46, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town serving malaysian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 62, - "end": 71, - "value": "malaysian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about asian oriental food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 24, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town serving japanese food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 61, - "end": 69, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "want something in the south side of town thats moderately priced", - "intent": "inform", - "entities": [ - { - "start": 22, - "end": 27, - "value": "south", - "entity": "location" - }, - { - "start": 47, - "end": 57, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for afghan good", - "intent": "inform", - "entities": [ - { - "start": 12, - "end": 18, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "what about french food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 17, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "looking for spanish food in the center of town", - "intent": "inform", - "entities": [ - { - "start": 12, - "end": 19, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "yes spanish restaurant", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for something moderately priced in the north side of town", - "intent": "inform", - "entities": [ - { - "start": 47, - "end": 52, - "value": "north", - "entity": "location" - }, - { - "start": 22, - "end": 32, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "okay cool uh good bye thank you", - "intent": "thankyou" - }, - { - "text": "looking for cheap barbecue food", - "intent": "inform", - "entities": [ - { - "start": 12, - "end": 17, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes barbecue food", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "expensive european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for lebanese food in the city center", - "intent": "inform", - "entities": [ - { - "start": 12, - "end": 20, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "um okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for moderately priced russian food", - "intent": "inform", - "entities": [ - { - "start": 30, - "end": 37, - "value": "russian", - "entity": "cuisine" - }, - { - "start": 12, - "end": 22, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "what about chinese food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 18, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hello im looking for an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 33, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "crossover food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "crossover", - "entity": "cuisine" - } - ] - }, - { - "text": "how about modern european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 25, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "i would like modern european food", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 28, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 42, - "value": "west", - "entity": "location" - }, - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for an expensive restaurant that serves indonesian food", - "intent": "inform", - "entities": [ - { - "start": 48, - "end": 58, - "value": "indonesian", - "entity": "cuisine" - }, - { - "start": 15, - "end": 24, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "is there a restaurant serving british food", - "intent": "inform", - "entities": [ - { - "start": 30, - "end": 37, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 24, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "polish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "polish", - "entity": "cuisine" - } - ] - }, - { - "text": "european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "north", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "correct", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced restaurant that serves mediterranean food", - "intent": "inform", - "entities": [ - { - "start": 50, - "end": 63, - "value": "mediterranean", - "entity": "cuisine" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about cheap", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 15, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want christmas food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 16, - "value": "christmas", - "entity": "cuisine" - } - ] - }, - { - "text": "what about north american type of food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 25, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "breath no american food", - "intent": "deny" - }, - { - "text": "no i want american food", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 49, - "value": "west", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves african food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 47, - "value": "african", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like to find a restaurant that serves afghan food", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 47, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "id like an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 20, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "id like to find a restaurant that serves korean food", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 47, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for something moderately priced", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 35, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for thai", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 19, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "west side", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thai food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for something on the south side", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 34, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "danish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "danish", - "entity": "cuisine" - } - ] - }, - { - "text": "no danish food", - "intent": "deny" - }, - { - "text": "how about italian", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for something expensive", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 34, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "something serving swiss food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 23, - "value": "swiss", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "what about british food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 18, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "breath thank you very much goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for something cheap", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 30, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "west side", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "singaporean", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 11, - "value": "singaporean", - "entity": "cuisine" - } - ] - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "world food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "modern european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 15, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "yea", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "hungarian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "hungarian", - "entity": "cuisine" - } - ] - }, - { - "text": "european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "caribbean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "caribbean", - "entity": "cuisine" - } - ] - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "belgian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "belgian", - "entity": "cuisine" - } - ] - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "malaysian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "malaysian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "british food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 23, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "irish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "irish", - "entity": "cuisine" - } - ] - }, - { - "text": "indian type of food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 43, - "value": "south", - "entity": "location" - }, - { - "start": 2, - "end": 12, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "correct", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "price over food west part of town", - "intent": "inform", - "entities": [ - { - "start": 16, - "end": 20, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "uh i want cantonese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 19, - "value": "cantonese", - "entity": "cuisine" - } - ] - }, - { - "text": "how about thai food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 14, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a moderate restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 33, - "value": "west", - "entity": "location" - }, - { - "start": 2, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cantonese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "cantonese", - "entity": "cuisine" - } - ] - }, - { - "text": "north american food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "south of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "yes right", - "intent": "affirm" - }, - { - "text": "east of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "west of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "indian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "indian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like to find a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 42, - "end": 46, - "value": "west", - "entity": "location" - }, - { - "start": 18, - "end": 23, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yea im looking for a really cheap restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 52, - "end": 56, - "value": "east", - "entity": "location" - }, - { - "start": 28, - "end": 33, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "what about international food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 24, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the west park of town that serves australian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "west", - "entity": "location" - }, - { - "start": 65, - "end": 75, - "value": "australian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about vietnamese", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 20, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 46, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant that serves signaporean food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about british food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant that serves unusual food", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 58, - "value": "unusual", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in any area that serves russian food", - "intent": "inform", - "entities": [ - { - "start": 52, - "end": 59, - "value": "russian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "north american", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want an expensive restaurant that serves sea food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 19, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want an expensive restaurant that serves polish food", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 49, - "value": "polish", - "entity": "cuisine" - }, - { - "start": 10, - "end": 19, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about italian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i would like steakhouse food", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 23, - "value": "steakhouse", - "entity": "cuisine" - } - ] - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "noise thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the west part of town serving italian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "west", - "entity": "location" - }, - { - "start": 61, - "end": 68, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant serving french food", - "intent": "inform", - "entities": [ - { - "start": 47, - "end": 53, - "value": "french", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye noise thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town serving austrian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - }, - { - "start": 62, - "end": 70, - "value": "austrian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian type of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for moderately priced restaurant serving austrian food", - "intent": "inform", - "entities": [ - { - "start": 52, - "end": 60, - "value": "austrian", - "entity": "cuisine" - }, - { - "start": 15, - "end": 25, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about gastropub type of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 19, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town serving lebanese food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 62, - "end": 70, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about italian type of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant serving modern european type of food", - "intent": "inform", - "entities": [ - { - "start": 42, - "end": 57, - "value": "modern european", - "entity": "cuisine" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant serving international food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 49, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "no north", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "international", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "north part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes italian food", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need to find a restaurant in the north part of town that serves jamaican food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 66, - "end": 74, - "value": "jamaican", - "entity": "cuisine" - } - ] - }, - { - "text": "how about an indian restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 19, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "lebanese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "how about italian", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "find me a cheap vietnamese restaurant", - "intent": "inform", - "entities": [ - { - "start": 16, - "end": 26, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a japanese restaurant in the center", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 22, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 49, - "value": "west", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "north", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a cuban restaurant that is moderately priced", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 14, - "value": "cuban", - "entity": "cuisine" - }, - { - "start": 34, - "end": 44, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "what about a spanish restuarant", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "no spanish food", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "south", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "canapes food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "canapes", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian type food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in any area that serves polynesian food", - "intent": "inform", - "entities": [ - { - "start": 52, - "end": 62, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about modern european type of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 25, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "that serves corsica", - "intent": "inform", - "entities": [ - { - "start": 12, - "end": 19, - "value": "corsica", - "entity": "cuisine" - } - ] - }, - { - "text": "the indian food", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 10, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "how about korean food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like to find a moderately priced restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 58, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 28, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i would like australian foo", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 23, - "value": "australian", - "entity": "cuisine" - } - ] - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i want a moderate priced restaurant in the south of town", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 48, - "value": "south", - "entity": "location" - }, - { - "start": 9, - "end": 17, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a moderately priced restaurant and it needs to be in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 69, - "end": 74, - "value": "south", - "entity": "location" - }, - { - "start": 14, - "end": 24, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves swiss food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 45, - "value": "swiss", - "entity": "cuisine" - } - ] - }, - { - "text": "what about vietnamese type of food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 21, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "no im looking for one that serves vietnamese food", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant that serves creative food", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 51, - "value": "creative", - "entity": "cuisine" - }, - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "uh are there any that serves mediterranean", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 42, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "a restaurant with afghan food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 24, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "uh a restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 23, - "end": 28, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "how about portuguese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 20, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant north part of town fast food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 16, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant north part of town", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "north", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant south part of town english food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 16, - "value": "south", - "entity": "location" - }, - { - "start": 30, - "end": 37, - "value": "english", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 29, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant north part of town seafood", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 16, - "value": "north", - "entity": "location" - }, - { - "start": 30, - "end": 37, - "value": "seafood", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you and good bye", - "intent": "thankyou" - }, - { - "text": "in the west", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "unintelligible thank you goodbye", - "intent": "thankyou" - }, - { - "text": "tuscan food south part of town", - "intent": "inform", - "entities": [ - { - "start": 12, - "end": 17, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 6, - "value": "tuscan", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a restaurant that serves french food", - "intent": "inform", - "entities": [ - { - "start": 32, - "end": 38, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "in the west", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a restaurant in the center that serves lebanese food", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 62, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "um i dont care i just want traditional food", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 38, - "value": "traditional", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about french food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "yes and in french please", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi im looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 49, - "end": 54, - "value": "south", - "entity": "location" - }, - { - "start": 21, - "end": 30, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "in cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 8, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "could i have a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 56, - "value": "south", - "entity": "location" - }, - { - "start": 15, - "end": 25, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "yes can i have can i get swedish food in any area", - "intent": "affirm" - }, - { - "text": "north american food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "swedish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "swedish", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "north american", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "swedish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "swedish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "swedish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "swedish", - "entity": "cuisine" - } - ] - }, - { - "text": "in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 12, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yeah a cheap restaurant serving international food", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "moderate priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 34, - "end": 39, - "value": "north", - "entity": "location" - }, - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes can i have", - "intent": "affirm" - }, - { - "text": "polynesian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "portuguese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "can i have greek food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 16, - "value": "greek", - "entity": "cuisine" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like to find a restaurant in the north part of town that serves german food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 41, - "value": "north", - "entity": "location" - }, - { - "start": 67, - "end": 73, - "value": "german", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about french", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for romanian food in the expensive price range", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 23, - "value": "romanian", - "entity": "cuisine" - }, - { - "start": 36, - "end": 45, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about mediterranean food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 23, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "yea", - "intent": "affirm" - }, - { - "text": "yea", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant serving moroccan food", - "intent": "inform", - "entities": [ - { - "start": 37, - "end": 45, - "value": "moroccan", - "entity": "cuisine" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town serving catalan food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 61, - "end": 68, - "value": "catalan", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive food in the south of town", - "intent": "inform", - "entities": [ - { - "start": 22, - "end": 27, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "portuguese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant in the east of town", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 28, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 20, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 31, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yea", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the west part of town that serves canape food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi im looking for an restaurant in the center that serves korean food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 64, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "yes that sells korean food", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like a restaurant in any area that it serves canapes", - "intent": "inform", - "entities": [ - { - "start": 48, - "end": 55, - "value": "canapes", - "entity": "cuisine" - } - ] - }, - { - "text": "modern european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 15, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i would like a restaurant that serves korean food", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 44, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like an expensive restaurant that serves bat food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 20, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about modern european", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 25, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "could i have a cheap restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 39, - "end": 43, - "value": "east", - "entity": "location" - }, - { - "start": 15, - "end": 20, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "west", - "entity": "location" - }, - { - "start": 10, - "end": 20, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "id like a moderately priced restaurant that serves cuban food please", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 56, - "value": "cuban", - "entity": "cuisine" - }, - { - "start": 10, - "end": 20, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant that serves steak house food", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "lebanese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "japanese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye noise", - "intent": "thankyou" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "afghan food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "turkish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "i am looking for a restaurant serving afghan food", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 44, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate price", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "international", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "british food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "uh cheap restaurant in north part of town", - "intent": "inform", - "entities": [ - { - "start": 23, - "end": 28, - "value": "north", - "entity": "location" - }, - { - "start": 3, - "end": 8, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "korean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "im looking for a restaurant in the south part of town and danish food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - }, - { - "start": 58, - "end": 64, - "value": "danish", - "entity": "cuisine" - } - ] - }, - { - "text": "yes south part of town", - "intent": "affirm" - }, - { - "text": "uh how about italian", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant serving portuguese food", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 39, - "value": "portuguese", - "entity": "cuisine" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about korean food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "noise restaurant west part of town danish food", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 21, - "value": "west", - "entity": "location" - }, - { - "start": 35, - "end": 41, - "value": "danish", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "tuscan food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "tuscan", - "entity": "cuisine" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thai food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "east part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "indian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south part", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "english food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "english", - "entity": "cuisine" - } - ] - }, - { - "text": "italian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i want to find a cheap restaurant and it should serve scandinavian food", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 66, - "value": "scandinavian", - "entity": "cuisine" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "mediterranean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the west part of town", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 8, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "creative food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "creative", - "entity": "cuisine" - } - ] - }, - { - "text": "how about italian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant that serves thai food", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "thai", - "entity": "cuisine" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 46, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "south part of town please", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "cheap restaurants", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "british food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "ah im looking for a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 25, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "canapes food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "canapes", - "entity": "cuisine" - } - ] - }, - { - "text": "how bout one that serves portuguese food and is cheap", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 35, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "ye", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "im looking for a restaurant that serves polynesian food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 50, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves unusual food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 47, - "value": "unusual", - "entity": "cuisine" - } - ] - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like a restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 33, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "scandinavian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 12, - "value": "scandinavian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "scandinavian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 12, - "value": "scandinavian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about thai food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 14, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "could i have a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 20, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "the north", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "can i have a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 23, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "gastropub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant moderate price", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "polish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "polish", - "entity": "cuisine" - } - ] - }, - { - "text": "north american", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "afghan", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "thai food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town that serves pan asian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "how about italian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant in any area international food", - "intent": "inform", - "entities": [ - { - "start": 23, - "end": 36, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "fusion food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "fusion", - "entity": "cuisine" - } - ] - }, - { - "text": "vietnamese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "spanish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "east part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "scandinavian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 12, - "value": "scandinavian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "north north part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "singaporean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 11, - "value": "singaporean", - "entity": "cuisine" - } - ] - }, - { - "text": "the south part of town", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "corsica food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "corsica", - "entity": "cuisine" - } - ] - }, - { - "text": "gastropub food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves french food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 46, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "for a restaurant in any area with international food", - "intent": "inform", - "entities": [ - { - "start": 34, - "end": 47, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "swiss", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "swiss", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i would like a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 39, - "end": 44, - "value": "north", - "entity": "location" - }, - { - "start": 15, - "end": 20, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the east", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 8, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "i would like a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 20, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like moderately priced moroccan food", - "intent": "inform", - "entities": [ - { - "start": 26, - "end": 34, - "value": "moroccan", - "entity": "cuisine" - }, - { - "start": 8, - "end": 18, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yea i would like korean food", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 23, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 42, - "value": "west", - "entity": "location" - }, - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a restaurant in the center that serves seafood", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 53, - "value": "seafood", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a restaurant in the north part of town that serves vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 32, - "value": "north", - "entity": "location" - }, - { - "start": 58, - "end": 68, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "what about in the west area", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 22, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part that serves creative food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 57, - "end": 65, - "value": "creative", - "entity": "cuisine" - } - ] - }, - { - "text": "how about a restaurant in the east part of town that serves indian food", - "intent": "inform", - "entities": [ - { - "start": 60, - "end": 66, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a restaurant in the south part of town that serves australian food", - "intent": "inform", - "entities": [ - { - "start": 32, - "end": 37, - "value": "south", - "entity": "location" - }, - { - "start": 63, - "end": 73, - "value": "australian", - "entity": "cuisine" - } - ] - }, - { - "text": "what about a restaurant that serves chinese food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 43, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "yea", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 46, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves japanese food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 48, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 30, - "value": "north", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "mexican", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "mexican", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "bistro", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "bistro", - "entity": "cuisine" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "dont care expensive", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 19, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yea thank you good bye", - "intent": "affirm" - }, - { - "text": "i want to find a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "north part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "right on good bye peace", - "intent": "affirm" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in any area it should serve gastropub food", - "intent": "inform", - "entities": [ - { - "start": 56, - "end": 65, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in central it should serve japanese food", - "intent": "inform", - "entities": [ - { - "start": 55, - "end": 63, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant that serves german food", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 35, - "value": "german", - "entity": "cuisine" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant that serves sea food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a moderately priced restaurant that serves unusual food", - "intent": "inform", - "entities": [ - { - "start": 55, - "end": 62, - "value": "unusual", - "entity": "cuisine" - }, - { - "start": 14, - "end": 24, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "what about european food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 19, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant that serves vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 68, - "value": "vietnamese", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "indian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves danish food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 46, - "value": "danish", - "entity": "cuisine" - } - ] - }, - { - "text": "what about vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 21, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i am looking for a restaurant in the south part of town and it should serve cantonese food", - "intent": "inform", - "entities": [ - { - "start": 37, - "end": 42, - "value": "south", - "entity": "location" - }, - { - "start": 76, - "end": 85, - "value": "cantonese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "chinese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "i am looking for an expensive restaurant that serves", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 29, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 12, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "sorry about my mistakes thank you good bye", - "intent": "thankyou" - }, - { - "text": "like to find a restaurant in the east part of town and it should serve indian food", - "intent": "inform", - "entities": [ - { - "start": 33, - "end": 37, - "value": "east", - "entity": "location" - }, - { - "start": 71, - "end": 77, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "welsh food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "welsh", - "entity": "cuisine" - } - ] - }, - { - "text": "how about european food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 18, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "serves halal food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 12, - "value": "halal", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "asian oriental food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thai food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "french food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant in the west part of town that serves cuban food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 22, - "value": "west", - "entity": "location" - }, - { - "start": 48, - "end": 53, - "value": "cuban", - "entity": "cuisine" - } - ] - }, - { - "text": "how about italian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a moderately priced restaurant in the east part town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "east", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "uh thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 26, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "uh thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant that serves greek food", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 56, - "value": "greek", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "how about asian oriental", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 24, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "uh okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant that serves traditional food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 69, - "value": "traditional", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about spanish food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "uh world food", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 8, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "how about mediterranean food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 23, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "catalan", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "catalan", - "entity": "cuisine" - } - ] - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant in the north part of town that serves hungarian food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 23, - "value": "north", - "entity": "location" - }, - { - "start": 49, - "end": 58, - "value": "hungarian", - "entity": "cuisine" - } - ] - }, - { - "text": "what asian oriental type of food", - "intent": "inform", - "entities": [ - { - "start": 5, - "end": 19, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "how about asian oriental type of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 24, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "african food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "african", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant that serves vegetarian food", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 39, - "value": "vegetarian", - "entity": "cuisine" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant in west part of town serving corsica food", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 18, - "value": "west", - "entity": "location" - }, - { - "start": 40, - "end": 47, - "value": "corsica", - "entity": "cuisine" - } - ] - }, - { - "text": "thai food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "venetian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "venetian", - "entity": "cuisine" - } - ] - }, - { - "text": "how about korean foo", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "noise looking for an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 30, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "jamaican", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "jamaican", - "entity": "cuisine" - } - ] - }, - { - "text": "european", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 28, - "value": "west", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant that serves irish food", - "intent": "inform", - "entities": [ - { - "start": 51, - "end": 56, - "value": "irish", - "entity": "cuisine" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for moroccan food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 23, - "value": "moroccan", - "entity": "cuisine" - } - ] - }, - { - "text": "french food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "noise looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 49, - "end": 54, - "value": "south", - "entity": "location" - }, - { - "start": 21, - "end": 30, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "noise thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a cheap re", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the center that serves turkish food", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 61, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant and it should be in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 63, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant that serves german food", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 52, - "value": "german", - "entity": "cuisine" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "what about asian oriental", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 25, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant that serves vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 56, - "value": "vietnamese", - "entity": "cuisine" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant that serves afghan food", - "intent": "inform", - "entities": [ - { - "start": 40, - "end": 46, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "what about european food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 19, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 56, - "end": 60, - "value": "west", - "entity": "location" - }, - { - "start": 20, - "end": 30, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "noise um in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 16, - "end": 20, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "noise ah gastropub food", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 18, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "breath thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a malaysian restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 26, - "value": "malaysian", - "entity": "cuisine" - } - ] - }, - { - "text": "um what about italian food", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 21, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "noise thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a restaurant in the moderate price range", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 35, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "christmas food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "christmas", - "entity": "cuisine" - } - ] - }, - { - "text": "what about modern european type food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 26, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "how about french food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "ah centre", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 9, - "value": "centre", - "entity": "location" - } - ] - }, - { - "text": "world", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "the west part of town", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 8, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "european food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "ye", - "intent": "affirm" - }, - { - "text": "expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i would like a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 39, - "end": 43, - "value": "west", - "entity": "location" - }, - { - "start": 15, - "end": 20, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes in the west part of town", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 51, - "value": "south", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 43, - "value": "south", - "entity": "location" - }, - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of town that serves afghan food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 65, - "end": 71, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "how bout chinese food", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 16, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 48, - "value": "south", - "entity": "location" - }, - { - "start": 15, - "end": 24, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a moderately priced restaurant that serves moroccan food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 66, - "value": "moroccan", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about spanish types of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 31, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "how about indian type of food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "british", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "how about spanish food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "how about english food in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "english", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant uh serving halal food", - "intent": "inform", - "entities": [ - { - "start": 57, - "end": 62, - "value": "halal", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "no i want halal food", - "intent": "deny" - }, - { - "text": "um what about european", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 22, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for swedish food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 22, - "value": "swedish", - "entity": "cuisine" - } - ] - }, - { - "text": "uh what about portuguese food", - "intent": "inform", - "entities": [ - { - "start": 14, - "end": 24, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "british", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes i am in the east part of town right now and i am looking for any place that serves indonesian food", - "intent": "affirm" - }, - { - "text": "ok how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "creative food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "creative", - "entity": "cuisine" - } - ] - }, - { - "text": "hello chinese type of food", - "intent": "inform", - "entities": [ - { - "start": 6, - "end": 13, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "south part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a restaurant in the center of town that includes international food", - "intent": "inform", - "entities": [ - { - "start": 56, - "end": 69, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a cheap restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 33, - "end": 37, - "value": "east", - "entity": "location" - }, - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a restaurant in the center of town that serves spanish food", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 61, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "no spanish", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 33, - "end": 38, - "value": "south", - "entity": "location" - }, - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant that serves world food", - "intent": "inform", - "entities": [ - { - "start": 50, - "end": 55, - "value": "world", - "entity": "cuisine" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "what about chinese food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 18, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant in the north of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 50, - "value": "north", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 49, - "value": "west", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for something serves japanese food", - "intent": "inform", - "entities": [ - { - "start": 32, - "end": 40, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the west part of town that serves moroccan food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "west", - "entity": "location" - }, - { - "start": 65, - "end": 73, - "value": "moroccan", - "entity": "cuisine" - } - ] - }, - { - "text": "is there one that serves indian food", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 31, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 49, - "value": "east", - "entity": "location" - }, - { - "start": 17, - "end": 26, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the west part of town", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 8, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "any kind of food id like a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 32, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the south part of town id like a restaurant that serves traditional food", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - }, - { - "start": 56, - "end": 67, - "value": "traditional", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "its a restaurant in the south of town that serves italian food", - "intent": "inform", - "entities": [ - { - "start": 50, - "end": 57, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "id like an expensive restaurant that serves mediteranean food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 20, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "east", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a korean restaurant in the expensive price range", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 23, - "value": "korean", - "entity": "cuisine" - }, - { - "start": 42, - "end": 51, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north part of town serving gastropub food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - }, - { - "start": 27, - "end": 36, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "what about a chinese restaurant in the north of town", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for tuscan food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 21, - "value": "tuscan", - "entity": "cuisine" - } - ] - }, - { - "text": "how about korean food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "singaporean", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 11, - "value": "singaporean", - "entity": "cuisine" - } - ] - }, - { - "text": "vietnamese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "afghan", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "portuguese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "restaurant in the east part of town serving basque food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 22, - "value": "east", - "entity": "location" - }, - { - "start": 44, - "end": 50, - "value": "basque", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant serving unintelligible food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "how about vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 20, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced labonese restaruant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant east part of town", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 21, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced in south part", - "intent": "inform", - "entities": [ - { - "start": 21, - "end": 26, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi im looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 20, - "end": 30, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "afghan food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "afghan", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi im looking for a cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 44, - "end": 49, - "value": "south", - "entity": "location" - }, - { - "start": 20, - "end": 25, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hi looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "caribbean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "caribbean", - "entity": "cuisine" - } - ] - }, - { - "text": "how about gastropub food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 19, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a cheap restaurant that serves unusual food", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 45, - "value": "unusual", - "entity": "cuisine" - }, - { - "start": 9, - "end": 14, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "how european", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 12, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "gastropub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "east", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 45, - "end": 49, - "value": "west", - "entity": "location" - }, - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want a british restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 9, - "end": 16, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hungarian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "hungarian", - "entity": "cuisine" - } - ] - }, - { - "text": "no hungarian food", - "intent": "deny" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "world food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "how about asian oriental", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 24, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "im looking for lebanese food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 23, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the west part of town that serves jamaican food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "west", - "entity": "location" - }, - { - "start": 65, - "end": 73, - "value": "jamaican", - "entity": "cuisine" - } - ] - }, - { - "text": "what about thai food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 15, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the center part of town that serves european food", - "intent": "inform", - "entities": [ - { - "start": 67, - "end": 75, - "value": "european", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "polynesian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "vietnamese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "south expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - }, - { - "start": 6, - "end": 15, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "african food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "african", - "entity": "cuisine" - } - ] - }, - { - "text": "moderate price", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "spanish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "no spanish", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 41, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "cheap price range", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i need a moderately priced restaurant that serves bask food", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 19, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "how about asian oriental", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 24, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north american food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 14, - "value": "north american", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 32, - "value": "east", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant and it should be in the north of town", - "intent": "inform", - "entities": [ - { - "start": 70, - "end": 75, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "i want to find a moderately priced restaurant that serves cuban food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 63, - "value": "cuban", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "moderately priced food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for a cheap restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 38, - "end": 42, - "value": "west", - "entity": "location" - }, - { - "start": 14, - "end": 19, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "uh yes can i find a moderately priced restaurant and it serve it should serve brazilian food", - "intent": "affirm" - }, - { - "text": "okay how about a gastropub", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 26, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "uh yes im looking for a cheap restaurant that serves medetanian food", - "intent": "affirm" - }, - { - "text": "uh yes can i find a restaurant in the east part of town that serves chinese", - "intent": "affirm" - }, - { - "text": "and thats all thank you and good bye", - "intent": "thankyou" - }, - { - "text": "uh yes i need the north part of town", - "intent": "affirm" - }, - { - "text": "uh cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 8, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "uh yes restaurant that serves danish food", - "intent": "affirm" - }, - { - "text": "international food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "um moderate", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 11, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "uh yes im looking for a cheap restaurant in the west part of town", - "intent": "affirm" - }, - { - "text": "uh yes a cheap restaurant", - "intent": "affirm" - }, - { - "text": "uh yes im looking for malaysian food", - "intent": "affirm" - }, - { - "text": "uh okay how about french food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 24, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "yes and i dont care about the price range", - "intent": "affirm" - }, - { - "text": "thank you bye", - "intent": "thankyou" - }, - { - "text": "french food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 33, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "breath im looking for a restaurant that serves cuban food", - "intent": "inform", - "entities": [ - { - "start": 47, - "end": 52, - "value": "cuban", - "entity": "cuisine" - } - ] - }, - { - "text": "can i find a restaurant that serves international food", - "intent": "inform", - "entities": [ - { - "start": 36, - "end": 49, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for portuguese food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 25, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "in the west part", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 11, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town serving korean food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - }, - { - "start": 62, - "end": 68, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 45, - "value": "east", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the north part of town serving jamaican food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - }, - { - "start": 62, - "end": 70, - "value": "jamaican", - "entity": "cuisine" - } - ] - }, - { - "text": "how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 17, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in any area that serves welsh food", - "intent": "inform", - "entities": [ - { - "start": 52, - "end": 57, - "value": "welsh", - "entity": "cuisine" - } - ] - }, - { - "text": "how about vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 20, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "looking for an expensive restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 48, - "value": "south", - "entity": "location" - }, - { - "start": 15, - "end": 24, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 29, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the center that serves caribbean food", - "intent": "inform", - "entities": [ - { - "start": 54, - "end": 63, - "value": "caribbean", - "entity": "cuisine" - } - ] - }, - { - "text": "how about international food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 23, - "value": "international", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap pan asian food", - "intent": "inform", - "entities": [ - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "okay is there any portuguese food", - "intent": "inform", - "entities": [ - { - "start": 18, - "end": 28, - "value": "portuguese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north part", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "moderately priced food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thanks goodbye", - "intent": "thankyou" - }, - { - "text": "i want a restaurant in the east part of town that serves singaporean food", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 31, - "value": "east", - "entity": "location" - }, - { - "start": 57, - "end": 68, - "value": "singaporean", - "entity": "cuisine" - } - ] - }, - { - "text": "what about indian", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 17, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "chinese food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "um im looking for a restaurant in the center part of town that serves lebanese food", - "intent": "inform", - "entities": [ - { - "start": 70, - "end": 78, - "value": "lebanese", - "entity": "cuisine" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "unusual food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "unusual", - "entity": "cuisine" - } - ] - }, - { - "text": "thai type food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "danish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "danish", - "entity": "cuisine" - } - ] - }, - { - "text": "chinese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "moderately", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "breath i want to find a restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 42, - "end": 47, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "how bout asian oriental", - "intent": "inform", - "entities": [ - { - "start": 9, - "end": 23, - "value": "asian oriental", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "ye", - "intent": "affirm" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "i want to find a restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "unusual food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "unusual", - "entity": "cuisine" - } - ] - }, - { - "text": "how about indian food", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 16, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "um in the south part of town and its cheap", - "intent": "inform", - "entities": [ - { - "start": 10, - "end": 15, - "value": "south", - "entity": "location" - }, - { - "start": 37, - "end": 42, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 58, - "value": "south", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "uh yeah im looking for a restaurant in the south part of town and that serves kosher food", - "intent": "affirm" - }, - { - "text": "um how about chinese food", - "intent": "inform", - "entities": [ - { - "start": 13, - "end": 20, - "value": "chinese", - "entity": "cuisine" - } - ] - }, - { - "text": "um moderate", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 11, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "okay thank you", - "intent": "thankyou" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "the south part", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "the south part", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "no the south part", - "intent": "deny" - }, - { - "text": "um an expensive", - "intent": "inform", - "entities": [ - { - "start": 6, - "end": 15, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "okay thank you good bye", - "intent": "thankyou" - }, - { - "text": "yeah i need to find", - "intent": "affirm" - }, - { - "text": "cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "british food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "moderately priced", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderately priced restaurant", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "west part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant with spanish food", - "intent": "inform", - "entities": [ - { - "start": 39, - "end": 46, - "value": "spanish", - "entity": "cuisine" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for traditional food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 26, - "value": "traditional", - "entity": "cuisine" - } - ] - }, - { - "text": "what about korean food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 17, - "value": "korean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 46, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "spanish food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "spanish", - "entity": "cuisine" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "german", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "german", - "entity": "cuisine" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "gastropub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "bistro", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "bistro", - "entity": "cuisine" - } - ] - }, - { - "text": "turkish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you goodbye noise", - "intent": "thankyou" - }, - { - "text": "japanese", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you goodbye noise", - "intent": "thankyou" - }, - { - "text": "turkish", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "turkish", - "entity": "cuisine" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "indian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for belgian food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 22, - "value": "belgian", - "entity": "cuisine" - } - ] - }, - { - "text": "what about modern european", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 26, - "value": "modern european", - "entity": "cuisine" - } - ] - }, - { - "text": "right", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for corsica food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 22, - "value": "corsica", - "entity": "cuisine" - } - ] - }, - { - "text": "what about vietnamese food", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 21, - "value": "vietnamese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 46, - "end": 50, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for japanese food", - "intent": "inform", - "entities": [ - { - "start": 15, - "end": 23, - "value": "japanese", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant in the west part of town", - "intent": "inform", - "entities": [ - { - "start": 53, - "end": 57, - "value": "west", - "entity": "location" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "what is a good cheap restaurant that serves portuguese food", - "intent": "inform", - "entities": [ - { - "start": 44, - "end": 54, - "value": "portuguese", - "entity": "cuisine" - }, - { - "start": 15, - "end": 20, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "an expensive restaurant", - "intent": "inform", - "entities": [ - { - "start": 3, - "end": 12, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "french food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a cheap restaurant in the north part of town", - "intent": "inform", - "entities": [ - { - "start": 41, - "end": 46, - "value": "north", - "entity": "location" - }, - { - "start": 17, - "end": 22, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "mediterranean food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 13, - "value": "mediterranean", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 40, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "yea", - "intent": "affirm" - }, - { - "text": "indian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "um thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "yea im looking for a really cheap restaurant", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 33, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "oh i need to be in the north", - "intent": "inform", - "entities": [ - { - "start": 23, - "end": 28, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "west", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "west", - "entity": "location" - } - ] - }, - { - "text": "italian", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 7, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "polynesian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "what about italian", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 18, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "what about expensive", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 20, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "im looking for a restaurant in the east part of the town with indian asian food", - "intent": "inform", - "entities": [ - { - "start": 35, - "end": 39, - "value": "east", - "entity": "location" - }, - { - "start": 62, - "end": 68, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an italian restaurant in the east part of town", - "intent": "inform", - "entities": [ - { - "start": 44, - "end": 48, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 25, - "value": "italian", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap restaurant in the south part of town", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 29, - "value": "south", - "entity": "location" - }, - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "the south", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 9, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "french", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 6, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for a moderately priced restaurant that serves european food", - "intent": "inform", - "entities": [ - { - "start": 58, - "end": 66, - "value": "european", - "entity": "cuisine" - }, - { - "start": 17, - "end": 27, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "world food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "gastropub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "world food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "world", - "entity": "cuisine" - } - ] - }, - { - "text": "gastropub", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "gastropub", - "entity": "cuisine" - } - ] - }, - { - "text": "no", - "intent": "deny" - }, - { - "text": "thank you goodbye", - "intent": "thankyou" - }, - { - "text": "expensive", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 9, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "moderate", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 8, - "value": "moderate", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "east", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "east", - "entity": "location" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "north part of town", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "north", - "entity": "location" - } - ] - }, - { - "text": "yes", - "intent": "affirm" - }, - { - "text": "cheap", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "cheap", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "im looking for an expensive restaurant and it should be east part of town", - "intent": "inform", - "entities": [ - { - "start": 56, - "end": 60, - "value": "east", - "entity": "location" - }, - { - "start": 18, - "end": 27, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "thank you", - "intent": "thankyou" - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "polynesian food", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 10, - "value": "polynesian", - "entity": "cuisine" - } - ] - }, - { - "text": "south", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 5, - "value": "south", - "entity": "location" - } - ] - }, - { - "text": "thai", - "intent": "inform", - "entities": [ - { - "start": 0, - "end": 4, - "value": "thai", - "entity": "cuisine" - } - ] - }, - { - "text": "thank you good bye", - "intent": "thankyou" - }, - { - "text": "hello", - "intent": "greet", - "entities": [] - }, - { - "text": "good morning", - "intent": "greet", - "entities": [] - }, - { - "text": "hi", - "intent": "greet", - "entities": [] - }, - { - "text": "no", - "intent": "deny", - "entities": [] - }, - { - "text": "no thank you", - "intent": "deny", - "entities": [] - }, - { - "text": "can you make a restaurant reservation with italian food for eight in bombay in a expensive price range", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 50, - "value": "italian", - "entity": "cuisine" - }, - { - "start": 60, - "end": 65, - "value": "8", - "entity": "people" - }, - { - "start": 69, - "end": 75, - "value": "bombay", - "entity": "location" - }, - { - "start": 81, - "end": 90, - "value": "expensive", - "entity": "price" - } - ] - }, - { - "text": "instead could it be with indian cuisine", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 31, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "actually i would prefer for six people", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 31, - "value": "6", - "entity": "people" - } - ] - }, - { - "text": "actually i would prefer in madrid", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 33, - "value": "madrid", - "entity": "location" - } - ] - }, - { - "text": "may i have a table in a moderate price range with spanish food in bombay for two people", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 32, - "value": "mid", - "entity": "price" - }, - { - "start": 50, - "end": 57, - "value": "spanish", - "entity": "cuisine" - }, - { - "start": 66, - "end": 72, - "value": "bombay", - "entity": "location" - }, - { - "start": 77, - "end": 80, - "value": "2", - "entity": "people" - } - ] - }, - { - "text": "i'd like to book a table in a cheap price range for six people with spanish cuisine in madrid", - "intent": "inform", - "entities": [ - { - "start": 30, - "end": 35, - "value": "lo", - "entity": "price" - }, - { - "start": 52, - "end": 55, - "value": "6", - "entity": "people" - }, - { - "start": 68, - "end": 75, - "value": "spanish", - "entity": "cuisine" - }, - { - "start": 87, - "end": 93, - "value": "madrid", - "entity": "location" - } - ] - }, - { - "text": "can you make a restaurant reservation in a cheap price range in london with spanish food for eight people", - "intent": "inform", - "entities": [ - { - "start": 43, - "end": 48, - "value": "lo", - "entity": "price" - }, - { - "start": 64, - "end": 70, - "value": "london", - "entity": "location" - }, - { - "start": 76, - "end": 83, - "value": "spanish", - "entity": "cuisine" - }, - { - "start": 93, - "end": 98, - "value": "8", - "entity": "people" - } - ] - }, - { - "text": "can you book a table in rome in a moderate price range with british food for four people", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 28, - "value": "rome", - "entity": "location" - }, - { - "start": 34, - "end": 42, - "value": "mid", - "entity": "price" - }, - { - "start": 60, - "end": 67, - "value": "british", - "entity": "cuisine" - }, - { - "start": 77, - "end": 81, - "value": "4", - "entity": "people" - } - ] - }, - { - "text": "i'd like to book a table for two in madrid with spanish cuisine in a moderate price range", - "intent": "inform", - "entities": [ - { - "start": 29, - "end": 32, - "value": "2", - "entity": "people" - }, - { - "start": 36, - "end": 42, - "value": "madrid", - "entity": "location" - }, - { - "start": 48, - "end": 55, - "value": "spanish", - "entity": "cuisine" - }, - { - "start": 69, - "end": 77, - "value": "mid", - "entity": "price" - } - ] - }, - { - "text": "can you book a table in london in a expensive price range with spanish cuisine for two", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 30, - "value": "london", - "entity": "location" - }, - { - "start": 36, - "end": 45, - "value": "hi", - "entity": "price" - }, - { - "start": 63, - "end": 70, - "value": "spanish", - "entity": "cuisine" - }, - { - "start": 83, - "end": 86, - "value": "2", - "entity": "people" - } - ] - }, - { - "text": "actually i would prefer for eight people", - "intent": "inform", - "entities": [ - { - "start": 28, - "end": 33, - "value": "8", - "entity": "people" - } - ] - }, - { - "text": "i love indian food", - "intent": "inform", - "entities": [ - { - "start": 7, - "end": 13, - "value": "indian", - "entity": "cuisine" - } - ] - }, - { - "text": "in a moderate price range please", - "intent": "inform", - "entities": [ - { - "start": 5, - "end": 13, - "value": "mid", - "entity": "price" - } - ] - }, - { - "text": "instead could it be with french food", - "intent": "inform", - "entities": [ - { - "start": 25, - "end": 31, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "no thanks", - "intent": "deny", - "entities": [] - }, - { - "text": "thanks", - "intent": "thankyou", - "entities": [] - }, - { - "text": "do you have its address", - "intent": "request_info", - "entities": [ - { - "start": 16, - "end": 23, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "let's do it", - "intent": "affirm", - "entities": [] - }, - { - "text": "yes", - "intent": "affirm", - "entities": [] - }, - { - "text": "i love that", - "intent": "affirm", - "entities": [] - }, - { - "text": "do you have its phone number", - "intent": "request_info", - "entities": [ - { - "start": 16, - "end": 28, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "with french cuisine", - "intent": "inform", - "entities": [ - { - "start": 5, - "end": 11, - "value": "french", - "entity": "cuisine" - } - ] - }, - { - "text": "for six please", - "intent": "inform", - "entities": [ - { - "start": 4, - "end": 7, - "value": "6", - "entity": "people" - } - ] - }, - { - "text": "actually i would prefer in bombay", - "intent": "inform", - "entities": [ - { - "start": 27, - "end": 33, - "value": "bombay", - "entity": "location" - } - ] - }, - { - "text": "instead could it be for four people", - "intent": "inform", - "entities": [ - { - "start": 24, - "end": 28, - "value": "4", - "entity": "people" - } - ] - }, - { - "text": "no this does not work for me", - "intent": "deny", - "entities": [] - }, - { - "text": "do you have something else", - "intent": "deny", - "entities": [] - }, - { - "text": "you rock", - "intent": "thankyou", - "entities": [] - }, - { - "text": "may i have the phone number of the restaurant", - "intent": "request_info", - "entities": [ - { - "start": 15, - "end": 27, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "with british food", - "intent": "inform", - "entities": [ - { - "start": 5, - "end": 12, - "value": "british", - "entity": "cuisine" - } - ] - }, - { - "text": "we will be eight", - "intent": "inform", - "entities": [ - { - "start": 11, - "end": 16, - "value": "8", - "entity": "people" - } - ] - }, - { - "text": "hey", - "intent": "greet", - "entities": [] - }, - { - "text": "morning", - "intent": "greet", - "entities": [] - }, - { - "text": "hello there", - "intent": "greet", - "entities": [] - }, - { - "text": "hi there", - "intent": "greet", - "entities": [] - }, - { - "text": "good afternoon", - "intent": "greet", - "entities": [] - }, - { - "text": "hey bot", - "intent": "greet", - "entities": [] - }, - { - "text": "good evening", - "intent": "greet", - "entities": [] - }, - { - "text": "goodmorning", - "intent": "greet", - "entities": [] - }, - { - "text": "goodevening", - "intent": "greet", - "entities": [] - }, - { - "text": "goodafternoon", - "intent": "greet", - "entities": [] - }, - { - "text": "what is the address of the restaurant", - "intent": "request_info", - "entities": [ - { - "start": 12, - "end": 19, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "may i have the address of the restaurant", - "intent": "request_info", - "entities": [ - { - "start": 15, - "end": 22, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "do you have their phone number", - "intent": "request_info", - "entities": [ - { - "start": 18, - "end": 30, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "do you have their address", - "intent": "request_info", - "entities": [ - { - "start": 18, - "end": 25, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "whats their phone number", - "intent": "request_info", - "entities": [ - { - "start": 12, - "end": 24, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "whats their address", - "intent": "request_info", - "entities": [ - { - "start": 12, - "end": 19, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "what is their phone number", - "intent": "request_info", - "entities": [ - { - "start": 14, - "end": 26, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "give me their phone number", - "intent": "request_info", - "entities": [ - { - "start": 14, - "end": 26, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "give me their address", - "intent": "request_info", - "entities": [ - { - "start": 14, - "end": 21, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "what is their address", - "intent": "request_info", - "entities": [ - { - "start": 14, - "end": 21, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "can i have their address", - "intent": "request_info", - "entities": [ - { - "start": 17, - "end": 24, - "value": "address", - "entity": "info" - } - ] - }, - { - "text": "can i have their phone number", - "intent": "request_info", - "entities": [ - { - "start": 17, - "end": 29, - "value": "phone number", - "entity": "info" - } - ] - }, - { - "text": "what is the phone number of the restaurant", - "intent": "request_info", - "entities": [ - { - "start": 12, - "end": 24, - "value": "phone number", - "entity": "info" - } - ] - } - - ], - "entity_examples": [], - "intent_examples": [] - } -} \ No newline at end of file diff --git a/examples/restaurantbot/data/nlu_data.md b/examples/restaurantbot/data/nlu_data.md new file mode 100644 index 00000000000..c2b1c3081f0 --- /dev/null +++ b/examples/restaurantbot/data/nlu_data.md @@ -0,0 +1,759 @@ +## intent:affirm +- uh yes im looking for a cheap restaurant in the west part of town +- yeah a cheap restaurant serving international food +- correct +- ye +- uh yes restaurant that serves danish food +- let's do it +- yeah +- yes that sells korean food +- yes can i have can i get swedish food in any area +- yes id like an expensive restaurant in the east part of town +- uh yes a cheap restaurant +- yes that serves korean food +- um yes +- yes knocking +- yes italian food +- yes in the moderately priced +- thats correct gastropub food +- uh yes im looking for a cheap restaurant that serves medetanian food +- yes yes +- uh yes can i find a restaurant in the east part of town that serves chinese +- uh yes im looking for malaysian food +- right +- yea +- yes +- yes i am in the east part of town right now and i am looking for any place that serves indonesian food +- yes south part of town +- yes right +- yes and i dont care about the price range +- yeah i need to find +- uh yes i need the north part of town +- uh yeah im looking for a restaurant in the south part of town and that serves kosher food +- yea thank you good bye +- yes can i have +- yes and in french please +- uh yes can i find a moderately priced restaurant and it serve it should serve brazilian food +- right on good bye peace +- yes in the west part of town +- yes barbecue food +- i love that +- yes spanish restaurant + +## intent:deny +- no danish food +- no north +- no +- no new selection +- no im looking for pan asian +- no thanks +- no i want american food +- no thank you good bye +- no thank you +- no spanish food +- no im looking in the south of the town +- no indian food +- uh no +- breath no american food +- no the south part +- oh no and cheap +- no spanish +- no british food +- no south part of town +- no im looking for one that serves vietnamese food +- do you have something else +- no chinese +- no i want halal food +- no hungarian food +- no center +- no this does not work for me +- no thai + +## intent:greet +- hi there +- hello there +- hey +- hi +- hey bot +- good morning +- goodmorning +- hello +- goodevening +- goodafternoon +- good evening +- morning +- good afternoon + +## intent:inform +- [afghan](cuisine) food +- how bout [asian oriental](cuisine) +- im looking for a [moderately](price:moderate) priced restaurant in the [east](location) part of town +- find [moderately](price:moderate) priced restaurant in the [west](location) part of town +- what about [indian](cuisine) food +- [south](location) part of town +- uh how about [turkish](cuisine) type of food +- yea im looking for a really [cheap](price) restaurant +- a [moderate](price) restaurant in the [west](location) part of town +- um [english](cuisine) +- im looking for [tuscan](cuisine) food +- i need a [moderately](price:moderate) priced restaurant in the [west](location) part of town +- [cheap](price) restaurant in the [east](location) of town +- id like [moderately](price:moderate) priced [moroccan](cuisine) food +- im looking for an [expensive](price) restaurant in the [east](location) town +- [moderately](price:moderate) priced food +- restaurant [north](location) part of town [seafood](cuisine) +- [moderately](price:moderate) priced restaurant in the [south](location) part of town +- [north](location) part of town +- [north](location) part +- [french](cuisine) food +- serves [british](cuisine) food +- i need a [moderately](price:moderate) priced restaurant +- i want a [moderately](price:moderate) priced restaurant in the [west](location) part of town +- i want a [cheap](price) restaurant in the [south](location) part of town +- id like a restaurant in any area that it serves [canapes](cuisine) +- im looking for a restaurant in the [south](location) part of town serving [jamaican](cuisine) food +- um what about [italian](cuisine) food +- im looking for a [cheap](price) restaurant in the [north](location) part of town +- the [south](location) part of town +- im looking for [corsica](cuisine) food +- [south](location) +- im looking for an [expensive](price) restaurant that serves sea food +- ah im looking for a [cheap](price) restaurant +- im looking for [world](cuisine) food +- im looking for a restaurant that serves [french](cuisine) food +- how about [indian](cuisine) food +- breath can i get a restaurant serving [chinese](cuisine) food +- [irish](cuisine) food +- im looking for a restaurant in the [west](location) part of town serving [italian](cuisine) food +- restaurant [south](location) part of town [english](cuisine) food +- [spanish](cuisine) food +- how bout one that serves [portuguese](cuisine) food and is cheap +- [german](cuisine) +- i need a [moderately](price:moderate) priced restaurant in the [north](location) of town +- [korean](cuisine) food +- im looking for [romanian](cuisine) food in the [expensive](price) price range +- i want to find a [moderately](price:moderate) priced restaurant that serves [canapes](cuisine) food +- im looking for a [moderately](price:moderate) priced labonese restaruant +- looking for a [moderately](price:moderate) priced restaurant +- id like to find an [expensive](price) restaurant +- [gastropub](cuisine) +- i want a restaurant that serves [french](cuisine) food +- restaurant [north](location) part of town fast food +- how about [modern european](cuisine) type of food +- im looking for a restaurant on the [east](location) part of town that serves scandinavia food +- the [west](location) part of town +- i want to find a [cheap](price) restaurant and it should serve [scandinavian](cuisine) food +- how [european](cuisine) +- how about [european](cuisine) food +- looking for something [moderately](price:moderate) priced in the [north](location) side of town +- the [south](location) part of town id like a restaurant that serves [traditional](cuisine) food +- i need a [cheap](price) restaurant that serves [indonesian](cuisine) food +- [modern european](cuisine) +- id like to find a [moderately](price:moderate) priced restaurant in the [east](location) part of town +- looking for a [moderately](price:moderate) priced restaurant that serves [brazilian](cuisine) +- i would like [modern european](cuisine) food +- hi looking for a [moderately](price:moderate) priced restaurant +- looking for a restaurant that serves [lebanese](cuisine) food +- [east](location) part of town +- [west](location) +- [cheap](price) restaurant in the [west](location) part of town +- [portuguese](cuisine) +- [european](cuisine) +- [expensive](price) food in the [south](location) of town +- i want an [expensive](price) restaurant that serves [polish](cuisine) food +- id like an [expensive](price) [thai](cuisine) restaurant +- i want to find a [moderately](price:moderate) priced restaurant that serves [moroccan](cuisine) food +- [afghan](cuisine) +- [expensive](price) restaurant [scottish](cuisine) food +- how about [vietnamese](cuisine) +- hi im looking for [mexican](cuisine) food +- can i have a [moderately](price:moderate) priced restaurant +- how about [indian](cuisine) type of food +- i would like a [cheap](price) restaurant in the [north](location) part of town +- a [cheap](price) restaurant in the [west](location) part of town +- [polynesian](cuisine) food +- [mexican](cuisine) +- looking for a [cheap](price) restaurant in the [south](location) part of town +- instead could it be for [four](people:4) people +- restaurant any area [japanese](cuisine) food +- im looking for a restaurant in the [north](location) part of town +- what about [thai](cuisine) food +- how about [asian oriental](cuisine) food +- im looking for a restaurant that serves [japanese](cuisine) food +- im looking for a restaurant in the [north](location) part of town that serves [belgian](cuisine) food +- im looking for a restaurant that serves [turkish](cuisine) food +- restaurant in [west](location) part of town serving [corsica](cuisine) food +- [moderately](price:moderate) priced serving gastro pub +- is there a restaurant serving [british](cuisine) food +- [world](cuisine) food +- im looking for something serves [japanese](cuisine) food +- im looking for an [expensive](price) restaurant and it should be in the [south](location) part of town +- id like a [greek](cuisine) restaurant in the [east](location) part of town +- im looking for an [expensive](price) restaurant serving [malaysian](cuisine) food +- i want to find a restaurant serving [world](cuisine) food +- im looking for a restaurant in the [south](location) part of town that serves pan asian food +- looking for an [expensive](price) restaurant that serves [afghan](cuisine) food +- actually i would prefer in [madrid](location) +- what is a good [cheap](price) restaurant that serves [portuguese](cuisine) food +- [asian oriental](cuisine) food +- im looking for a restaurant that serves [russian](cuisine) food +- [corsica](cuisine) +- id like an [expensive](price) restaurant that serves mediteranean food +- [moderately](price:moderate) priced in [south](location) part +- [moderate](price) price [west](location) part of town +- [north](location) +- [asian oriental](cuisine) +- restaurant in the [east](location) part of town serving [basque](cuisine) food +- i am looking for a [cheap](price) restaurant and it should be in the [west](location) part of town +- [moderate](price) priced +- how about [italian](cuisine) +- looking for [spanish](cuisine) food in the center of town +- hi im looking for a [moderately](price:moderate) priced restaurant +- im looking for a restaurant in any area it should serve [gastropub](cuisine) food +- [welsh](cuisine) food +- i want [vegetarian](cuisine) food +- im looking for [swedish](cuisine) food +- um how about [chinese](cuisine) food +- a restaurant in the [east](location) part of town that serves [caribbean](cuisine) food +- i need a restaurant in the [east](location) part of town +- in the [west](location) part +- [expensive](price) restaurant serving [world](cuisine) food +- can i have a [seafood](cuisine) restaurant please +- how about [italian](cuisine) food +- how about [korean](cuisine) +- uh [cheap](price) restaurant in [north](location) part of town +- [corsica](cuisine) food +- [scandinavian](cuisine) +- [cheap](price) restaurant that serves [vegetarian](cuisine) food +- what about [italian](cuisine) +- how about [portuguese](cuisine) food +- im looking for an [expensive](price) restaurant serving [french](cuisine) food +- looking for a [moderately](price:moderate) priced restaurant and it needs to be in the [south](location) part of town +- [south](location) part +- i would like to find a [moderately](price:moderate) priced restaurant in the [north](location) part of town +- [tuscan](cuisine) food +- how about uh [gastropub](cuisine) +- im looking for a restaurant in the [east](location) part that serves [creative](cuisine) food +- im looking for a restaurant in the [south](location) part of town that serves [malaysian](cuisine) food +- i'd like to book a table for [two](people:2) in [madrid](location) with [spanish](cuisine) cuisine in a [moderate](price:mid) price range +- i need a [cheap](price) restaurant in the [west](location) part of town +- im looking for a restaurant that serves [unusual](cuisine) food +- im looking for a restaurant in the [south](location) part of town and [danish](cuisine) food +- how about [spanish](cuisine) food +- im looking for a [cheap](price) restaurant and it should be in the [south](location) part of town +- im looking for a [cheap](price) restaurant that serves [vietnamese](cuisine) food +- [spanish](cuisine) +- im looking for a restaurant serving [romanian](cuisine) food +- im looking for [lebanese](cuisine) food +- i need a [moderately](price:moderate) priced restaurant in the [north](location) part of town +- im looking for a restaurant serving [international](cuisine) food +- im looking for a restaurant in the center that serves [turkish](cuisine) food +- [north american](cuisine) +- hello im looking for an [expensive](price) restaurant +- instead could it be with [indian](cuisine) cuisine +- [expensive](price) +- im looking for a [thai](cuisine) restaurant +- want something in the [south](location) side of town thats [moderately](price:moderate) priced +- im looking for [moroccan](cuisine) food +- looking for [cheap](price) barbecue food +- [west](location) part of town +- how about an expensive restaurant that serves [european](cuisine) food +- we will be [eight](people:8) +- im looking for [greek](cuisine) food +- find me a cheap [vietnamese](cuisine) restaurant +- serves [halal](cuisine) food +- [international](cuisine) food in the [east](location) part of town +- [south](location) of town +- im looking for something [cheap](price) +- im looking for a restaurant in the [east](location) part of town serving [catalan](cuisine) food +- i need a restaurant in the [west](location) part of town +- [moderate](price) restaurant [kosher](cuisine) food +- what about the [west](location) part of town +- hi im looking for a [moderately](price:moderate) priced restaurant in the [west](location) part of town +- the [indian](cuisine) food +- looking for an [expensive](price) restaurant in the [south](location) part of town +- uh a restaurant in the [south](location) part of town +- i want [malaysian](cuisine) food in any area +- hello [chinese](cuisine) type of food +- id like to find a restaurant that serves [korean](cuisine) food +- looking for a restaurant in the [south](location) part of town that serves [australian](cuisine) food +- uh how about [italian](cuisine) +- [greek](cuisine) food +- im looking for a [cheap](price) restaurant serving [modern european](cuisine) type of food +- yea im looking for a really [cheap](price) restaurant in the [east](location) part of town +- i love [indian](cuisine) food +- how about [korean](cuisine) food +- [cheap](price) [european](cuisine) food +- hi im looking for an [expensive](price) restaurant in the [south](location) part of town +- im looking for [belgian](cuisine) food +- breath i want to find a restaurant in the [north](location) part of town +- how about [gastropub](cuisine) food +- [mediterranean](cuisine) food +- [venetian](cuisine) food +- [moderate](price) restaurant [south](location) part of town +- ah [centre](location) +- im looking for a [cheap](price) pan asian food +- how about [chinese](cuisine) food +- looking for [lebanese](cuisine) food in the city center +- [singaporean](cuisine) food +- [east](location) +- looking for a [cheap](price) restaurant that serves steak house food +- um what about [european](cuisine) +- uh how about [north american](cuisine) +- actually i would prefer for [eight](people:8) people +- [cheap](price) price range +- [belgian](cuisine) food +- i need a [cheap](price) restaurant in the [east](location) part of town +- im looking for an [expensive](price) restaurant that serves [irish](cuisine) food +- [scandinavian](cuisine) food +- what about in the [west](location) area +- on the [south](location) part of town +- [east](location) noise +- how about [british](cuisine) food +- how about [international](cuisine) food +- uh okay how about [french](cuisine) food +- id like a [moderately](price:moderate) priced restaurant in the [west](location) part of town +- im looking for a restaurant in the [west](location) part of town that serves [moroccan](cuisine) food +- [expensive](price) restaurant [east](location) part of town +- um i dont care i just want [traditional](cuisine) food +- okay is there any [portuguese](cuisine) food +- how about [french](cuisine) +- im looking for [japanese](cuisine) food +- i want a [cheap](price) restaurant that serves [unusual](cuisine) food +- what about [chinese](cuisine) food +- how about [english](cuisine) food in the north part of town +- [turkish](cuisine) +- how about [mediterranean](cuisine) food +- [french](cuisine) +- actually i would prefer for [six](people:6) people +- uh [italian](cuisine) +- [cantonese](cuisine) food +- im looking for a restaurant that serves [african](cuisine) food +- um [moderate](price) +- [danish](cuisine) food +- [brazilian](cuisine) food +- lets see im looking for a restaurant in the [north](location) part of town that serves [vietnamese](cuisine) food +- [venetian](cuisine) +- i want a restaurant serving [greek](cuisine) food +- can you book a table in [london](location) in a [expensive](price:hi) price range with [spanish](cuisine) cuisine for [two](people:2) +- [italian](cuisine) food +- im looking for a restaurant in the [south](location) part of town serving [austrian](cuisine) food +- a restaurant with [afghan](cuisine) food +- im looking for [traditional](cuisine) food +- im looking for an [expensive](price) restaurant +- can i find an [expensive](price) restaurant that serves [traditional](cuisine) food +- [vietnamese](cuisine) food +- noise anything [expensive](price) +- i want to find a [cheap](price) re +- im looking for a restaurant in the center of town that serves [african](cuisine) food +- is there a restaurant that has [british](cuisine) food +- im looking for a restaurant in the [east](location) part of town that serves [traditional](cuisine) food +- [japanese](cuisine) +- [italian](cuisine) +- [hungarian](cuisine) food +- in the [south](location) part of town +- un [unusual](cuisine) food +- im looking for an [italian](cuisine) restaurant in the [east](location) part of town +- [polynesian](cuisine) +- [christmas](cuisine) food +- [korean](cuisine) +- im looking for a [moderately](price:moderate) priced restaurant serving [fusion](cuisine) food +- looking for a [moderately](price:moderate) priced restaurant that serves [unusual](cuisine) food +- is there anything in the [cheap](price) price range +- the [east](location) +- oh i need to be in the [north](location) +- how about [turkish](cuisine) food +- i want a restaurant in the [north](location) part of town that serves [vietnamese](cuisine) food +- actually i would prefer in [bombay](location) +- how about [italian](cuisine) type of food +- im looking for a [moderately](price:moderate) priced restaurant and it should serve [polynesian](cuisine) food +- [polish](cuisine) food +- i want to find a [moderately](price:moderate) priced restaurant in the [east](location) part town +- im looking for a restaurant in the [west](location) part of town that serves canape food +- looking for a [cheap](price) restaurant that serves [creative](cuisine) food +- im looking for a restaurant in the [east](location) part of the town with [indian](cuisine) asian food +- [thai](cuisine) +- how about [persian](cuisine) food +- im looking for a [moderately](price:moderate) priced restaurant that serves [tuscan](cuisine) food +- [cheap](price) restaurant +- how about [british](cuisine) type food +- [west](location) of town +- what about [vietnamese](cuisine) type of food +- any kind of food id like a [cheap](price) restaurant +- i would like [steakhouse](cuisine) food +- [polish](cuisine) +- how about [modern european](cuisine) food +- like to find a restaurant in the [east](location) part of town and it should serve [indian](cuisine) food +- what about [expensive](price) +- ok what about [indian](cuisine) +- [moderately](price:moderate) priced restaurant in the [west](location) part of town +- [south](location) [expensive](price) +- im looking for a restaurant in the [east](location) part of town +- noise um in the [east](location) part of town +- how about [gastropub](cuisine) type of food +- uh what about [portuguese](cuisine) food +- [expensive](price) restaurant in the [south](location) part of town +- what about [vietnamese](cuisine) food +- i want to find a restaurant that serves [world](cuisine) food +- [moderate](price) price range please +- im looking for [moderately](price:moderate) priced restaurant serving [austrian](cuisine) food +- i am looking for a restaurant serving [afghan](cuisine) food +- i would like a restaurant that serves [korean](cuisine) food +- restaurant in the [north](location) part of town that serves [hungarian](cuisine) food +- the [south](location) +- how about [modern european](cuisine) +- i want to find a restaurant in the center and it should serve [lebanese](cuisine) food +- [chinese](cuisine) +- im looking a restaurant in the [east](location) part of town +- im looking for a [cheap](price) restaurant with [spanish](cuisine) food +- [greek](cuisine) +- [north](location) part of town serving [gastropub](cuisine) food +- is there one that serves [indian](cuisine) food +- [unusual](cuisine) food +- im looking for a [cheap](price) restaurant in the [west](location) part of town +- im looking for a restaurant that serves [polynesian](cuisine) food +- [moderately](price:moderate) restaurant +- what about [asian oriental](cuisine) +- [cheap](price) restaurant [north](location) part of town +- iam looking for an [expensive](price) restaurant and it should be in the [south](location) part of town +- looking for a [japanese](cuisine) restaurant in the center +- what about [portuguese](cuisine) food +- fancy restaurant [moroccan](cuisine) food +- what about [british](cuisine) food +- [indian](cuisine) +- what about [indian](cuisine) +- [moderately](price:moderate) +- i need a restaurant in the center of town that includes [international](cuisine) food +- im looking for an [expensive](price) restaurant and it should be [east](location) part of town +- [hungarian](cuisine) +- the [south](location) part +- how about an [indian](cuisine) restaurant in the north part of town +- okay how about a [gastropub](cuisine) +- how about [indian](cuisine) type food +- an [expensive](price) restaurant +- [world](cuisine) +- [cheap](price) restaurant [east](location) part of town +- the [east](location) part of town +- im looking for a [moderately](price:moderate) priced restaurant that serves [european](cuisine) food +- [crossover](cuisine) food +- im looking for a [moderately](price:moderate) priced restaurant +- i need a [moderately](price:moderate) priced restaurant in the [south](location) part of town +- [expensive](price) european food +- uh [indian](cuisine) +- im looking for something [moderately](price:moderate) priced +- what about [international](cuisine) food +- um in the [south](location) part of town and its [cheap](price) +- i would like to find a restaurant in the center and it should serve [korean](cuisine) food +- dont care [expensive](price) +- im looking for [moderately](price:moderate) priced restaurant and it should serve [halal](cuisine) food +- system [european](cuisine) food +- i would like [european](cuisine) food +- how about [korean](cuisine) foo +- [thai](cuisine) type food +- i want to find a [cheap](price) restaurant and it should be in the [east](location) part of town +- a [moderately](price:moderate) priced restaurant in the [south](location) part of town +- what about [modern european](cuisine) type food +- im looking for a restaurant in the center part of town that serves [european](cuisine) food +- [moderately](price:moderate) priced restaurant that serves [creative](cuisine) food +- im looking for an [expensive](price) restaurant in the [east](location) part of town +- [moderately](price:moderate) priced restaurant serving [indian](cuisine) food +- [tuscan](cuisine) food [south](location) part of town +- [chinese](cuisine) food +- i need [indian](cuisine) food +- may i have a table in a [moderate](price:mid) price range with [spanish](cuisine) food in [bombay](location) for [two](people:2) people +- looking for an [expensive](price) restaurant that serves [indonesian](cuisine) food +- looking for something on the [south](location) side +- id like to find a restaurant in the [north](location) part of town that serves [german](cuisine) food +- im looking for a restaurant in any area that serves [bistro](cuisine) food +- can i have [greek](cuisine) food +- [vietnamese](cuisine) +- [portuguese](cuisine) food +- [lebanese](cuisine) food +- noise looking for an [expensive](price) restaurant +- i need a [moderately](price:moderate) priced restaurant serving [fusion](cuisine) food +- can i find a restaurant that serves [international](cuisine) food +- i want to find a [moderately](price:moderate) priced restaurant +- how about [spanish](cuisine) types of food +- [caribbean](cuisine) food +- what about a restaurant that serves [chinese](cuisine) food +- im looking for a restaurant serving [asian oriental](cuisine) food +- can you make a restaurant reservation with [italian](cuisine) food for [eight](people:8) in [bombay](location) in a [expensive](price) price range +- im looking for an expensive restaurant and it should serve [international](cuisine) food +- im looking for a restaurant that serves [swiss](cuisine) food +- [expensive](price) restaurant [welsh](cuisine) food +- im looking for an [expensive](price) restaurant in the [south](location) part of town +- im looking for a restaurant in the [west](location) park of town that serves [australian](cuisine) food +- [moderately](price:moderate) pri +- i want to find a restaurant in the center that serves [lebanese](cuisine) food +- i need a [moderate](price) priced restaurant in the [north](location) part of town +- im looking for an [expensive](price) restaurant in the [east](location) of town +- hi im looking for an restaurant in the center that serves [korean](cuisine) food +- [thai](cuisine) food +- can you make a restaurant reservation in a [cheap](price:lo) price range in [london](location) with [spanish](cuisine) food for [eight](people:8) people +- [east](location) of town +- [cheap](price) restaurant in the [south](location) part of town +- could i have a [cheap](price) restaurant in the [east](location) part of town +- [international](cuisine) +- uh id like [steakhouse](cuisine) food +- how about [korean](cuisine) type food +- i want [expensive](price) food in the [east](location) part of town +- i'd like to book a table in a [cheap](price:lo) price range for [six](people:6) people with [spanish](cuisine) cuisine in [madrid](location) +- could i have a [moderately](price:moderate) priced restaurant in the [south](location) part of town +- for a restaurant in any area with [international](cuisine) food +- what about [modern european](cuisine) +- could i have a [cheap](price) restaurant +- im looking for a [cheap](price) restaurant in the [east](location) part of town +- [english](cuisine) food +- i would like a [cheap](price) restaurant +- im looking for a [cheap](price) restaurant that serves [german](cuisine) food +- [moderately](price:moderate) priced restaurant +- how about [portuguese](cuisine) +- im looking for something [expensive](price) +- how about [french](cuisine) food +- what about a [chinese](cuisine) restaurant in the north of town +- noise ah [gastropub](cuisine) food +- [jamaican](cuisine) +- [expensive](price) restaurant serving [portuguese](cuisine) food +- im looking for [portuguese](cuisine) food +- [catalan](cuisine) +- how about [turkish](cuisine) +- i need [cheap](price) [hungarian](cuisine) restaurant +- id like a [cheap](price) restaurant in the [north](location) part of town +- i want a [moderate](price) priced restaurant in the [south](location) of town +- a restaurant [cheap](price) [north](location) part of town +- for [six](people:6) please +- i need a [moderately](price:moderate) priced restaurant that serves [world](cuisine) food +- id like to find a [cheap](price) restaurant in the [west](location) part of town +- find a [cheap](price) restaurant +- [expensive](price) european +- id like a [moderately](price:moderate) priced restaurant that serves [cuban](cuisine) food please +- in the [north](location) part of town +- [turkish](cuisine) type of food +- im looking for a restaurant in any area that serves [welsh](cuisine) food +- [malaysian](cuisine) food +- how bout [chinese](cuisine) food +- [expensive](price) restaurants +- [moderately](price:moderate) priced in the [north](location) part of town +- the [east](location) part +- [cheap](price) restaurant [south](location) part of town +- [swiss](cuisine) +- how about [indian](cuisine) +- i want a restaurant in the [east](location) part of town that serves [singaporean](cuisine) food +- im looking for an [expensive](price) restaurant that serves signaporean food +- what about [korean](cuisine) food +- im looking for a restaurant in the [north](location) part of town that serves [african](cuisine) food +- [moderate](price) +- im looking for a [moderately](price:moderate) priced restaurant in the [north](location) part of town +- restaurant in the [west](location) part of town that serves [cuban](cuisine) food +- [european](cuisine) food +- can i get a restaurant with [vegetarian](cuisine) food +- i would like to find an [expensive](price) restaurant that serves [corsica](cuisine) food +- im looking for a [moderately](price:moderate) priced restaurant that serves [traditional](cuisine) food +- im looking for a [moderately](price:moderate) priced restaurant in the [south](location) of town +- [moderately](price:moderate) priced restaurant serving [moroccan](cuisine) food +- i am looking for a restaurant in the [south](location) part of town and it should serve [cantonese](cuisine) food +- uh [cheap](price) restaurant +- [moderately](price:moderate) priced in the [west](location) +- [indian](cuisine) type of food +- i would like a [cheap](price) restaurant in the [west](location) part of town +- i want to find a [cheap](price) restaurant +- uh a [cheap](price) restaurant in the [east](location) part of town +- im looking for a restaurant in the [north](location) part of town serving [indian](cuisine) food +- [moderately](price:moderate) priced restaurant that serves [thai](cuisine) food +- im looking for a [moderately](price:moderate) priced restaurant in the [west](location) part of town +- im looking for a restaurant in the [east](location) part of town that serves [afghan](cuisine) food +- [expensive](price) restaurant in the [east](location) part of town +- im looking for a [moroccan](cuisine) restaurant in the center of town +- im looking for a [moderately](price:moderate) priced restaurant in the [south](location) part of town +- [british](cuisine) expensive +- how about [cheap](price) +- in the [west](location) part of town +- in [cheap](price) restaurant +- i need a [cheap](price) restaurant in the [south](location) part of town +- in a [moderate](price:mid) price range please +- [belgian](cuisine) +- im looking for a [moderately](price:moderate) priced restaurant and it should be in the [north](location) of town +- hi im looking for a [cheap](price) restaurant in the [south](location) part of town +- [north american](cuisine) food +- how about [moderately](price:moderate) priced thai food +- restaurant in any area [international](cuisine) food +- [asian oriental](cuisine) type of food +- i want a [british](cuisine) restaurant in the [east](location) part of town +- [international](cuisine) food +- im looking for a restaurant in the center that serves [caribbean](cuisine) food +- [expensive](price) restaurant in the [east](location) +- i want [christmas](cuisine) food +- what about [french](cuisine) food +- [swedish](cuisine) food +- restaurant in the [south](location) part of town +- im looking for a restaurant that serves [gastropub](cuisine) food any price range +- im looking for a restaurant in the [south](location) part of town +- im looking for a restaurant in the [east](location) part of town thats [expensive](price) +- how about [vietnamese](cuisine) food +- with [british](cuisine) food +- id like an [expensive](price) restaurant +- [moderate](price) priced restaurant in the [north](location) part of town +- im looking for an [expensive](price) restaurant and it should be served [international](cuisine) food +- that serves [corsica](cuisine) +- im looking for a restaurant in the [north](location) part of town serving [malaysian](cuisine) food +- i need to find a restaurant in the [north](location) part of town that serves [jamaican](cuisine) food +- um im looking for a restaurant in the center part of town that serves [lebanese](cuisine) food +- what [asian oriental](cuisine) type of food +- looking for a [cheap](price) restaurant in the [east](location) part of town +- [cheap](price) [jamaican](cuisine) +- how about [asian oriental](cuisine) +- i need a [moderately](price:moderate) priced restaurant that serves bask food +- noise looking for an [expensive](price) restaurant in the [south](location) part of town +- [west](location) side +- looking for [afghan](cuisine) good +- im looking for a restaurant that serves [danish](cuisine) food +- yea i would like [korean](cuisine) food +- im looking for a restaurant in the [west](location) part of town that serves [jamaican](cuisine) food +- im looking for a restaurant in central it should serve [japanese](cuisine) food +- im looking for a [moderately](price:moderate) priced restaurant that serves [vietnamese](cuisine) food +- restaurant in the [west](location) part of town that serves airitran food +- [british](cuisine) food +- price over food [west](location) part of town +- restaurant [moderate](price) price +- in the [east](location) part of town +- im looking for an [expensive](price) restaurant and it should be the [east](location) part of town +- looking for a [cheap](price) restaurant in the [west](location) part of town +- i want a restaurant in the center that serves [seafood](cuisine) +- how about a restaurant in the east part of town that serves [indian](cuisine) food +- the [north](location) +- i would like [australian](cuisine) foo +- im looking for an [expensive](price) restaurant that serves [unusual](cuisine) food +- [mediterranean](cuisine) +- im looking for a [cheap](price) restaurant in the [south](location) part of town +- how about [chinese](cuisine) +- instead could it be with [french](cuisine) food +- [south](location) part of town please +- im looking for a [malaysian](cuisine) restaurant in the [north](location) part of town +- im looking for a [moderately](price:moderate) priced restaurant uh serving [halal](cuisine) food +- [cuban](cuisine) food +- looking for [moderately](price:moderate) priced [russian](cuisine) food +- id like a restaurant in the [south](location) part of town +- [moderately](price:moderate) priced restaurant in the [east](location) part of town +- im looking for a restaurant in any area that serves [russian](cuisine) food +- serving [modern european](cuisine) food +- how about [asian oriental](cuisine) type of food +- i want to find a [moderately](price:moderate) priced restaurant that serves [cuban](cuisine) food +- restaurant [east](location) +- [indian](cuisine) food +- a restaurant [south](location) part of town +- i want a [moderately](price:moderate) priced restaurant in the [north](location) part of town +- [expensive](price) restaurant [south](location) part of town +- how about [thai](cuisine) food +- [moderate](price) price +- [bistro](cuisine) +- im looking for a [expensive](price) restaurant in the [east](location) part of town +- i need a [cuban](cuisine) restaurant that is [moderately](price:moderate) priced +- i want to find a [moderately](price:moderate) priced restaurant and it should serve asian food +- what about [north american](cuisine) type of food +- [moderately](price:moderate) priced +- id like a restaurant in the [north](location) part of town that serves cross over food +- i want an [expensive](price) restaurant that serves sea food +- im looking for a restaurant that serves [bistro](cuisine) food +- [cheap](price) restaurants +- im looking for a [cheap](price) restaurant +- i want a restaurant in the [west](location) part of town that serves [australian](cuisine) food +- im looking for a restaurant in the [north](location) part of town serving [lebanese](cuisine) food +- [singaporean](cuisine) +- [cheap](price) [italian](cuisine) food +- noise restaurant [west](location) part of town [danish](cuisine) food +- [british](cuisine) +- im looking for a restaurant that serves [afghan](cuisine) food +- what about [european](cuisine) food +- its a restaurant in the south of town that serves [italian](cuisine) food +- i need a restaurant serving [corsica](cuisine) food +- something serving [swiss](cuisine) food +- im looking for a [korean](cuisine) restaurant in the [expensive](price) price range +- um an [expensive](price) +- i want a restaurant in the [moderate](price) price range +- breath im looking for a restaurant that serves [cuban](cuisine) food +- i want to find a restaurant in the [north](location) part of town +- [gastropub](cuisine) food +- i am looking for an [expensive](price) restaurant that serves +- [north](location) north part of town +- a [cheap](price) restaurant in the [south](location) part of town +- [cheap](price) +- [expensive](price) restaurant +- [scottish](cuisine) +- [fusion](cuisine) food +- id like to find a restaurant that serves [afghan](cuisine) food +- uh i want [cantonese](cuisine) food +- i would like a [moderately](price:moderate) priced restaurant in the [west](location) part of town +- im looking for an [expensive](price) restaurant that serves [greek](cuisine) food +- id like an [expensive](price) restaurant that serves bat food +- in the [east](location) part +- can you book a table in [rome](location) in a [moderate](price:mid) price range with [british](cuisine) food for [four](people:4) people +- [cheap](price) restaurant serving unintelligible food +- in the [west](location) +- [creative](cuisine) food +- im looking for a restaurant in the [east](location) part of town serving [japanese](cuisine) food +- im looking for a restaurant in the [north](location) part of town serving [jamaican](cuisine) food +- what about a [spanish](cuisine) restuarant +- im looking for a restaurant in any area that serves [polynesian](cuisine) food +- i want to find an [expensive](price) restaurant that serves [swedish](cuisine) food +- [european](cuisine) food any price +- with [french](cuisine) cuisine +- uh are there any that serves [mediterranean](cuisine) +- [cheap](price) restaurant that serves [german](cuisine) food +- i want a [moderately](price:moderate) priced restaurant that serves [mediterranean](cuisine) food +- [african](cuisine) food +- im looking for a restaurant in the [south](location) part of town serving [korean](cuisine) food +- i want to find a [expensive](price) restaurant in the [south](location) part of town +- i want a [moderately](price:moderate) priced +- [canapes](cuisine) food +- ok how about [chinese](cuisine) food +- i need a restaurant in the center of town that serves [spanish](cuisine) food +- uh [world](cuisine) food +- i need a [cheap](price) restaurant +- im looking for [thai](cuisine) + +## intent:request_info +- do you have their [address](info) +- do you have its [phone number](info) +- can i have their [phone number](info) +- what is the [phone number](info) of the restaurant +- what is their [address](info) +- may i have the [address](info) of the restaurant +- whats their [address](info) +- do you have their [phone number](info) +- give me their [phone number](info) +- whats their [phone number](info) +- do you have its [address](info) +- may i have the [phone number](info) of the restaurant +- what is their [phone number](info) +- give me their [address](info) +- can i have their [address](info) +- what is the [address](info) of the restaurant + +## intent:thankyou +- um thank you good bye +- okay cool uh good bye thank you +- okay thank you good bye +- you rock +- and thats all thank you and good bye +- thank you and good bye +- sorry about my mistakes thank you good bye +- noise thank you good bye +- thank you goodbye noise +- okay thank you goodbye +- uh thank you good bye +- thank you goodbye +- thank you goodbye noise thank you goodbye +- breath thank you goodbye +- thank you +- okay thank you +- thanks goodbye +- ah thank you goodbye +- thank you noise +- thank you good bye +- breath thank you very much goodbye +- thanks +- noise thank you goodbye +- unintelligible thank you goodbye +- uh okay thank you good bye +- thank you bye +- um okay thank you good bye diff --git a/rasa_core/actions/action.py b/rasa_core/actions/action.py index cd95c09492e..231b5e73bbf 100644 --- a/rasa_core/actions/action.py +++ b/rasa_core/actions/action.py @@ -10,7 +10,9 @@ from typing import List, Text, Optional, Dict, Any from rasa_core import events -from rasa_core.constants import DOCS_BASE_URL, DEFAULT_REQUEST_TIMEOUT +from rasa_core.constants import (DOCS_BASE_URL, + DEFAULT_REQUEST_TIMEOUT, + REQUESTED_SLOT) from rasa_core.utils import EndpointConfig if typing.TYPE_CHECKING: @@ -27,11 +29,14 @@ ACTION_DEFAULT_FALLBACK_NAME = "action_default_fallback" +ACTION_DEACTIVATE_FORM_NAME = "action_deactivate_form" + def default_actions(): # type: () -> List[Action] """List default actions.""" - return [ActionListen(), ActionRestart(), ActionDefaultFallback()] + return [ActionListen(), ActionRestart(), + ActionDefaultFallback(), ActionDeactivateForm()] def default_action_names(): @@ -193,6 +198,17 @@ def run(self, dispatcher, tracker, domain): return [UserUtteranceReverted()] +class ActionDeactivateForm(Action): + """Deactivates a form""" + + def name(self): + return ACTION_DEACTIVATE_FORM_NAME + + def run(self, dispatcher, tracker, domain): + from rasa_core.events import Form, SlotSet + return [Form(None), SlotSet(REQUESTED_SLOT, None)] + + class RemoteAction(Action): def __init__(self, name, action_endpoint): # type: (Text, Optional[EndpointConfig]) -> None @@ -309,9 +325,18 @@ def run(self, dispatcher, tracker, domain): "".format(self.name())) response = self.action_endpoint.request( json=json, method="post", timeout=DEFAULT_REQUEST_TIMEOUT) + + if response.status_code == 400: + response_data = response.json() + exception = ActionExecutionRejection( + response_data["action_name"], + response_data.get("error") + ) + logger.debug(exception.message) + raise exception + response.raise_for_status() response_data = response.json() - self._validate_action_result(response_data) except requests.exceptions.ConnectionError as e: @@ -343,3 +368,17 @@ def run(self, dispatcher, tracker, domain): def name(self): return self._name + + +class ActionExecutionRejection(Exception): + """Raising this exception will allow other policies + to predict a different action""" + + def __init__(self, action_name, message=None): + self.action_name = action_name + self.message = (message or + "Custom action '{}' rejected to run" + "".format(action_name)) + + def __str__(self): + return self.message diff --git a/rasa_core/agent.py b/rasa_core/agent.py index 87d25b521a9..5d32746469b 100644 --- a/rasa_core/agent.py +++ b/rasa_core/agent.py @@ -24,11 +24,11 @@ from rasa_core.channels import UserMessage, OutputChannel, InputChannel from rasa_core.constants import DEFAULT_REQUEST_TIMEOUT from rasa_core.dispatcher import Dispatcher -from rasa_core.domain import Domain, check_domain_sanity +from rasa_core.domain import Domain, check_domain_sanity, InvalidDomain from rasa_core.exceptions import AgentNotReady from rasa_core.interpreter import NaturalLanguageInterpreter from rasa_core.nlg import NaturalLanguageGenerator -from rasa_core.policies import Policy +from rasa_core.policies import Policy, FormPolicy from rasa_core.policies.ensemble import SimplePolicyEnsemble, PolicyEnsemble from rasa_core.policies.memoization import MemoizationPolicy from rasa_core.processor import MessageProcessor @@ -196,7 +196,14 @@ def __init__( ): # Initializing variables with the passed parameters. self.domain = self._create_domain(domain) + if self.domain: + self.domain.add_requested_slot() self.policy_ensemble = self._create_ensemble(policies) + if self._form_policy_not_present(): + raise InvalidDomain( + "You have defined a form action, but haven't added the " + "FormPolicy to your policy ensemble." + ) if not isinstance(interpreter, NaturalLanguageInterpreter): if interpreter is not None: @@ -333,7 +340,9 @@ def execute_action( self, sender_id, # type: Text action, # type: Text - output_channel # type: OutputChannel + output_channel, # type: OutputChannel + policy, # type: Text + confidence # type: float ): # type: (...) -> DialogueStateTracker """Handle a single message.""" @@ -342,7 +351,8 @@ def execute_action( dispatcher = Dispatcher(sender_id, output_channel, self.nlg) - return processor.execute_action(sender_id, action, dispatcher) + return processor.execute_action(sender_id, action, dispatcher, policy, + confidence) def handle_text( self, @@ -667,3 +677,12 @@ def _create_ensemble( "Invalid param `policies`. Passed object is " "of type '{}', but should be policy, an array of " "policies, or a policy ensemble".format(passed_type)) + + def _form_policy_not_present(self): + # type: () -> bool + """Check whether form policy is not present + if there is a form action in the domain + """ + return (self.domain and self.domain.form_names and + not any(isinstance(p, FormPolicy) + for p in self.policy_ensemble.policies)) diff --git a/rasa_core/constants.py b/rasa_core/constants.py index 3c151291775..3ec25e1ea69 100644 --- a/rasa_core/constants.py +++ b/rasa_core/constants.py @@ -23,6 +23,10 @@ FALLBACK_SCORE = 1.1 +FORM_SCORE = 1.2 + +REQUESTED_SLOT = 'requested_slot' + # start of special user message section INTENT_MESSAGE_PREFIX = "/" diff --git a/rasa_core/domain.py b/rasa_core/domain.py index ded2a3fcf1f..ef8dbddb474 100644 --- a/rasa_core/domain.py +++ b/rasa_core/domain.py @@ -20,13 +20,20 @@ from rasa_core import utils from rasa_core.actions import Action, action -from rasa_core.slots import Slot +from rasa_core.slots import Slot, UnfeaturizedSlot from rasa_core.trackers import DialogueStateTracker, SlotSet from rasa_core.utils import read_file, read_yaml_string, EndpointConfig +from rasa_core.constants import REQUESTED_SLOT logger = logging.getLogger(__name__) PREV_PREFIX = 'prev_' +ACTIVE_FORM_PREFIX = 'active_form_' + + +class InvalidDomain(Exception): + """Exception that can be raised when domain is not valid.""" + pass def check_domain_sanity(domain): @@ -67,11 +74,11 @@ def get_exception_message(duplicates): duplicate_intents or \ duplicate_slots or \ duplicate_entities: - raise Exception(get_exception_message([ - (duplicate_actions, "actions"), - (duplicate_intents, "intents"), - (duplicate_slots, "slots"), - (duplicate_entities, "entities")])) + raise InvalidDomain(get_exception_message([ + (duplicate_actions, "actions"), + (duplicate_intents, "intents"), + (duplicate_slots, "slots"), + (duplicate_entities, "entities")])) class Domain(object): @@ -107,6 +114,7 @@ def from_dict(cls, data): slots, utter_templates, data.get("actions", []), + data.get("forms", []), **additional_arguments ) @@ -126,10 +134,10 @@ def validate_domain_yaml(cls, yaml): try: c.validate(raise_exception=True) except SchemaError: - raise ValueError("Failed to validate your domain yaml. " - "Make sure the file is correct, to do so" - "take a look at the errors logged during " - "validation previous to this exception. ") + raise InvalidDomain("Failed to validate your domain yaml. " + "Make sure the file is correct, to do so" + "take a look at the errors logged during " + "validation previous to this exception. ") @staticmethod def collect_slots(slot_dict): @@ -157,8 +165,8 @@ def collect_intent_properties(intent_list): @staticmethod def collect_templates(yml_templates): # type: (Dict[Text, List[Any]]) -> Dict[Text, List[Dict[Text, Any]]] - """Go through the templates and make sure they are all in dict format""" - + """Go through the templates and make sure they are all in dict format + """ templates = {} for template_key, template_variations in yml_templates.items(): validated_variations = [] @@ -168,9 +176,9 @@ def collect_templates(yml_templates): if isinstance(t, string_types): validated_variations.append({"text": t}) elif "text" not in t: - raise Exception("Utter template '{}' needs to contain" - "'- text: ' attribute to be a proper" - "template".format(template_key)) + raise InvalidDomain("Utter template '{}' needs to contain" + "'- text: ' attribute to be a proper" + "template".format(template_key)) else: validated_variations.append(t) templates[template_key] = validated_variations @@ -182,6 +190,7 @@ def __init__(self, slots, # type: List[Slot] templates, # type: Dict[Text, Any] action_names, # type: List[Text] + form_names, # type: List[Text] store_entities_as_slots=True, # type: bool restart_intent="restart" # type: Text ): @@ -189,20 +198,26 @@ def __init__(self, self.intent_properties = intent_properties self.entities = entities + self.form_names = form_names self.slots = slots self.templates = templates # only includes custom actions and utterance actions self.user_actions = action_names - # includes all actions (custom, utterance, and default actions) + # includes all actions (custom, utterance, default actions and forms) self.action_names = action.combine_user_with_default_actions( - action_names) - + action_names) + form_names self.store_entities_as_slots = store_entities_as_slots self.restart_intent = restart_intent action.ensure_action_name_uniqueness(self.action_names) + @utils.lazyproperty + def user_actions_and_forms(self): + """Returns combination of user actions and forms""" + + return self.user_actions + self.form_names + @utils.lazyproperty def num_actions(self): """Returns the number of available actions.""" @@ -216,6 +231,11 @@ def num_states(self): return len(self.input_states) + def add_requested_slot(self): + if self.form_names and REQUESTED_SLOT not in [s.name for + s in self.slots]: + self.slots.append(UnfeaturizedSlot(REQUESTED_SLOT)) + def action_for_name(self, action_name, action_endpoint): # type: (Text, Optional[EndpointConfig]) -> Optional[Action] """Looks up which action corresponds to this action name.""" @@ -225,7 +245,7 @@ def action_for_name(self, action_name, action_endpoint): return action.action_from_name(action_name, action_endpoint, - self.user_actions) + self.user_actions_and_forms) def action_for_index(self, index, action_endpoint): # type: (int, Optional[EndpointConfig]) -> Optional[Action] @@ -234,10 +254,11 @@ def action_for_index(self, index, action_endpoint): This method resolves the index to the actions name.""" if self.num_actions <= index or index < 0: - raise Exception( + raise IndexError( "Can not access action at index {}. " "Domain has {} actions.".format(index, self.num_actions)) - return self.action_for_name(self.action_names[index], action_endpoint) + return self.action_for_name(self.action_names[index], + action_endpoint) def actions(self, action_endpoint): return [self.action_for_name(name, action_endpoint) @@ -255,10 +276,11 @@ def index_for_action(self, action_name): def _raise_action_not_found_exception(self, action_name): action_names = "\n".join(["\t - {}".format(a) for a in self.action_names]) - raise Exception( + raise NameError( "Can not access action '{}', " "as that name is not a registered action for this domain. " - "Available actions are: \n{}".format(action_name, action_names)) + "Available actions are: \n{}" + "".format(action_name, action_names)) def random_template_for(self, utter_action): if utter_action in self.templates: @@ -302,6 +324,12 @@ def entity_states(self): return ["entity_{0}".format(e) for e in self.entities] + # noinspection PyTypeChecker + @utils.lazyproperty + def form_states(self): + # type: () -> List[Text] + return ["active_form_{0}".format(f) for f in self.form_names] + def index_of_state(self, state_name): # type: (Text) -> Optional[int] """Provides the index of a state.""" @@ -323,7 +351,8 @@ def input_states(self): self.intent_states + \ self.entity_states + \ self.slot_states + \ - self.prev_action_states + self.prev_action_states + \ + self.form_states def get_parsing_states(self, tracker): # type: (DialogueStateTracker) -> Dict[Text, float] @@ -348,17 +377,18 @@ def get_parsing_states(self, tracker): slot_id = "slot_{}_{}".format(key, i) state_dict[slot_id] = slot_value - latest_msg = tracker.latest_message + latest_message = tracker.latest_message - if "intent_ranking" in latest_msg.parse_data: - for intent in latest_msg.parse_data["intent_ranking"]: + if "intent_ranking" in latest_message.parse_data: + for intent in latest_message.parse_data["intent_ranking"]: if intent.get("name"): intent_id = "intent_{}".format(intent["name"]) state_dict[intent_id] = intent["confidence"] - elif latest_msg.intent.get("name"): - intent_id = "intent_{}".format(latest_msg.intent["name"]) - state_dict[intent_id] = latest_msg.intent.get("confidence", 1.0) + elif latest_message.intent.get("name"): + intent_id = "intent_{}".format(latest_message.intent["name"]) + state_dict[intent_id] = latest_message.intent.get("confidence", + 1.0) return state_dict @@ -383,11 +413,22 @@ def get_prev_action_states(self, tracker): else: return {} + @staticmethod + def get_active_form(tracker): + # type: (DialogueStateTracker) -> Dict[Text, float] + """Turns tracker's active form into a state name.""" + form = tracker.active_form.get('name') + if form is not None: + return {ACTIVE_FORM_PREFIX + form: 1.0} + else: + return {} + def get_active_states(self, tracker): # type: (DialogueStateTracker) -> Dict[Text, float] """Return a bag of active states from the tracker state""" state_dict = self.get_parsing_states(tracker) state_dict.update(self.get_prev_action_states(tracker)) + state_dict.update(self.get_active_form(tracker)) return state_dict def states_for_tracker_history(self, tracker): @@ -400,15 +441,17 @@ def slots_for_entities(self, entities): if self.store_entities_as_slots: slot_events = [] for s in self.slots: - matching_entities = [e['value'] - for e in entities - if e['entity'] == s.name] - if matching_entities: - if s.type_name == 'list': - slot_events.append(SlotSet(s.name, matching_entities)) - else: - slot_events.append(SlotSet(s.name, - matching_entities[-1])) + if s.auto_fill: + matching_entities = [e['value'] + for e in entities + if e['entity'] == s.name] + if matching_entities: + if s.type_name == 'list': + slot_events.append(SlotSet(s.name, + matching_entities)) + else: + slot_events.append(SlotSet(s.name, + matching_entities[-1])) return slot_events else: return [] @@ -446,7 +489,7 @@ def compare_with_specification(self, path): if states != self.input_states: missing = ",".join(set(states) - set(self.input_states)) additional = ",".join(set(self.input_states) - set(states)) - raise Exception( + raise InvalidDomain( "Domain specification has changed. " "You MUST retrain the policy. " + "Detected mismatch in domain specification. " + @@ -470,6 +513,7 @@ def as_dict(self): "slots": self._slot_definitions(), "templates": self.templates, "actions": self.user_actions, # class names of the actions + "forms": self.form_names } def persist(self, filename): diff --git a/rasa_core/events/__init__.py b/rasa_core/events/__init__.py index b527ab3302d..c75877e3174 100644 --- a/rasa_core/events/__init__.py +++ b/rasa_core/events/__init__.py @@ -768,7 +768,7 @@ def as_dict(self): def apply_to(self, tracker): # type: (DialogueStateTracker) -> None - tracker.latest_action_name = self.action_name + tracker.set_latest_action_name(self.action_name) tracker.clear_followup_action() @@ -828,3 +828,135 @@ def _from_parameters(cls, parameters): except KeyError as e: raise ValueError("Failed to parse agent uttered event. " "{}".format(e)) + + +class Form(Event): + """If `name` is not None: activates a form with `name` + else deactivates active form + """ + type_name = "form" + + def __init__(self, name, timestamp=None): + self.name = name + super(Form, self).__init__(timestamp) + + def __str__(self): + return "Form({})".format(self.name) + + def __hash__(self): + return hash(self.name) + + def __eq__(self, other): + if not isinstance(other, Form): + return False + else: + return self.name == other.name + + def as_story_string(self): + props = json.dumps({"name": self.name}) + return "{name}{props}".format(name=self.type_name, props=props) + + @classmethod + def _from_story_string(cls, parameters): + """Called to convert a parsed story line into an event.""" + return [Form(parameters.get("name"), + parameters.get("timestamp"))] + + def as_dict(self): + d = super(Form, self).as_dict() + d.update({"name": self.name}) + return d + + def apply_to(self, tracker): + # type: (DialogueStateTracker) -> None + tracker.change_form_to(self.name) + + +class FormValidation(Event): + """Event added by FormPolicy to notify form action + whether or not to validate the user input""" + + type_name = "form_validation" + + def __init__(self, + validate, + timestamp=None): + self.validate = validate + super(FormValidation, self).__init__(timestamp) + + def __str__(self): + return "FormValidation({})".format(self.validate) + + def __hash__(self): + return hash(self.validate) + + def __eq__(self, other): + return isinstance(other, FormValidation) + + def as_story_string(self): + return None + + @classmethod + def _from_parameters(cls, parameters): + return FormValidation(parameters.get("validate"), + parameters.get("timestamp")) + + def as_dict(self): + d = super(FormValidation, self).as_dict() + d.update({"validate": self.validate}) + return d + + def apply_to(self, tracker): + # type: (DialogueStateTracker) -> None + tracker.set_form_validation(self.validate) + + +class ActionExecutionRejected(Event): + """Notify Core that the execution of the action has been rejected""" + + type_name = 'action_execution_rejected' + + def __init__(self, + action_name, + policy=None, + confidence=None, + timestamp=None): + self.action_name = action_name + self.policy = policy + self.confidence = confidence + super(ActionExecutionRejected, self).__init__(timestamp) + + def __str__(self): + return ("ActionExecutionRejected(" + "action: {}, policy: {}, confidence: {})" + "".format(self.action_name, self.policy, self.confidence)) + + def __hash__(self): + return hash(self.action_name) + + def __eq__(self, other): + if not isinstance(other, ActionExecutionRejected): + return False + else: + return self.action_name == other.action_name + + @classmethod + def _from_parameters(cls, parameters): + return ActionExecutionRejected(parameters.get("name"), + parameters.get("policy"), + parameters.get("confidence"), + parameters.get("timestamp")) + + def as_story_string(self): + return None + + def as_dict(self): + d = super(ActionExecutionRejected, self).as_dict() + d.update({"name": self.action_name, + "policy": self.policy, + "confidence": self.confidence}) + return d + + def apply_to(self, tracker): + # type: (DialogueStateTracker) -> None + tracker.reject_action(self.action_name) diff --git a/rasa_core/policies/__init__.py b/rasa_core/policies/__init__.py index dace34770d6..fe4d262910a 100644 --- a/rasa_core/policies/__init__.py +++ b/rasa_core/policies/__init__.py @@ -10,3 +10,4 @@ from rasa_core.policies.memoization import ( MemoizationPolicy, AugmentedMemoizationPolicy) from rasa_core.policies.sklearn_policy import SklearnPolicy +from rasa_core.policies.form_policy import FormPolicy diff --git a/rasa_core/policies/ensemble.py b/rasa_core/policies/ensemble.py index 14209afa217..6b872496a30 100644 --- a/rasa_core/policies/ensemble.py +++ b/rasa_core/policies/ensemble.py @@ -3,8 +3,6 @@ from __future__ import print_function from __future__ import unicode_literals -import importlib -import io import json import logging import os @@ -22,7 +20,7 @@ from rasa_core.constants import ( DEFAULT_NLU_FALLBACK_THRESHOLD, DEFAULT_CORE_FALLBACK_THRESHOLD, DEFAULT_FALLBACK_ACTION) -from rasa_core.events import SlotSet, ActionExecuted +from rasa_core.events import SlotSet, ActionExecuted, ActionExecutionRejected from rasa_core.exceptions import UnsupportedDialogueModelError from rasa_core.featurizers import (MaxHistoryTrackerFeaturizer, BinarySingleStateFeaturizer) @@ -30,6 +28,7 @@ from rasa_core.policies.fallback import FallbackPolicy from rasa_core.policies.memoization import (MemoizationPolicy, AugmentedMemoizationPolicy) +from rasa_core.policies.form_policy import FormPolicy from rasa_core.actions.action import ACTION_LISTEN_NAME @@ -240,7 +239,8 @@ def default_policies(cls, fallback_args, max_history): max_history=max_history), KerasPolicy( MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), - max_history=max_history))] + max_history=max_history)), + FormPolicy()] def continue_training(self, trackers, domain, **kwargs): # type: (List[DialogueStateTracker], Domain, Any) -> None @@ -264,8 +264,12 @@ def probabilities_using_best_policy(self, tracker, domain): result = None max_confidence = -1 best_policy_name = None + for i, p in enumerate(self.policies): probabilities = p.predict_action_probabilities(tracker, domain) + if isinstance(tracker.events[-1], ActionExecutionRejected): + probabilities[domain.index_for_action( + tracker.events[-1].action_name)] = 0.0 confidence = np.max(probabilities) if confidence > max_confidence: max_confidence = confidence diff --git a/rasa_core/policies/form_policy.py b/rasa_core/policies/form_policy.py new file mode 100644 index 00000000000..da15b15361b --- /dev/null +++ b/rasa_core/policies/form_policy.py @@ -0,0 +1,131 @@ +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function +from __future__ import unicode_literals + +import logging +import typing + +from typing import List, Optional, Dict, Text + +from rasa_core.constants import FORM_SCORE +from rasa_core.policies.memoization import MemoizationPolicy +from rasa_core.events import FormValidation + +from rasa_core.domain import PREV_PREFIX, ACTIVE_FORM_PREFIX +from rasa_core.actions.action import ACTION_LISTEN_NAME + +if typing.TYPE_CHECKING: + from rasa_core.domain import Domain + from rasa_core.trackers import DialogueStateTracker + from rasa_core.featurizers import TrackerFeaturizer + +logger = logging.getLogger(__name__) + + +class FormPolicy(MemoizationPolicy): + """Policy which handles prediction of Forms""" + + ENABLE_FEATURE_STRING_COMPRESSION = True + + def __init__(self, + featurizer=None, # type: Optional[TrackerFeaturizer] + lookup=None # type: Optional[Dict] + ): + # type: (...) -> None + + # max history is set to 2 in order to capture + # previous meaningful action before action listen + super(FormPolicy, self).__init__(featurizer=featurizer, + max_history=2, + lookup=lookup) + + @staticmethod + def _get_active_form_name(state): + found_forms = [state_name[len(ACTIVE_FORM_PREFIX):] + for state_name, prob in state.items() + if ACTIVE_FORM_PREFIX in state_name and prob > 0] + # by construction there is only one active form + return found_forms[0] if found_forms else None + + @staticmethod + def _prev_action_listen_in_state(state): + return any(PREV_PREFIX + ACTION_LISTEN_NAME in state_name and prob > 0 + for state_name, prob in state.items()) + + @staticmethod + def _modified_states(states): + """Modify the states to + - capture previous meaningful action before action_listen + - ignore previous intent + """ + if states[0] is None: + action_before_listen = None + else: + action_before_listen = {state_name: prob + for state_name, prob in states[0].items() + if PREV_PREFIX in state_name and prob > 0} + + return [action_before_listen, states[-1]] + + def _add_states_to_lookup(self, trackers_as_states, trackers_as_actions, + domain, online=False): + """Add states to lookup dict""" + for states in trackers_as_states: + active_form = self._get_active_form_name(states[-1]) + if active_form and self._prev_action_listen_in_state(states[-1]): + # modify the states + states = self._modified_states(states) + feature_key = self._create_feature_key(states) + # even if there are two identical feature keys + # their form will be the same + # because of `active_form_...` feature + self.lookup[feature_key] = active_form + + def recall(self, + states, # type: List[Dict[Text, float]] + tracker, # type: DialogueStateTracker + domain # type: Domain + ): + # type: (...) -> Optional[int] + # modify the states + return self._recall_states(self._modified_states(states)) + + def predict_action_probabilities(self, tracker, domain): + # type: (DialogueStateTracker, Domain) -> List[float] + """Predicts the corresponding form action if there is an active form""" + result = [0.0] * domain.num_actions + + if tracker.active_form.get('name'): + logger.debug("There is an active form '{}'" + "".format(tracker.active_form['name'])) + if tracker.latest_action_name == ACTION_LISTEN_NAME: + # predict form action after user utterance + + if tracker.active_form.get('rejected'): + # since it is assumed that training stories contain + # only unhappy paths, notify the form that + # it should not be validated if predicted by other policy + tracker_as_states = self.featurizer.prediction_states( + [tracker], domain) + states = tracker_as_states[0] + memorized_form = self.recall(states, tracker, domain) + + if memorized_form == tracker.active_form['name']: + logger.debug("There is a memorized tracker state {}, " + "added `FormValidation(False)` event" + "".format(self._modified_states(states))) + tracker.update(FormValidation(False)) + return result + + idx = domain.index_for_action(tracker.active_form['name']) + result[idx] = FORM_SCORE + + elif tracker.latest_action_name == tracker.active_form.get('name'): + # predict action_listen after form action + idx = domain.index_for_action(ACTION_LISTEN_NAME) + result[idx] = FORM_SCORE + else: + logger.debug("There is no active form") + + return result diff --git a/rasa_core/policies/memoization.py b/rasa_core/policies/memoization.py index 79203ea35e0..4f6ce5b35e5 100644 --- a/rasa_core/policies/memoization.py +++ b/rasa_core/policies/memoization.py @@ -7,7 +7,6 @@ from builtins import bytes import base64 -import io import json import logging import os @@ -83,9 +82,9 @@ def toggle(self, activate): # type: (bool) -> None self.is_enabled = activate - def _add(self, trackers_as_states, trackers_as_actions, - domain, online=False): - + def _add_states_to_lookup(self, trackers_as_states, trackers_as_actions, + domain, online=False): + """Add states to lookup dict""" if not trackers_as_states: return @@ -149,8 +148,9 @@ def train(self, (trackers_as_states, trackers_as_actions) = self.featurizer.training_states_and_actions( training_trackers, domain) - self._add(trackers_as_states, trackers_as_actions, domain) - logger.debug("Memorized {} unique action examples." + self._add_states_to_lookup(trackers_as_states, trackers_as_actions, + domain) + logger.debug("Memorized {} unique examples." "".format(len(self.lookup))) def continue_training(self, training_trackers, domain, **kwargs): @@ -160,8 +160,8 @@ def continue_training(self, training_trackers, domain, **kwargs): (trackers_as_states, trackers_as_actions) = self.featurizer.training_states_and_actions( training_trackers[-1:], domain) - self._add(trackers_as_states, trackers_as_actions, - domain, online=True) + self._add_states_to_lookup(trackers_as_states, trackers_as_actions, + domain, online=True) def _recall_states(self, states): # type: (List[Dict[Text, float]]) -> Optional[int] diff --git a/rasa_core/processor.py b/rasa_core/processor.py index 9d8184c0dba..c46a2976d83 100644 --- a/rasa_core/processor.py +++ b/rasa_core/processor.py @@ -18,14 +18,19 @@ from rasa_core.actions import Action from rasa_core.actions.action import ( ACTION_LISTEN_NAME, - ACTION_RESTART_NAME) + ACTION_RESTART_NAME, + ActionExecutionRejection) from rasa_core.channels import CollectingOutputChannel from rasa_core.channels import UserMessage from rasa_core.dispatcher import Dispatcher from rasa_core.domain import Domain from rasa_core.events import ReminderScheduled, Event from rasa_core.events import SlotSet -from rasa_core.events import UserUttered, ActionExecuted, BotUttered +from rasa_core.events import ( + UserUttered, + ActionExecuted, + BotUttered, + ActionExecutionRejected) from rasa_core.interpreter import ( NaturalLanguageInterpreter, INTENT_MESSAGE_PREFIX) @@ -107,6 +112,7 @@ def predict_next(self, sender_id): return { "scores": scores, "policy": policy, + "confidence": np.max(probabilities), "tracker": tracker.current_state(EventVerbosity.AFTER_RESTART) } @@ -128,15 +134,22 @@ def log_message(self, message): "'{}'.".format(message.sender_id)) return tracker - def execute_action(self, sender_id, action_name, dispatcher): - # type: (Text, Text, Dispatcher) -> Optional[DialogueStateTracker] + def execute_action(self, + sender_id, # type: Text + action_name, # type: Text + dispatcher, # type: Dispatcher + policy, # type: Text + confidence # type: float + ): + # type: (...) -> Optional[DialogueStateTracker] # we have a Tracker instance for each user # which maintains conversation state tracker = self._get_tracker(sender_id) if tracker: action = self._get_action(action_name) - self._run_action(action, tracker, dispatcher) + self._run_action(action, tracker, dispatcher, policy, + confidence) # save tracker state to continue conversation from this state self._save_tracker(tracker) @@ -336,6 +349,11 @@ def _run_action(self, action, tracker, dispatcher, policy=None, # the tracker state after an action has been taken try: events = action.run(dispatcher, tracker, self.domain) + except ActionExecutionRejection: + events = [ActionExecutionRejected(action.name(), + policy, confidence)] + tracker.update(events[0]) + return self.should_predict_another_action(action.name(), events) except Exception as e: logger.error("Encountered an exception while running action '{}'. " "Bot will continue, but the actions events are lost. " @@ -363,17 +381,21 @@ def _warn_about_new_slots(self, tracker, action_name, events): if isinstance(e, SlotSet) and e.key not in slots_seen_during_train: s = tracker.slots.get(e.key) if s and s.has_features(): - logger.warning( - "Action '{0}' set a slot type '{1}' that " - "it never set during the training. This " - "can throw of the prediction. Make sure to " - "include training examples in your stories " - "for the different types of slots this " - "action can return. Remember: you need to " - "set the slots manually in the stories by " - "adding '- slot{{\"{1}\": {2}}}' " - "after the action." - "".format(action_name, e.key, json.dumps(e.value))) + if e.key == 'requested_slot' and tracker.active_form: + pass + else: + logger.warning( + "Action '{0}' set a slot type '{1}' that " + "it never set during the training. This " + "can throw of the prediction. Make sure to " + "include training examples in your stories " + "for the different types of slots this " + "action can return. Remember: you need to " + "set the slots manually in the stories by " + "adding '- slot{{\"{1}\": {2}}}' " + "after the action." + "".format(action_name, e.key, + json.dumps(e.value))) @staticmethod def log_bot_utterances_on_tracker(tracker, dispatcher): diff --git a/rasa_core/schemas/domain.yml b/rasa_core/schemas/domain.yml index d17ca300e3e..96cf605ce95 100644 --- a/rasa_core/schemas/domain.yml +++ b/rasa_core/schemas/domain.yml @@ -24,3 +24,8 @@ mapping: slots: type: !!python/str "map" allowempty: True + forms: + type: !!python/str "seq" + sequence: + - type: !!python/str "str" + allowempty: True diff --git a/rasa_core/server.py b/rasa_core/server.py index 1ce7639990c..fe23edff603 100644 --- a/rasa_core/server.py +++ b/rasa_core/server.py @@ -207,13 +207,17 @@ def version(): def execute_action(sender_id): request_params = request.get_json(force=True) action_to_execute = request_params.get("action", None) + policy = request_params.get("policy", None) + confidence = request_params.get("confidence", None) verbosity = event_verbosity_parameter(EventVerbosity.AFTER_RESTART) try: out = CollectingOutputChannel() agent.execute_action(sender_id, action_to_execute, - out) + out, + policy, + confidence) # retrieve tracker and set to requested state tracker = agent.tracker_store.get_or_create_tracker(sender_id) diff --git a/rasa_core/slots.py b/rasa_core/slots.py index f682fe7de8a..0624c8b412d 100644 --- a/rasa_core/slots.py +++ b/rasa_core/slots.py @@ -15,11 +15,15 @@ class Slot(object): type_name = None - def __init__(self, name, initial_value=None, value_reset_delay=None): + def __init__(self, name, + initial_value=None, + value_reset_delay=None, + auto_fill=True): self.name = name self.value = initial_value self.initial_value = initial_value self._value_reset_delay = value_reset_delay + self.auto_fill = auto_fill def feature_dimensionality(self): """How many features this single slot creates. @@ -80,7 +84,8 @@ def resolve_by_type(type_name): def persistence_info(self): return {"type": utils.module_path_from_instance(self), - "initial_value": self.initial_value} + "initial_value": self.initial_value, + "auto_fill": self.auto_fill} class FloatSlot(Slot): @@ -89,9 +94,13 @@ class FloatSlot(Slot): def __init__(self, name, initial_value=None, value_reset_delay=None, + auto_fill=True, max_value=1.0, min_value=0.0): - super(FloatSlot, self).__init__(name, initial_value, value_reset_delay) + super(FloatSlot, self).__init__(name, + initial_value, + value_reset_delay, + auto_fill) self.max_value = max_value self.min_value = min_value @@ -182,10 +191,12 @@ class CategoricalSlot(Slot): def __init__(self, name, values=None, initial_value=None, - value_reset_delay=None): + value_reset_delay=None, + auto_fill=True): super(CategoricalSlot, self).__init__(name, initial_value, - value_reset_delay) + value_reset_delay, + auto_fill) self.values = [str(v).lower() for v in values] if values else [] def persistence_info(self): @@ -221,8 +232,14 @@ def feature_dimensionality(self): class DataSlot(Slot): - def __init__(self, name, initial_value=None, value_reset_delay=1): - super(DataSlot, self).__init__(name, initial_value, value_reset_delay) + def __init__(self, name, + initial_value=None, + value_reset_delay=1, + auto_fill=True): + super(DataSlot, self).__init__(name, + initial_value, + value_reset_delay, + auto_fill) def as_feature(self): raise NotImplementedError("Each slot type needs to specify how its " diff --git a/rasa_core/trackers.py b/rasa_core/trackers.py index f413c73c8b4..520edca1c16 100644 --- a/rasa_core/trackers.py +++ b/rasa_core/trackers.py @@ -18,7 +18,7 @@ from rasa_core.events import ( UserUttered, ActionExecuted, Event, SlotSet, Restarted, ActionReverted, UserUtteranceReverted, - BotUttered) + BotUttered, Form) from rasa_core.slots import Slot logger = logging.getLogger(__name__) @@ -104,10 +104,11 @@ def __init__(self, sender_id, slots, # A deterministically scheduled action to be executed next self.followup_action = ACTION_LISTEN_NAME # type: Optional[Text] self.latest_action_name = None - self.latest_message = None # Stores the most recent message sent by the user + self.latest_message = None self.latest_bot_utterance = None self._reset() + self.active_form = {} ### # Public tracker interface @@ -137,7 +138,9 @@ def current_state(self, event_verbosity=EventVerbosity.NONE): "followup_action": self.followup_action, "paused": self.is_paused(), "events": evts, - "latest_input_channel": self.get_latest_input_channel() + "latest_input_channel": self.get_latest_input_channel(), + "active_form": self.active_form, + "latest_action_name": self.latest_action_name } def past_states(self, domain): @@ -147,6 +150,40 @@ def past_states(self, domain): generated_states = domain.states_for_tracker_history(self) return deque((frozenset(s.items()) for s in generated_states)) + def change_form_to(self, form_name): + # type: (Text) -> None + """Activate or deactivate a form""" + if form_name is not None: + self.active_form = {'name': form_name, + 'validate': True, + 'rejected': False} + else: + self.active_form = {} + + def set_form_validation(self, validate): + # type: (bool) -> None + """Toggle form validation""" + self.active_form['validate'] = validate + + def reject_action(self, action_name): + # type: (Text) -> None + """Notify active form that it was rejected""" + if action_name == self.active_form.get('name'): + self.active_form['rejected'] = True + + def set_latest_action_name(self, action_name): + # type: (Text) -> None + """Set latest action name + and reset form validation and rejection parameters + """ + self.latest_action_name = action_name + if self.active_form.get('name'): + # reset form validation if some form is active + self.active_form['validate'] = True + if action_name == self.active_form.get('name'): + # reset form rejection if it was predicted again + self.active_form['rejected'] = False + def current_slot_values(self): # type: () -> Dict[Text, Any] """Return the currently set values of the slots""" @@ -222,12 +259,66 @@ def generate_all_prior_trackers(self): tracker = self.init_copy() - for event in self.applied_events(): - if isinstance(event, ActionExecuted): - yield tracker + ignored_trackers = [] + latest_message = tracker.latest_message + + for i, event in enumerate(self.applied_events()): + if isinstance(event, UserUttered): + if tracker.active_form.get('name') is None: + # store latest user message before the form + latest_message = event + + elif isinstance(event, Form): + # form got either activated or deactivated, so override + # tracker's latest message + tracker.latest_message = latest_message + + elif isinstance(event, ActionExecuted): + # yields the intermediate state + if tracker.active_form.get('name') is None: + yield tracker + + elif tracker.active_form.get('rejected'): + for tr in ignored_trackers: + yield tr + ignored_trackers = [] + + if (not tracker.active_form.get('validate') or + event.action_name != + tracker.active_form.get('name')): + # persist latest user message + # that was rejected by the form + latest_message = tracker.latest_message + else: + # form was called with validation, so + # override tracker's latest message + tracker.latest_message = latest_message + + yield tracker + + elif event.action_name != tracker.active_form.get('name'): + # it is not known whether the form will be + # successfully executed, so store this tracker for later + tr = tracker.copy() + # form was called with validation, so + # override tracker's latest message + tr.latest_message = latest_message + ignored_trackers.append(tr) + + if event.action_name == tracker.active_form.get('name'): + # the form was successfully executed, so + # remove all stored trackers + ignored_trackers = [] + tracker.update(event) - yield tracker # yields the final state + # yields the final state + if tracker.active_form.get('name') is None: + yield tracker + elif tracker.active_form.get('rejected'): + for tr in ignored_trackers: + yield tr + yield tracker def applied_events(self): # type: () -> List[Event] @@ -356,6 +447,7 @@ def _reset(self): self.latest_message = UserUttered.empty() self.latest_bot_utterance = BotUttered.empty() self.followup_action = ACTION_LISTEN_NAME + self.active_form = {} def _reset_slots(self): # type: () -> None diff --git a/rasa_core/training/dsl.py b/rasa_core/training/dsl.py index cf2fbff16fe..1157c188fbd 100644 --- a/rasa_core/training/dsl.py +++ b/rasa_core/training/dsl.py @@ -19,7 +19,7 @@ from rasa_core.interpreter import RegexInterpreter from rasa_core.training.structures import ( Checkpoint, STORY_START, StoryStep, - GENERATED_CHECKPOINT_PREFIX, GENERATED_HASH_LENGTH) + GENERATED_CHECKPOINT_PREFIX, GENERATED_HASH_LENGTH, FORM_PREFIX) from rasa_nlu import utils as nlu_utils from rasa_nlu.training_data import Message from rasa_nlu.training_data.formats import MarkdownReader @@ -248,6 +248,10 @@ def process_lines(self, lines): elif line.startswith(">"): # reached a checkpoint name, conditions = self._parse_event_line(line[1:].strip()) self.add_checkpoint(name, conditions) + elif re.match(r'^[*\-]\s+{}'.format(FORM_PREFIX), line): + logger.debug("Skipping line {}, " + "because it was generated by " + "form action".format(line)) elif line.startswith( "-"): # reached a slot, event, or executed action event_name, parameters = self._parse_event_line(line[1:]) diff --git a/rasa_core/training/interactive.py b/rasa_core/training/interactive.py index 47960790473..fd41e329916 100644 --- a/rasa_core/training/interactive.py +++ b/rasa_core/training/interactive.py @@ -4,7 +4,6 @@ from __future__ import unicode_literals import sys -import typing import io import logging @@ -28,7 +27,7 @@ from rasa_core.channels import UserMessage from rasa_core.channels.channel import button_to_string from rasa_core.constants import ( - DEFAULT_SERVER_PORT, DEFAULT_SERVER_URL) + DEFAULT_SERVER_PORT, DEFAULT_SERVER_URL, REQUESTED_SLOT) from rasa_core.domain import Domain from rasa_core.events import Event, ActionExecuted from rasa_core.interpreter import INTENT_MESSAGE_PREFIX @@ -109,7 +108,8 @@ def send_message(endpoint, # type: EndpointConfig r = endpoint.request(json=payload, method="post", - subpath="/conversations/{}/messages".format(sender_id)) + subpath="/conversations/{}/messages" + "".format(sender_id)) return _response_as_json(r) @@ -148,11 +148,17 @@ def retrieve_tracker(endpoint, sender_id, verbosity=EventVerbosity.ALL): return _response_as_json(r) -def send_action(endpoint, sender_id, action_name): - # type: (EndpointConfig, Text, Text) -> Dict[Text, Any] +def send_action(endpoint, # type: EndpointConfig + sender_id, # type: Text + action_name, # type: Text + policy=None, # type: Optional[Text] + confidence=None # type: Optional[float] + ): + # type: (...) -> Dict[Text, Any] """Log an action to a conversation.""" - payload = {"action": action_name} + payload = {"action": action_name, "policy": policy, + "confidence": confidence} subpath = "/conversations/{}/execute".format(sender_id) r = endpoint.request(json=payload, @@ -360,7 +366,8 @@ def _request_intent_from_user(latest_message, Returns the intent dict that has been selected by the user.""" - predictions = latest_message.get("parse_data", {}).get("intent_ranking", []) + predictions = latest_message.get("parse_data", + {}).get("intent_ranking", []) predicted_intents = {p["name"] for p in predictions} @@ -479,7 +486,8 @@ def add_user_cell(data, cell): elif evt.get("event") != "bot": e = Event.from_parameters(evt) - bot_column.append(wrap(e.as_story_string(), bot_width(table))) + if e.as_story_string(): + bot_column.append(wrap(e.as_story_string(), bot_width(table))) if bot_column: text = "\n".join(bot_column) @@ -724,13 +732,16 @@ def _predict_till_next_listen(endpoint, # type: EndpointConfig probabilities = [prediction["score"] for prediction in predictions] pred_out = int(np.argmax(probabilities)) action_name = predictions[pred_out].get("action") + policy = response.get("policy") + confidence = response.get("confidence") _print_history(sender_id, endpoint) _plot_trackers(sender_ids, plot_file, endpoint, unconfirmed=[ActionExecuted(action_name)]) - listen = _validate_action(action_name, predictions, - endpoint, sender_id, finetune=finetune) + listen = _validate_action(action_name, policy, confidence, + predictions, endpoint, sender_id, + finetune=finetune) _plot_trackers(sender_ids, plot_file, endpoint) @@ -772,6 +783,8 @@ def _correct_wrong_action(corrected_action, # type: Text def _validate_action(action_name, # type: Text + policy, # type: Text + confidence, # type: float predictions, # type: List[Dict[Text, Any]] endpoint, # type: EndpointConfig sender_id, # type: Text @@ -792,14 +805,71 @@ def _validate_action(action_name, # type: Text ] answers = _ask_questions(questions, sender_id, endpoint) if not answers["action"]: - corrected_action = _request_action_from_user(predictions, sender_id, - endpoint) - _correct_wrong_action(corrected_action, endpoint, sender_id, + action_name = _request_action_from_user(predictions, sender_id, + endpoint) + + tracker = retrieve_tracker(endpoint, sender_id, + EventVerbosity.AFTER_RESTART) + + # check whether the form is rejected + form_is_rejected = ( + tracker.get('active_form', {}).get('name') and + action_name not in {tracker['active_form']['name'], + ACTION_LISTEN_NAME} + ) + # check whether the form is called again after it was rejected + form_is_restored = ( + tracker.get('active_form', {}).get('rejected') and + tracker.get('latest_action_name') == 'action_listen' and + action_name == tracker.get('active_form', {}).get('name') + ) + if form_is_rejected: + # notify the tracker that form was rejected + send_event(endpoint, sender_id, + {"event": "action_execution_rejected", + "name": tracker['active_form']['name']}) + elif form_is_restored: + # active form was chosen after it was rejected + # ask a user whether an input should be validated + q = ("Should '{}' validate user input to fill the slot '{}'?" + "".format(action_name, tracker.get("slots", + {}).get(REQUESTED_SLOT))) + validation_questions = [{ + "name": "validation", + "type": "confirm", + "message": q + }] + form_answers = _ask_questions(validation_questions, sender_id, + endpoint) + if not form_answers["validation"]: + # notify form action to skip validation + send_event(endpoint, sender_id, {"event": "form_validation", + "validate": False}) + elif not tracker.get('active_form', {}).get('validate'): + # handle contradiction with learned behaviour + q = ("ERROR: FormPolicy predicted no form validation " + "based on previous training stories. " + "Make sure to remove contradictory stories " + "from training data. " + "Otherwise predicting no form validation " + "will not work as expected.") + warning_questions = [{ + "name": "warning", + "type": "input", + "message": q + }] + _ask_questions(warning_questions, sender_id, endpoint) + # notify form action to validate an input + send_event(endpoint, sender_id, {"event": "form_validation", + "validate": True}) + + if not answers["action"]: + _correct_wrong_action(action_name, endpoint, sender_id, finetune=finetune) - return corrected_action == ACTION_LISTEN_NAME else: - send_action(endpoint, sender_id, action_name) - return action_name == ACTION_LISTEN_NAME + send_action(endpoint, sender_id, action_name, policy, confidence) + + return action_name == ACTION_LISTEN_NAME def _as_md_message(parse_data): diff --git a/rasa_core/training/structures.py b/rasa_core/training/structures.py index 61beabb670f..68690cd2845 100644 --- a/rasa_core/training/structures.py +++ b/rasa_core/training/structures.py @@ -15,7 +15,10 @@ from rasa_core import utils from rasa_core.actions.action import ACTION_LISTEN_NAME from rasa_core.conversation import Dialogue -from rasa_core.events import UserUttered, ActionExecuted, Event +from rasa_core.events import (UserUttered, ActionExecuted, + Form, FormValidation, + SlotSet, Event, + ActionExecutionRejected) if typing.TYPE_CHECKING: from rasa_core.domain import Domain @@ -34,6 +37,29 @@ GENERATED_HASH_LENGTH = 5 +FORM_PREFIX = "form: " + + +class StoryStringHelper(object): + """A helper class to mark story steps that are inside a form with `form: ` + """ + def __init__(self, + active_form=None, + form_validation=True, + form_rejected=False, + form_prefix_string='', + no_form_prefix_string=''): + # track active form + self.active_form = active_form + # track whether a from should be validated + self.form_validation = form_validation + # track whether a from was rejected + self.form_rejected = form_rejected + # save story strings with form prefix for later + self.form_prefix_string = form_prefix_string + # save story strings without form prefix for later + self.no_form_prefix_string = no_form_prefix_string + class Checkpoint(object): def __init__(self, name, conditions=None): @@ -78,6 +104,8 @@ def __init__(self, self.block_name = block_name self.id = uuid.uuid4().hex # type: Text + self.story_string_helper = StoryStringHelper() + def create_copy(self, use_new_id): copied = StoryStep(self.block_name, self.start_checkpoints, self.end_checkpoints, @@ -89,48 +117,186 @@ def create_copy(self, use_new_id): def add_user_message(self, user_message): self.add_event(user_message) + def add_event(self, event): + self.events.append(event) + @staticmethod - def _is_action_listen(event): - # this is not an isinstance because we don't want to allow subclasses - # here - return (type(event) == ActionExecuted and - event.action_name == ACTION_LISTEN_NAME) + def _checkpoint_string(story_step_element): + return "> {}\n".format(story_step_element.as_story_string()) - def add_event(self, event): - # stories never contain the action listen events they are implicit - # and added after a story is read and converted to a dialogue - if not self._is_action_listen(event): - self.events.append(event) + @staticmethod + def _user_string(story_step_element, e2e, prefix=''): + return "* {}{}\n".format(prefix, + story_step_element.as_story_string(e2e)) + + def _store_user_strings(self, story_step_element, e2e, prefix=''): + self.story_string_helper.no_form_prefix_string += self._user_string( + story_step_element, e2e + ) + self.story_string_helper.form_prefix_string += self._user_string( + story_step_element, e2e, prefix + ) + + @staticmethod + def _bot_string(story_step_element, prefix=''): + return " - {}{}\n".format(prefix, + story_step_element.as_story_string()) + + def _store_bot_strings(self, story_step_element, prefix=''): + self.story_string_helper.no_form_prefix_string += self._bot_string( + story_step_element + ) + self.story_string_helper.form_prefix_string += self._bot_string( + story_step_element, prefix + ) + + def _reset_stored_strings(self): + self.story_string_helper.form_prefix_string = '' + self.story_string_helper.no_form_prefix_string = '' def as_story_string(self, flat=False, e2e=False): # if the result should be flattened, we # will exclude the caption and any checkpoints. + + for s in self.start_checkpoints: + if s.name == STORY_START: + # first story step in the story, so reset helper + self.story_string_helper = StoryStringHelper() + if flat: result = "" else: result = "\n## {}\n".format(self.block_name) for s in self.start_checkpoints: if s.name != STORY_START: - result += "> {}\n".format(s.as_story_string()) + result += self._checkpoint_string(s) + for s in self.events: if isinstance(s, UserUttered): - result += "* {}\n".format(s.as_story_string(e2e)) + if self.story_string_helper.active_form is None: + result += self._user_string(s, e2e) + else: + # form is active + # it is not known whether the form will be + # successfully executed, so store this + # story string for later + self._store_user_strings(s, e2e, FORM_PREFIX) + + elif isinstance(s, Form): + # form got either activated or deactivated + self.story_string_helper.active_form = s.name + + if self.story_string_helper.active_form is None: + # form deactivated, so form succeeded, + # so add story string with form prefix + result += self.story_string_helper.form_prefix_string + # remove all stored story strings + self._reset_stored_strings() + + result += self._bot_string(s) + + elif isinstance(s, FormValidation): + self.story_string_helper.form_validation = s.validate + + elif isinstance(s, ActionExecutionRejected): + if (s.action_name == + self.story_string_helper.active_form): + # form rejected + self.story_string_helper.form_rejected = True + + elif isinstance(s, ActionExecuted): + if self._is_action_listen(s): + pass + elif self.story_string_helper.active_form is None: + result += self._bot_string(s) + else: + # form is active + if self.story_string_helper.form_rejected: + if (self.story_string_helper.form_validation and + s.action_name == + self.story_string_helper.active_form): + result += self._bot_string( + ActionExecuted(ACTION_LISTEN_NAME)) + result += (self.story_string_helper. + form_prefix_string) + else: + result += (self.story_string_helper. + no_form_prefix_string) + # form rejected, add story string without form prefix + result += self._bot_string(s) + else: + # form succeeded, so add story string with form prefix + result += (self.story_string_helper. + form_prefix_string) + result += self._bot_string(s, FORM_PREFIX) + + # remove all stored story strings + self._reset_stored_strings() + + if (s.action_name == + self.story_string_helper.active_form): + # form was successfully executed + self.story_string_helper.form_rejected = False + + self.story_string_helper.form_validation = True + + elif isinstance(s, SlotSet): + if self.story_string_helper.active_form is None: + result += self._bot_string(s) + else: + # form is active + # it is not known whether the form will be + # successfully executed, so store this + # story string for later + # slots should be always printed without prefix + self._store_bot_strings(s) + elif isinstance(s, Event): converted = s.as_story_string() if converted: - result += " - {}\n".format(s.as_story_string()) + if self.story_string_helper.active_form is None: + result += self._bot_string(s) + else: + # form is active + # it is not known whether the form will be + # successfully executed, so store this + # story string for later + self._store_bot_strings(s, FORM_PREFIX) + else: raise Exception("Unexpected element in story step: " "{}".format(s)) + if (not self.end_checkpoints and + self.story_string_helper.active_form is not None): + # there are no end checkpoints + # form is active + # add story string with form prefix + result += self.story_string_helper.form_prefix_string + # remove all stored story strings + self._reset_stored_strings() + if not flat: for e in self.end_checkpoints: result += "> {}\n".format(e.as_story_string()) return result + @staticmethod + def _is_action_listen(event): + # this is not an `isinstance` because + # we don't want to allow subclasses here + return (type(event) == ActionExecuted and + event.action_name == ACTION_LISTEN_NAME) + + def _add_action_listen(self, events): + if not events or not self._is_action_listen(events[-1]): + # do not add second action_listen + events.append(ActionExecuted(ACTION_LISTEN_NAME)) + def explicit_events(self, domain, should_append_final_listen=True): # type: (Domain, bool) -> List[Event] - """Returns events contained in the story step including implicit events. + """Returns events contained in the story step + including implicit events. Not all events are always listed in the story dsl. This includes listen actions as well as implicitly @@ -141,14 +307,15 @@ def explicit_events(self, domain, should_append_final_listen=True): for e in self.events: if isinstance(e, UserUttered): - events.append(ActionExecuted(ACTION_LISTEN_NAME)) + self._add_action_listen(events) events.append(e) events.extend(domain.slots_for_entities(e.entities)) else: events.append(e) if not self.end_checkpoints and should_append_final_listen: - events.append(ActionExecuted(ACTION_LISTEN_NAME)) + self._add_action_listen(events) + return events def __repr__(self): @@ -189,8 +356,17 @@ def as_dialogue(self, sender_id, domain): def as_story_string(self, flat=False, e2e=False): story_content = "" + + # initialize helper for first story step + story_string_helper = StoryStringHelper() + for step in self.story_steps: + # use helper from previous story step + step.story_string_helper = story_string_helper + # create string for current story step story_content += step.as_story_string(flat, e2e) + # override helper for next story step + story_string_helper = step.story_string_helper if flat: if self.story_name: @@ -254,17 +430,17 @@ def with_cycles_removed(self): all_overlapping_cps = set() if self.cyclic_edge_ids: - # we are going to do this in a recursive way. we are going to remove - # one cycle and then we are going to let the cycle detection run - # again + # we are going to do this in a recursive way. we are going to + # remove one cycle and then we are going to + # let the cycle detection run again # this is not inherently necessary so if this becomes a performance # issue, we can change it. It is actually enough to run the cycle # detection only once and then remove one cycle after another, but # since removing the cycle is done by adding / removing edges and # nodes # the logic is a lot easier if we only need to make sure the - # change is - # consistent if we only change one compared to changing all of them. + # change is consistent if we only change one compared to + # changing all of them. for s, e in cyclic_edge_ids: cid = utils.generate_id(max_chars=GENERATED_HASH_LENGTH) diff --git a/tests/test_actions.py b/tests/test_actions.py index d4c1d7c893b..0dbbe91cbc2 100644 --- a/tests/test_actions.py +++ b/tests/test_actions.py @@ -12,7 +12,8 @@ from rasa_core.actions import action from rasa_core.actions.action import ( ActionRestart, UtterAction, - ActionListen, RemoteAction) + ActionListen, RemoteAction, + ActionExecutionRejection) from rasa_core.domain import Domain from rasa_core.events import Restarted, SlotSet, UserUtteranceReverted from rasa_core.trackers import DialogueStateTracker @@ -51,16 +52,18 @@ def test_domain_action_instantiation(): entities=[], slots=[], templates={}, - action_names=["my_module.ActionTest", "utter_test"]) + action_names=["my_module.ActionTest", "utter_test"], + form_names=[]) instantiated_actions = domain.actions(None) - assert len(instantiated_actions) == 5 + assert len(instantiated_actions) == 6 assert instantiated_actions[0].name() == "action_listen" assert instantiated_actions[1].name() == "action_restart" assert instantiated_actions[2].name() == "action_default_fallback" - assert instantiated_actions[3].name() == "my_module.ActionTest" - assert instantiated_actions[4].name() == "utter_test" + assert instantiated_actions[3].name() == "action_deactivate_form" + assert instantiated_actions[4].name() == "my_module.ActionTest" + assert instantiated_actions[5].name() == "utter_test" def test_domain_fails_on_duplicated_actions(): @@ -69,7 +72,8 @@ def test_domain_fails_on_duplicated_actions(): entities=[], slots=[], templates={}, - action_names=["random_name", "random_name"]) + action_names=["random_name", "random_name"], + form_names=[]) def test_remote_action_runs(default_dispatcher_collecting, default_domain): @@ -106,6 +110,8 @@ def test_remote_action_runs(default_dispatcher_collecting, default_domain): 'intent': {}, 'text': None }, + 'active_form': {}, + 'latest_action_name': None, 'sender_id': 'default', 'paused': False, 'latest_event_time': None, @@ -159,6 +165,8 @@ def test_remote_action_logs_events(default_dispatcher_collecting, 'intent': {}, 'text': None }, + 'active_form': {}, + 'latest_action_name': None, 'sender_id': 'default', 'paused': False, 'followup_action': 'action_listen', @@ -230,6 +238,31 @@ def test_remote_action_endpoint_responds_500(default_dispatcher_collecting, assert "Failed to execute custom action." in str(execinfo.value) +def test_remote_action_endpoint_responds_400(default_dispatcher_collecting, + default_domain): + tracker = DialogueStateTracker("default", + default_domain.slots) + + endpoint = EndpointConfig("https://abc.defg/webhooks/actions") + remote_action = action.RemoteAction("my_action", endpoint) + + httpretty.register_uri( + httpretty.POST, + 'https://abc.defg/webhooks/actions', + status=400, + body='{"action_name": "my_action"}') + + httpretty.enable() + + with pytest.raises(Exception) as execinfo: + remote_action.run(default_dispatcher_collecting, + tracker, + default_domain) + httpretty.disable() + assert execinfo.type == ActionExecutionRejection + assert "Custom action 'my_action' rejected to run" in str(execinfo.value) + + def test_default_action(default_dispatcher_collecting, default_domain): tracker = DialogueStateTracker("default", diff --git a/tests/test_domain.py b/tests/test_domain.py index aefcdc1240f..d12e8d36ddc 100644 --- a/tests/test_domain.py +++ b/tests/test_domain.py @@ -118,7 +118,7 @@ def test_domain_from_template(): domain_file = DEFAULT_DOMAIN_PATH domain = Domain.load(domain_file) assert len(domain.intents) == 10 - assert len(domain.action_names) == 6 + assert len(domain.action_names) == 7 def test_utter_templates(): @@ -175,6 +175,7 @@ def test_domain_to_yaml(): config: store_entities_as_slots: true entities: [] +forms: [] intents: [] slots: {} templates: diff --git a/tests/test_dsl.py b/tests/test_dsl.py index 6fdf5de3851..4e459547777 100644 --- a/tests/test_dsl.py +++ b/tests/test_dsl.py @@ -143,12 +143,12 @@ def test_generate_training_data_with_cycles(tmpdir, default_domain): y = training_data.y.argmax(axis=-1) # how many there are depends on the graph which is not created in a - # deterministic way but should always be 3 or + # deterministic way but should always be 3 or 4 assert len(training_trackers) == 3 or len(training_trackers) == 4 - # if we have 4 trackers, there is going to be one example more for label 3 + # if we have 4 trackers, there is going to be one example more for label 4 num_threes = len(training_trackers) - 1 - assert Counter(y) == {0: 6, 1: 2, 3: num_threes, 4: 1, 5: 3} + assert Counter(y) == {0: 6, 1: 2, 4: num_threes, 5: 1, 6: 3} def test_visualize_training_data_graph(tmpdir, default_domain): diff --git a/tests/test_examples.py b/tests/test_examples.py index 6c15415e401..828d13e65a5 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -3,15 +3,14 @@ from __future__ import print_function from __future__ import unicode_literals -import functools import os import sys +import json +from httpretty import httpretty -from rasa_core import training +from rasa_core.train import train_dialogue_model from rasa_core.agent import Agent -from rasa_core.training import interactive -from rasa_core.events import ActionExecuted -from tests import utilities +from rasa_core.utils import EndpointConfig, AvailableEndpoints def test_moodbot_example(trained_moodbot_path): @@ -39,3 +38,58 @@ def test_restaurantbot_example(): responses = agent.handle_text("/greet") assert responses[0]['text'] == 'how can I help you?' + + +def test_formbot_example(): + sys.path.append("examples/formbot/") + + p = "examples/formbot/" + stories = os.path.join(p, "data", "stories.md") + endpoint = EndpointConfig("https://abc.defg/webhooks/actions") + endpoints = AvailableEndpoints(action=endpoint) + agent = train_dialogue_model(os.path.join(p, "domain.yml"), + stories, + os.path.join(p, "models", "dialogue"), + endpoints=endpoints) + response = { + 'events': [ + {'event': 'form', 'name': 'restaurant_form', 'timestamp': None}, + {'event': 'slot', 'timestamp': None, + 'name': 'requested_slot', 'value': 'cuisine'} + ], + 'responses': [ + {'template': 'utter_ask_cuisine'} + ] + } + + httpretty.register_uri( + httpretty.POST, + 'https://abc.defg/webhooks/actions', + body=json.dumps(response)) + + httpretty.enable() + + responses = agent.handle_text("/request_restaurant") + + httpretty.disable() + + assert responses[0]['text'] == 'what cuisine?' + + response = { + "error": "Failed to validate slot cuisine with action restaurant_form", + "action_name": "restaurant_form" + } + + httpretty.register_uri( + httpretty.POST, + 'https://abc.defg/webhooks/actions', + status=400, + body=json.dumps(response)) + + httpretty.enable() + + responses = agent.handle_text("/chitchat") + + httpretty.disable() + + assert responses[0]['text'] == 'chitchat' diff --git a/tests/test_policies.py b/tests/test_policies.py index 11acc5f8fc4..4778a8dfb54 100644 --- a/tests/test_policies.py +++ b/tests/test_policies.py @@ -20,6 +20,7 @@ from rasa_core.policies.sklearn_policy import SklearnPolicy from rasa_core.policies.fallback import FallbackPolicy from rasa_core.policies.embedding_policy import EmbeddingPolicy +from rasa_core.policies.form_policy import FormPolicy from rasa_core.trackers import DialogueStateTracker from tests.conftest import DEFAULT_DOMAIN_PATH, DEFAULT_STORIES_FILE from rasa_core.featurizers import ( @@ -372,3 +373,61 @@ def trained_policy(self, featurizer): attn_before_rnn=True, attn_after_rnn=True) return policy + + +class TestFormPolicy(PolicyTestCollection): + + @pytest.fixture(scope="module") + def create_policy(self, featurizer): + p = FormPolicy() + return p + + def test_memorise(self, trained_policy, default_domain): + domain = Domain.load('data/test_domains/form.yml') + trackers = training.load_data('data/test_stories/stories_form.md', + domain) + trained_policy.train(trackers, domain) + + (all_states, all_actions) = \ + trained_policy.featurizer.training_states_and_actions( + trackers, domain) + + for tracker, states, actions in zip(trackers, all_states, all_actions): + for state in states: + if state is not None: + # check that 'form: inform' was ignored + assert 'intent_inform' not in state.keys() + recalled = trained_policy.recall(states, tracker, domain) + active_form = trained_policy._get_active_form_name(states[-1]) + + if states[0] is not None and states[-1] is not None: + # explicitly set intents and actions before listen after + # which FormPolicy should not predict a form action and + # should add FormValidation(False) event + is_no_validation = ( + ('prev_some_form' in states[0].keys() and + 'intent_default' in states[-1].keys()) or + ('prev_some_form' in states[0].keys() and + 'intent_stop' in states[-1].keys()) or + ('prev_utter_ask_continue' in states[0].keys() and + 'intent_affirm' in states[-1].keys()) or + ('prev_utter_ask_continue' in states[0].keys() and + 'intent_deny' in states[-1].keys()) + ) + else: + is_no_validation = False + + if 'intent_start_form' in states[-1]: + # explicitly check that intent that starts the form + # is not memorized as non validation intent + assert recalled is None + elif is_no_validation: + assert recalled == active_form + else: + assert recalled is None + + nums = np.random.randn(domain.num_states) + random_states = [{f: num + for f, num in + zip(domain.input_states, nums)}] + assert trained_policy.recall(random_states, None, domain) is None diff --git a/tests/test_training.py b/tests/test_training.py index 2d70a4ee5f6..c239b88e19e 100644 --- a/tests/test_training.py +++ b/tests/test_training.py @@ -6,6 +6,7 @@ from rasa_core.interpreter import RegexInterpreter from rasa_core.train import train_dialogue_model from rasa_core.agent import Agent +from rasa_core.policies.form_policy import FormPolicy from rasa_core.training.dsl import StoryFileReader from rasa_core.training.visualization import visualize_stories @@ -62,8 +63,11 @@ def test_training_script_without_max_history_set(tmpdir): agent = Agent.load(tmpdir.strpath) for policy in agent.policy_ensemble.policies: if hasattr(policy.featurizer, 'max_history'): - assert policy.featurizer.max_history == \ - policy.featurizer.MAX_HISTORY_DEFAULT + if type(policy) == FormPolicy: + assert policy.featurizer.max_history == 2 + else: + assert policy.featurizer.max_history == \ + policy.featurizer.MAX_HISTORY_DEFAULT def test_training_script_with_max_history_set(tmpdir): @@ -76,7 +80,10 @@ def test_training_script_with_max_history_set(tmpdir): agent = Agent.load(tmpdir.strpath) for policy in agent.policy_ensemble.policies: if hasattr(policy.featurizer, 'max_history'): - assert policy.featurizer.max_history == max_history + if type(policy) == FormPolicy: + assert policy.featurizer.max_history == 2 + else: + assert policy.featurizer.max_history == max_history def test_training_script_with_restart_stories(tmpdir):