I’m attempting to train a bot that uses Duckling to identify numbers and times. I had previously created the following entity slots:
- number
- timeAbs
- timeAgo
- yearBorn
- zipCode
- time
Duckling seems to find entities of its own that are called similar things. When I train interactively with Duckling and append the resulting data from the session, Duckling is creating synonyms and nlu.md data that are tagged to specific times and numbers:
Do you recommend that we rely only upon Duckling for training? It seems that Rasa NLU entities are decoupled completely from Duckling entities, and that Duckling does not feed features to Rasa NLU entity prediction. However, if we use Duckling entities only for training, we end up with these ultra-specific times assigned to the entities.
Finally, I want to confirm that all discovered Duckling entities must also be listed under “domain.yml”'s entities listing (i.e. time, number), or is this unnecessary?
So entities extracted by duckling shouldn’t be labeled in your training data. I think we fixed that in interactive learning either in 0.15.0 or in the latest master.
We would advise you rely on duckling to extract time, becasue it’s a lot more robust than trying to get the crf to extract them. You can post process these entities in a custom action if needed.
And yes, you should list any entities you want duckling to extract in your domain file. You can also restrict the ones that should be extracted in the dimensions section in your nlu config file
Given that the Duckling calls extracted entity time, you could just declare a slot called time. Slots are automatically populated with the entities of the same name.
Now, you are free to use this value in the template like any other slot. In essence:
Can I see the NLU pipeline configuration and the logs please? Is your Duckling server running?
Also, the value returned by Duckling is not a string. So setting slot type to text my be causing an issue. Try unfeaturized?
Lastly, I would still recommend making the custom action and handling the value over there. I’m assuming you’ll need to go that route eventually anyway.
Sorry for the late response. It seems to be working now. Apparently something went wrong while trainig the model. After some retraining and a reboot of the system it worked.
Thanks a lot for you help!