Answers.Body: <p><a href="https://ai.stackexchange.com/a/5171/2444">This answer</a> describes the "word vector" toolkit in NLP. The result of analyzing a large corpus to find words that occur in similar context provides dense vectors for each word that can then be used for similarity. For bots, the goal is generally a similarity and not exact synonyms. Synonyms can be hard-coded using WordNet if needed. For your greeting question, following blog post can help: <a href="https://medium.com/rasa-blog/do-it-yourself-nlp-for-bot-developers-2e2da2817f3d" rel="nofollow noreferrer">Do-it-yourself NLP for bot developers</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-01-31T03:04:43.117Z
Answers.LastActivityDate: 2019-06-25T22:18:17.173Z
Answers.LastEditDate: 2019-06-25T22:18:17.173Z
Answers.UserDisplayName: Adnan S
Answers.Body: <p>There is pretty simple way:
  Write a program that analyzes large amounts of texts. Find sentences that contain our greeting. Then find exact same sentences except that instead of our word there is another word. The more such examples you find the higher is probability that it is synonim and not word from same category with different meaning.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-28T09:44:51.450Z
Answers.LastActivityDate: 2018-01-28T09:44:51.450Z
Answers.UserDisplayName: Tone Škoda
Answers.Body: <p>You could train a model to classify sentences into user intents. For example, an intent could be "greeting". Another intent could be "help", or any other capability that your bot is able to talk about.</p>
  
  <p>To train you model, you should provide several examples for the same intent. For example, for "greeting", you could provide "Hi", "Hello", "What's up", etc...</p>
  
  <p>You should also apply some preprocessing before feeding sentences into your model, such as <a href="https://www.offconvex.org/2015/12/12/word-embeddings-1/" rel="nofollow noreferrer">word embeddings</a> or <a href="https://stackoverflow.com/questions/14148986/how-do-you-write-a-program-to-find-if-certain-words-are-similar/14638272#14638272">semantic similarity</a>  with WordNet. These techniques allow to transform strings into representations that capture the similary of word meanings.  The ability of your model to detect synonyms without being retrained will highly depend on this preprocessing. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-01T09:22:15.737Z
Answers.LastActivityDate: 2018-04-01T09:41:09.410Z
Answers.LastEditDate: 2018-04-01T09:41:09.410Z
Answers.UserDisplayName: jaime
Body: <p>I have started to make a chatbot. It has a list of greetings that it understands and responds to with its own list of greetings.</p>
  
  <p>How could a bot learn a new greeting or a synonym for a word it already knows?</p>
  
Tags: <natural-language-processing><chat-bots>
Title: How could a chat bot learn synonyms?
UserDisplayName: anonymous
ThreadText: # How could a chat bot learn synonyms?
  
  (Asked by: username_0 on 2018-01-28)
  
  I have started to make a chatbot. It has a list of greetings that it understands and responds to with its own list of greetings.
  
  How could a bot learn a new greeting or a synonym for a word it already knows?
  
  **Tags:** natural-language-processing, chat-bots
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2018-01-31. Score: 2
  
  [This answer](https://ai.stackexchange.com/a/5171/2444) describes the "word vector" toolkit in NLP. The result of analyzing a large corpus to find words that occur in similar context provides dense vectors for each word that can then be used for similarity. For bots, the goal is generally a similarity and not exact synonyms. Synonyms can be hard-coded using WordNet if needed. For your greeting question, following blog post can help: [Do-it-yourself NLP for bot developers](https://medium.com/rasa-blog/do-it-yourself-nlp-for-bot-developers-2e2da2817f3d).
  
  
  ---
  
  ### Answer by username_2 on 2018-01-28. Score: 1
  
  There is pretty simple way:
  Write a program that analyzes large amounts of texts. Find sentences that contain our greeting. Then find exact same sentences except that instead of our word there is another word. The more such examples you find the higher is probability that it is synonim and not word from same category with different meaning.
  
  
  ---
  
  ### Answer by username_3 on 2018-04-01. Score: 1
  
  You could train a model to classify sentences into user intents. For example, an intent could be "greeting". Another intent could be "help", or any other capability that your bot is able to talk about.
  
  To train you model, you should provide several examples for the same intent. For example, for "greeting", you could provide "Hi", "Hello", "What's up", etc...
  
  You should also apply some preprocessing before feeding sentences into your model, such as [word embeddings](https://www.offconvex.org/2015/12/12/word-embeddings-1/) or [semantic similarity](https://stackoverflow.com/questions/14148986/how-do-you-write-a-program-to-find-if-certain-words-are-similar/14638272#14638272) with WordNet. These techniques allow to transform strings into representations that capture the similary of word meanings. The ability of your model to detect synonyms without being retrained will highly depend on this preprocessing.
  
  
  ---
  
  