- intent: order_food
examples: |
- I want to order a food
- can I get some food, please
- Let's order some food
- intent: inform_food
examples: |
- [steak](food)
- [pasta](food)
- [sushi](food)
- [burger](food)
this is in my nlu.yml, can I extract those food examples from json? how to do that? should I write some kind of script that will extract my json and write those things in here?
You’re using an intent for entity extraction which is not a good idea. You should provide the entity examples within the context of intents like your order_food intent or collect the entity as part of a form.
Regarding converting from json, I would probably just write a convert tool to create the NLU examples in yaml from json. I’ve seen jinja2 used for this.
For something more involved, you could create a custom importer.
- intent: my_country
examples: |
- I am from [Poland](country_name)
- I live in [Germany](country_name)
- : country_name
examples: |
- Poland
- Germany
- France
- Italy
- Spain
- Portugal
- Greece
- Norway
- Sweden
I also found in training class that you suggested:
are there more ways to provide plenty of examples to one entity?
I know that there is a way as you said in “within the context of intents”(I can use synonyms in there) but there can be plenty of examples
and how about lookup table? those are the final list of all entities examples? It means that from others I can make my rasa learn and from those I can not, because it is final list?