Quick question about finding synonyms

I have a database of about 1000 words. I want to be able to enter a target word and return the five words in my database which are closest in meaning.

There seem to be a number of ways to do that, but I’m looking for the simplest. Any recommendations will be welcomed.

Thanks, Richard