Roboy / ravestate

✨ Ravestate is Roboy's reactive dialogue state library.
http://roboy.github.io/ravestate
BSD 3-Clause "New" or "Revised" License
25 stars 7 forks source link

Triple.match_either_lemma not matching subtree tokens #109

Closed umursen closed 5 years ago

umursen commented 5 years ago

Example: I want vanilla ice cream

Technically, the whole phrase vanilla ice cream is the object, with vanilla <- ice <- being subtree tokens of cream. Currently, Currently, match_either_lemma considers only the head token cream as the object, so it returns false when calling match_either_lemma(obj={"vanilla"}).

As an NLP user, I expect match_either_lemma to recognise tokens within the subtree of the phrase head.