What are the common methods to determine intent
What are the common methods to determine intent
Many NLP APIs offer intent extraction like API.ai and wit.ai. However I'm unclear about their details. Do they do dependency parsing then extract relations, or simply taking out keywords from a sentence? How to parse "check if tomorrow is going to rain"?
Not yet. Still seem to be a very hard problem
– Yangrui
Aug 1 '16 at 1:04
1 Answer
1
There are a handful of approaches that I know of. They can be used together as an ensemble that outputs a score.
(1) Map intent to string literals. Compare these string literals for an exact match, or cosine similarity.
(2) Narrow down scope of possible intents based on context.
(3) Regex matches: if a sentence contains a characteristic regex (like phone number), then it can at least "narrow the scope" of intents to search for.
(4) Word Movers Distance: It is like word embeddings (i.e. deep learning NLP), but the whole sentence is passed in, and the aggregate distance from another sentence is compared.
(5) Use bidirectional LSTM: See tutorial or tensorflow.
(6) Keep a list of "candidate intents" using Named Entity Recognition (NER). spaCy does this. Even better is to use it for subject-object extraction.
(7) Use "fallback intents" if one isn't found. This could refer to "hierarchical intents" where the bottom-level leaves represent intents as you are referring to. This could also refer to an intent along the lines of "the bot has no idea what to say".
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
have you found anything??
– sdream
Jul 31 '16 at 12:38