2

I recently stumbled upon this question asking for recommendations for an offline command-line dictionary.

In the same spirit, is there any offline command-line thesaurus available for Ubuntu?

0

Not on the Debian and Ubuntu repositories but you can try this one out from Github davidgu/thesaurus-cli.

Installation instructions and usage are on the repository link.

  • Thanks. Went through the code of the client, and it is astonishingly simple -- just parses thesaurus.com. Works on my raspberry pi (raspbian). – Nurmister Oct 1 '18 at 18:24
0

Wasn't able to run the proposed answer, failed in installation, also seems like thesaurus.com has gone javascript-only. So I quickly wrapped up this as I wanted this myself:

perl -wlE 'use Mojo::JSON qw/decode_json/; use Mojo::UserAgent; my $word = shift; my $tx = Mojo::UserAgent->new->get("https://www.thesaurus.com/browse/" . $word); if ($tx->res->body =~ /<script>window.INITIAL_STATE = (.*?);<\/script>/) { my @defs = @{ decode_json($1)->{searchData}->{relatedWordsApiData}->{data} }; print "$word:"; for my $def (@defs) { print "  $def->{definition}:"; print "    synonyms: " . join ", ", (map { $_->{term} } @{ $def->{synonyms} }); print "    antonyms: " . join ", ", (map { $_->{term} } @{ $def->{antonyms} }); } } else { die "$word not found" unless $word; }' clumsy
clumsy:
  crude, awkward:
    synonyms: bad-mannered, barbaric, bearish, cantankerous, churlish, cloddish, clodhopping, clownish, clumsy, coarse, countrified, gross, gruff, ill-bred, ill-mannered, impolite, inurbane, loud, loutish, lowbred, oafish, ornery, out-of-line, out-of-order, provincial, rough, rude, rustic, swinish, tasteless, ugly, uncivilized, uncouth, uncultured, uneducated, ungracious, unpoised, unpolished, unrefined, vulgar
    antonyms: delicate, gentle, smooth, sophisticated, refined, polished, nice, exciting, cultured, charming, pleasant, polite, mannerly, kind
  unskillful:
    synonyms: awkward, blundering, bungling, butterfingered, clumsy, gauche, graceless, inept, maladroit, unpolished
    antonyms: 
  vulgar, unpolished in manner:
    synonyms: awkward, backward, barnyard, boorish, cheap, cloddish, clumsy, coarse, crass, dirty, earthy, filthy, foul, grody, gross, ignorant, ill-bred, indecent, indelicate, inelegant, insensible, lewd, loud, loud-mouthed, loutish, lowbred, oafish, obscene, raunchy, raw, rough, rude, savage, smutty, tacky, tactless, uncouth, unenlightened, ungainly, unskillful
    antonyms: formal, polished, gentle, delicate, smooth, nice, pure, decent, clean, sophisticated, refined, stilted, planned, tasteful, moral, kind, polite
  vulgar, unpolished in manner:
    synonyms: awkward, backward, barnyard, boorish, cheap, cloddish, clumsy, coarse, crass, dirty, earthy, filthy, foul, grody, gross, ignorant, ill-bred, indecent, indelicate, inelegant, insensible, lewd, loud, loud-mouthed, loutish, lowbred, oafish, obscene, raunchy, raw, rough, rude, savage, smutty, tacky, tactless, uncouth, unenlightened, ungainly, unskillful
    antonyms: formal, polished, gentle, delicate, smooth, nice, pure, decent, clean, sophisticated, refined, stilted, planned, tasteful, moral, kind, polite
  cumbersome:
    synonyms: awkward, bulky, clumsy, heavy, hefty, ungainly, unmanageable, unwieldy
    antonyms: 
  tactless, unsophisticated:
    synonyms: awkward, bumbling, clumsy, crude, graceless, green, halting, ham-handed, heavy-handed, ignorant, ill-bred, ill-mannered, inelegant, inept, insensitive, lacking, maladroit, oafish, uncouth, uncultured, unhappy, unpolished, wooden
    antonyms: sophisticated, refined, polished, tasteful, tactful, mannerly, graceful, elegant

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.