Todo List NLU

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:

  1. detect the create_todo intent
  2. apply a regex over it to detect the words that match todo and remove it
  3. use spacy to extract the PERSON and remove the value
  4. remaining text is item

Thoughts?

Thank You,

N

Can you provide an example of what your training data for the item entity looks like?