bsky
bsky

Reputation: 20242

Get a word's synonyms

Is there an API where for a given English word I can get a set of its synonyms? If not synonyms, then at least words used in similar contexts.

My goal is to construct sentences with similar structure.

For instance, from this:

Jason found 49 seashells and 48 starfish

I would like to obtain this:

Joan grew 29 carrots and 14 watermelons

Upvotes: 0

Views: 258

Answers (2)

Qaisar Rajput
Qaisar Rajput

Reputation: 791

If you are using Python then you can use NLTK. It has the most used Wordnet which can provide you with

  • Synonyms
  • Hyponyms
  • Hypernyms
  • Meronyms
  • Holonyms

Upvotes: 2

user3639557
user3639557

Reputation: 5311

Wordnet is your answer. You can call it in bash, or from Java, etc.

Upvotes: 2

Related Questions