nlp.js icon indicating copy to clipboard operation
nlp.js copied to clipboard

date indicated in original slot messes slotManager process

Open j2l opened this issue 7 years ago • 1 comments
trafficstars

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 😄

j2l avatar Oct 17 '18 13:10 j2l

Please try with v4

Apollon77 avatar Aug 08 '22 21:08 Apollon77

Closing due to inactivity. Please, re-open if you think the topic is still alive.

aigloss avatar Nov 25 '22 09:11 aigloss