how to provide alternate for a word in corpus for word2vec model

I need to specify semantically close words in a corpus. For instance newspaper/magazine in the following:

$\log P(w_i|h) \rightarrow \log P(w_i|h) + \lambda \frac{1}{|S|} \sum_{(i,j) \in S} sim(w_i, w_j)$ where $S$ is the set of synonyms, and $sim$ is your word similarity function (e.g., cosine similarity).