I have a very simple NLU that only listens for todo actions.
That is, it will get a ton of random gibberish and when it gets “let’s create a todo for John to sweep the garage” I want it to match the intent create_todo with two entities, the person and the item. Note I would expect “add a todo to [item] for [person]” or any variant to work as well.
I’m currently using Spacy for detecting the person and it works well.
I’m having a hard time matching the rest of the text for the “item” slot. For example, if I change the utterance to “create a todo for Danny to clean the gutters”, it breaks down clean and gutters as individual entities.
In some ways, I am wondering if there is a way to get my pipeline to:
- detect the create_todo intent
- apply a regex over it to detect the words that match todo and remove it
- use spacy to extract the PERSON and remove the value
- remaining text is item
Thoughts?
Thank You,
N