Assign role to duckling's pre-trained entity

I’m using duckling to extract time. I also have a custom action to get start date and end date from user. The problem is, in order to identify which date it is, I need to add role to entity in nlu.md, but duckling’s entity doesn’t allow me to touch so I can’t add the role.

Anyone knows how to solve this?

1 Like

Hi there, this is a backlog item for our research team currently. Feel free to track or comment here.

As a workaround, you could look at having two more entities focused on defining the role, then do a custom action that attempts to match each entity to the extracted duckling entity based on similarity. It’s a bit hacky but I think it’d work fine in most cases. Let me know if you try this out or need any help reviewing your implementation!

1 Like