What are machine learning/deep learning models for generating contextually related words and synonyms? I have a task to work on models for finding synonyms and contextually related words.
For example, if I enter:


'car' it should generate -> 'vehicle'
'sun' and 'sea' could generate 'beach', or some other related word to the first two. 


So I used so far word2vec and nltk to generate examples.
But since I am not an expert on NLP I really find it difficult to use other algorithms or to build my neural network architecture. 
I would appreciate it if someone can give me other suggestions and some explanations, that could be useful.
For synonyms I would directly use WordNet.

[added] For contextually similar words the traditional approach is to extract a context vector for every target word:


for every occurrence of a target word extract the words within a -/+ N window (e.g. N=5).
for every target word aggregate all its context words in a single context vector over the whole vocabulary.


Finally once a context vector has been calculated for every target word a similarity measure can be used, for example cosine. That means for every target word, compare its vector against any other candidate. 

The same approach can be used with word embeddings instead of context vectors.