4 ms·
Since some people are asking how it works, I'll explain how some of those work/fail. Q: Which word from list "duckweed, commendations, civilised, receptionists
by Xk 16y ago
Since some people are asking how it works, I'll explain how some of those work/fail.
Q: Which word from list "duckweed, commendations, civilised, receptionists, flours" contains the letter "v"? A: FAILURE
This one fails because it recognizes 'duck' as a word and doesn't know what the trailing characters are, so it fails to parse. Adding it to let a word be followed by extra characters makes it twice as slow, but makes it pass it, and so I didn't do that.
Q: Hand, jelly or Jennifer: the person's name is? A: jennifer
This is one of the tricky cases, because I convert to lower case when I pass to the parser. So if parsing fails and the word 'name' is in the string, then I return the first capitalized word and hope for the best.
Q: What is fifty three thousand seven hundred and one as digits? A: 53701
This one was an interesting exorcise in parsing as it is grouped ((fifty three) thousand) (seven hundred) and (one). I assume that all numbers are of the correct form, because it will parse 'one one and two' as the number 4 (1+1+2=4).
Q: If yesterday was Tuesday, what day is today? A: wednesday
This was just putting the dates in order and doing a lookup into the list.