Sure! For example, your lookup table could be a file like:
fruits.yml
:
version: "2.0"
nlu:
- lookup: fruits
examples: |
- apples
- bananas
- pears
Your nlu.yml
should contain some examples that include the lookup table items. You don’t have to include every single lookup table item, just a few of them. You also do not have to mention fruits.yml
or the lookup table in the nlu.yml
file. Including it in the data
directory is enough.
nlu.yml
:
version: "2.0"
nlu:
- intent: ask_for_fruit
examples: |
- I'd like to buy some [apples](fruits)
- Can I purchase some [pears](fruits)?
Finally, your directory structure should look like this:
data/nlu.yml
data/fruits.yml
Does that clear things up @susajsnair?