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?
This answer 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.
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.
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 or semantic similarity 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.