Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'change_defaults' of github.com:RasaHQ/rasa into change_…
…defaults
- Loading branch information
Showing
51 changed files
with
2,910 additions
and
1,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Add support for entities with roles and grouping of entities in Rasa NLU. | ||
|
||
You can now define a role and/or group label in addition to the entity type for entities. | ||
Use the role label if an entity can play different roles in your assistant. | ||
For example, a city can be a destination or a departure city. | ||
The group label can be used to group multiple entities together. | ||
For example, you could group different pizza orders, so that you know what toppings goes with which pizza and | ||
what size which pizza has. | ||
For more details see :ref:`entities-roles-groups`. | ||
|
||
To fill slots from entities with a specific role/group, you need to either use forms or use a custom action. | ||
We updated the tracker method ``get_latest_entity_values`` to take an optional role/group label. | ||
If you want to use a form, you can add the specific role/group label of interest to the slot mapping function | ||
``from_entity`` (see :ref:`forms``). | ||
|
||
.. note:: | ||
|
||
Composite entities are currently just supported by the :ref:``diet-classifier`` and :ref:``CRFEntityExtractor``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Fixed issue where posting to certain callback channel URLs would return a 500 error on successful posts due to invalid response format | ||
Fixed issue where posting to certain callback channel URLs would return a 500 error on successful posts due to invalid response format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Update training data format for NLU to support entities with a role or group label. | ||
|
||
You can now specify synonyms, roles, and groups of entities using the following data format: | ||
Markdown: | ||
|
||
.. code-block:: none | ||
|
||
[LA]{"entity": "location", "role": "city", "group": "CA", "value": "Los Angeles"} | ||
|
||
JSON: | ||
|
||
.. code-block:: none | ||
|
||
"entities": [ | ||
{ | ||
"start": 10, | ||
"end": 12, | ||
"value": "Los Angeles", | ||
"entity": "location", | ||
"role": "city", | ||
"group": "CA", | ||
} | ||
] | ||
|
||
The markdown format ``[LA](location:Los Angeles)`` is deprecated. To update your training data file just | ||
execute the following command on the terminal of your choice: | ||
``sed -i .deprecated -E 's/\[(.*)\]\((.*):(.*)\)/\[\1\]\{"entity": "\2", "value": "\3"\}/g' nlu.md`` | ||
|
||
For more information about the new data format see :ref:`training-data-format`. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Raise a warning in ``CRFEntityExtractor`` and ``DIETClassifier`` if entities are not correctly annotated in the | ||
training data, e.g. their start and end values do not match any start and end values of tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
## intent:affirm | ||
- yes | ||
- yep | ||
- yeah | ||
- indeed | ||
- that's right | ||
- ok | ||
- great | ||
- right, thank you | ||
- correct | ||
- great choice | ||
- sounds really good | ||
|
||
## intent:goodbye | ||
- bye | ||
- goodbye | ||
- good bye | ||
- stop | ||
- end | ||
- farewell | ||
- Bye bye | ||
- have a good one | ||
|
||
## intent:greet | ||
- hey | ||
- howdy | ||
- hey there | ||
- hello | ||
- hi | ||
- good morning | ||
- good evening | ||
- dear sir | ||
|
||
## intent:chitchat | ||
- What's your name? | ||
- What can I call you? | ||
- How's the weather? | ||
- Is it too hot outside? | ||
|
||
## intent:book_flight | ||
- i'm looking for a flight | ||
- I want to book a flight | ||
- i'm looking for a flight to [Berlin]{"entity": "location", "role": "to"} | ||
- show me flights from [Amsterdam]{"entity": "location", "role": "from"} | ||
- show me flights to [London]{"entity": "location", "role": "to"} | ||
- i am looking for a flight from [SF]{"entity": "location", "value": "San Fransisco", "role": "from"} to [New York]{"entity": "location", "role": "to"} | ||
- search for flights | ||
- from [Madrid]{"entity": "location", "role": "from"} to [Munich]{"entity": "location", "role": "to"} | ||
- any flight to [Liverpool]{"entity": "location", "role": "to"} | ||
|
||
## intent:order_pizza | ||
- i want a [large]{"entity": "size", "group": "1"} pizza with [tomato]{"entity": "topping", "group": "1"} and a [small]{"entity": "size", "group": "2"} pizza with [bacon]{"entity": "topping", "group": "2"} | ||
- one [large]{"entity": "size", "group": "1"} with [pepperoni]{"entity": "topping", "group": "1"} and a [medium]{"entity": "size", "group": "2"} with [mushrooms]{"entity": "topping", "group": "2"} | ||
- I would like a [medium]{"entity": "size", "group": "1"} standard pizza and a [medium]{"entity": "size", "group": "2"} pizza with [extra cheese]{"entity": "topping", "group": "2"} | ||
- [large]{"entity": "size", "group": "1"} with [onions]{"entity": "topping", "group": "1"} and [small]{"entity": "size", "group": "2"} with [olives]{"entity": "topping", "group": "2"} | ||
- a pizza with [onions]{"entity": "topping", "group": "1"} in [medium]{"entity": "size", "group": "1"} and one with [mushrooms]{"entity": "topping", "group": "2"} in [small]{"entity": "size", "group": "2"} please |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.