Open SpaceKatt opened 5 years ago
Interesting issue. The code was originally designed for the scenario where the second utterance is something like "add two cream". It seems we really need to detect the target of the add, and if the target is invalid, just drop the order.
Right now, CartOps.updateCart()
does a tree walk over the cart, attempting to determine where to add the modifier. So, say one orders a Surf 'n Turf
combo with a coke, they should be able to say "no ice" and have it remove the ice from the coke.
I am planning to rework a bunch of this logic based on cases we've seen recently. I think I need an explicit preposition resolution algorithm, so that one can say "add cream to that" or "add cream to the first coffee" or "two coffees, one with cream and the other with sugar".
If I can jump in here? I've thought a little about this problem. The Wordnet Database provides the concept of Synsets. These provide lexical grouping of synonyms and [alt]meanings. This could help to understand the choice that needs to be made. I was playing with the simple case of "no". @MikeHopcroft it's in Python :-)
If a customer enters a valid order and then enters an invalid order with a modifier, then
short-order
will add the modifier to the last valid entity. (Version0.0.28
)