Replace words with different synonyms and print each combination in a text file

Sorry, but now it’s not

newWord(word,“syn1,syn2,syn3,…”)

anymore. Do I have to add the words with path?