dariusk / rapbot

MIT License
64 stars 12 forks source link

Weird part of speech issues. #4

Open aprotim opened 11 years ago

aprotim commented 11 years ago

Consider the rhyme:

My rhyme profile makes the ladies decorum Master of the game, I'm the rap quorum

"http://www.wordnik.com/words/decorum" lists only nouns, but it seems to have been fitted into a sentence marked "verb-transitive"

dariusk commented 11 years ago

Yeah, the randomWords API call is really inconsistent. I was hoping I could get away with:

var url = "http://api.wordnik.com//v4/words.json/randomWords?includePartOfSpeech="+pos+"&excludePartOfSpeech=proper-noun-plural,proper-noun-posessive,suffix,family-name,idiom,affix&minCorpusCount="+minCount+"&hasDictionaryDef=true&limit=1000&api_key=" + APIKEY;

As a generic function, but it looks like I'm going to need to put in special cases. For example, if I'm passing in "verb-transitive" as the part of speech, I'm going to need to add "noun" to the list in the excludePartOfSpeech parameter.