Many synonyms are context specific. For example "force" is a synonym for "drive" in the context of urging or inspiring, but not in the context of journeying by vehicle.

Other synonyms seem to work across all contexts, for example "sea" and "ocean".

How can I get a list of all synonyms that work across all contexts?


Reflecting on TimLymington's comment, is there some measure of synonym distance?

Consider some of the words that thesaurus.com offer as synonyms for sea: expanse, lake, ocean, pond, surf, abundance and blue. Intuitively, I'm confident I can replace sea with ocean more often than with blue. So I could say ocean has a shorter synonym distance from sea than blue.

How can I measure this distance? And, back to my question of a list, how can I get a list of all synonyms with distances?

(n.b. same question on English stackexchange)

  • 1
    this may be a question to ask on english.stackexchange.com – albert Oct 16 '15 at 1:16
  • 1
    @albert right, it sits across both. I've added a copy to the English SE – Ollie Glass Oct 16 '15 at 8:27
  • 1
    What you need is to determine how many meanings a word ('term') has -- as each meaning ('concept') might have different synonyms. Also consider a full fledged thesaurus (thesaurus.com and Roget's Thesaurus are 'synonym rings', not thesauri in the library science sense of the word), as they might distinguish between spelling variations (always the same), synonyms (the same for that concept) and equivalent terms (roughly the same for that concept). – Joe Oct 16 '15 at 12:25
  • @OllieGlass cool....wasn't sure exactly where it sat, but hopefully between the two you get your answer – albert Oct 16 '15 at 13:50
  • 1
    Very bizarre response from English SE. Hopefully OD can do better. – philshem Oct 18 '15 at 12:17

This isn't a super answer, but maybe it can start some discussion...

  1. Let's consider only topical words, so ocean, sea, lake, pond, river, and stream.

  2. Let's then download (scrape) as many dictionary, thesaurus and encyclopedia entries as possible, and dump the results as text files ocean.txt, sea.txt, etc...

  3. Remove stop words such as the from each of the .txt files

  4. Compute frequencies of other words (with same part of speech) that appear in the .txt file.

  5. Using a simple definition as an example, we can parse the text and count the most frequent words: sample python 2.7 code

    # -*- coding: utf-8 -*- 
    import string
    from collections import Counter
    text = '''noun: ocean; plural noun: oceans
    a very large expanse of sea, in particular each of the main areas into which the sea is divided geographically.
    "the Atlantic Ocean"
    synonyms:   (the) sea; informalthe drink;
    informalthe briny;
    informalsalt chuck;
    literarythe deep, the waves, the main, the foam, the profound;
        North American
        the sea.
        noun: the ocean
        "they scramble across the beach to the ocean and plunge into the surf"
        a very large expanse or quantity.
        "she had oceans of energy"
        synonyms:   a lot, a great/large amount, a great/good deal, plenty, quantities, an abundance, a profusion; informallots, loads, heaps, bags, masses, stacks, oodles, tons, scads;
        informallashings, a shedload;
        informala swag;
        vulgar slanga shitload;
        vulgar slangan assload
        "she had oceans of energy"
    Middle English: from Old French occean, via Latin from Greek ōkeanos     ‘great stream encircling the earth's disc’. ‘The ocean’ originally denoted the whole body of water regarded as encompassing the earth's single land mass.
    text = text.translate(string.maketrans("",""), string.punctuation) # remove punctuation
    text = text.lower()
    word_freq = Counter(text.split())
    for word, count in word_freq.most_common(10):
        print word, '\t',count

gives as an output

the     16
a   7
of  5
sea     4
ocean   4
oceans  3
noun    3
synonyms    2
had     2
main    2

Removing stop words, we can see that sea shows up 4 times, while the other "bodies of water" words don't show up. (The words beach, waves and shitload each show up once, interestingly.)

  1. With enough text data for each word, you can build synonym distances. I'd guess that for articles related to "ocean", sea will show up 10x more than lake and river.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.