nlp.js
nlp.js copied to clipboard
date indicated in original slot messes slotManager process
It's not urgent
Describe the bug When indicating toCity and date and after replying to the fromCity question, answer misses fromCity even if context is complete. Same bug when indicating fromCity + date.
May be related to builtin (date) working as final slot? Order in addSlot shouldn't count (?)
To Reproduce [After upgrading to 2.1.1 (I spent 3h pulling hair with 2 different versions of node-nlp on the same machine)] I can't say for the MSBot, but the adaptation to terminal exposed this behavior:
travel to mpl today
bot> From where you are traveling?
bcn
bot>You want to travel from to mpl today
travel from bcn today
bot> Where do you want to go?
mpl
{ date: 'today', fromCity: 'bcn', toCity: 'mpl' }
bot> You want to travel from bcn to today
Expected behavior
You want to travel from bcn to mpl today
That only work for:
travel to mpl
bcn
today
and
travel from bcn
mpl
today
Additonal info
now is correctly interpreted as a datetime entity, but not showing in the final answer AND removing toCity (shifting?):
now
undefined (say(result))
{ toCity: 'mpl', fromCity: 'bcn', datetime: 'now', date: 'now' } (say(context))
bot> You want to travel from to mpl
I wish I could help more in the future and hope QT helps 😄
Please try with v4
Closing due to inactivity. Please, re-open if you think the topic is still alive.