Wolfram Language

Synonyms and Antonyms

Synonyms and Antonyms are convenience functions that find words with similar and opposite meanings, respectively. This example explores the growth of the number of related words when you iterate the search for synonyms.

Search for synonyms and antonyms of a word.

By recursively calling Synonyms on a list of words, the meaning associated with the original list will gradually broaden, typically encompassing a large portion of words included in the dictionary in just a few iterations.

Starting with seed words taken from the Gettysburg Address, one can observe this phenomenon using NestList to track the exponential expansion of synonyms.

Select the eight longest words.

Iterate the use of Synonyms for each seed and represent the results in a logarithmic plot.

The curves saturate when they approach the size of the word collection.

Taking advantage of the same behavior, one can also see that the ever-broadening definition associated with recursive synonyms will eventually include antonyms of the original word.

Related Examples

de es fr ja ko pt-br zh