ansteh / datamuse

node module for the Datamuse API
MIT License
38 stars 5 forks source link

Is it possible to request only specific part of speech? #1

Closed tbazko closed 7 years ago

tbazko commented 7 years ago

Would be nice if it'd be possible to request specifically nouns, verbs, adjectives etc. Is that possible somehow in current version?

ansteh commented 7 years ago

The official API http://www.datamuse.com/api/ allows to search for related words with context. Below code snippet performs a request for popular nouns modified by the given adjective. There are a lot of such constraints. Go to datamuse for more details. I hope i could help you.

datamuse.request('words?rel_jja=gradual')
.then((json) => {
  console.log(json);
  //do it!
});