I need a good scheme for choosing a keyword from a definition. The scheme must be universal because I'm reading from a list of 5000 words with definitions. This is for my hangman game I made, and I want to give the user a clue as to what the word is. At the end, wether they win or lose, I show them the definition. I've tried grabing the largest word in the definition and puting that as the clue, but sometimes the largest word means the direct opposite of what the word actually is.

Here is a few definitions in the list if that helps:

able-bodied adj. Competent for physical service.
ablution n. A washing or cleansing, especially of the body.
abnegate v. To renounce (a right or privilege).
abnormal adj. Not conformed to the ordinary rule or standard.

Any suggestions is greatly appreciated.

Recommended Answers

All 2 Replies

Not without editing the word file. If you could it would be ideal, and then just add a personalized clue on the same line as the word, separated by a delimiter. With that many words, however, that simply won't do. If the game is going to be online accessible, you could read the HTML output from something like "Thesaurus.com" or "dictionary.com" with the use of the thesaurus, rip apart the HTML, and grap a word that's a synonym. I know that these all seem fairly rough, but that's how I'd do it.

Not without editing the word file. If you could it would be ideal, and then just add a personalized clue on the same line as the word, separated by a delimiter. With that many words, however, that simply won't do. If the game is going to be online accessible, you could read the HTML output from something like "Thesaurus.com" or "dictionary.com" with the use of the thesaurus, rip apart the HTML, and grap a word that's a synonym. I know that these all seem fairly rough, but that's how I'd do it.

Thanks for the suggestion Comatose; that's not a bad idea at all. Maybe I could somehow blend my webcrawler in with the program to help out with the findings.
Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.