Pattern extraction problem with DucklingEntityExtractor

Yeah this is coming from duckling :frowning: I tried just the duckling server, the sentence is picked up from 10 from 2021-10-10 and thus messing the extraction

It is just how duckling interprets the tokens and then the Time Rules picks up the 10 as an hour grain. So i guess you can raise this as an issue in duckling repository and they can suggest you some modifications you can do in the tokenisation but i am not sure if that is something you can do from Rasa.

Another option is simply create a custom components that connects to Duckling but mask entities as they are already extracted by DIET. you can do so by placing your custom components after DIET( similar to entity synonym mapper) Since DIET would spit already the entities and their indices on the sentences, you can mask those before sending the remainder of the input to Duckling. This way you would avoid overlaps on product information.

This doesn’t guarantee that if a user provides another sentence not picked up by DIET such as Give me information about 10 from 2021-10-10 to 2021-11-01 - this would fail if DIET doesn’t pick up 10 instead of A10.

but you still need to do this in a custom component.

3 Likes