This is part of the Two Weeks of Code.
SameAs: A very simple HTML5 mobile app. When presented with a definition, which two of the 5 options are the words that it defines? Playable at http://kryogenix.org/code/browser/sameas/.
All the hard work is taken from Princeton University’s WordNet.
I thought this would be more fun than it actually is: in practice, when you play it, it’s just too easy. Really, it needs to be cleverer about picking the alternative words: if the definition is “feeling embarrassed about yourself” and the words are breechcloth, shamefacedness, sheepishness, panicked, and cheops, it’s clear which two are the answers. Ideally it’d pick three alternatives which are similar to the correct answers in spelling or soundex code or something like that, but I’m afraid that it might end up picking words which actually do fit the definition and then people will complain that they got the answer right and the game whined at them anyway. Given that it’s not as much fun as I thought it would be, it didn’t get the work to do this. Still interesting for the WordNet parser, though.
On GitHub at: https://github.com/stuartlangridge/sameas.