Remove greetings and salutations #11549
Replies: 3 comments
-
You could have a look at Holmes. |
Beta Was this translation helpful? Give feedback.
-
Thanks, could you elaborate a bit? Is there any code specific to greetings in Holmes? |
Beta Was this translation helpful? Give feedback.
-
Holmes aims to abstract away the variation between different sentences that are expressing similar ideas, which can reduce the number of intents you need in a chatbot situation. Alongside the main documentation at https://github.com/explosion/holmes-extractor/, you could have a look at the blog entry at https://explosion.ai/blog/introduction-to-holmes. Neither spaCy nor Holmes covers chatbot-specific requirements like recognising greetings, although you could certainly still define Holmes search phrases based on greetings. |
Beta Was this translation helpful? Give feedback.
-
Howdy, I'm working on intent detection in a chatbot, and using Matcher patterns. For example, an utterance such as "book a flight from NY to Chicago", can be matched using a pattern like:
[{"IS_SENT_START": true", LOWER": "book"}, {"LOWER": "a"}, {"LOWER": "flight"}, {"LOWER": "from"}, {"ENT_TYPE": "GPE"}, {"LOWER": "to"}, {"ENT_TYPE": "GPE"}]
However, I'd like to support slight variations such as:
"Hi Adrian, book a flight from NY to Chicago please, thx", without having to clutter my patterns with all possible greetings, and simply removing tokens using
is_stop
seems too crude. What's the recommended way to tackle this?Note, I do want to anchor to sentence start and sentence end to make sure that complex cases are handled properly. E.g., in an utterance such as "Hi, sorry for the late response, was a bit sick, please book a flight from NY to Chicago", while the basic intent hasn't changed we'd like to provide a more emphatic reply.
Beta Was this translation helpful? Give feedback.
All reactions