Shoubhik Hexa
Shoubhik Hexa

Reputation: 23

Is there any api to get all words regarding a particular topic available in english grammar

I am working on NLP with python and my next step is to gather huge-huge data regarding specific topics available in English grammar.

For example : all words that can define a "Department" say "Accounts".

So can any tell me how I can gather such data (if possible, through any API).

Upvotes: 0

Views: 1300

Answers (1)

Patrick Maynard
Patrick Maynard

Reputation: 314

NLTK wordnet is a great framework for these kind of problems. Here is a brief documentation: http://www.nltk.org/howto/wordnet.html This uses things objects like "synset" which gives you words with common meanings. There are also ways to get a numerical score for the similarities of two words. Lemmas will give you words with similar root meanings.

If you are looking for more of a find related words (ex: "spaghetti" --> "pasta", "ravioli", "Italy" database is probably better: https://www.datamuse.com/api/

Upvotes: 2

Related Questions