Here is a list of 1000 basic English words. Yes, I'm aware that there are only 997 words in the list! It was taken from Wiktionary so blame them!
Your task is to write a program that accepts a word and returns TRUE
or FALSE
(or 0
or 1
) depending on whether the word is in the list or not. You must use the spelling as it appears in the list, so it is colour
, not color
(sorry Americans!). As far as I am aware, there is only one word in the list that uses a capital letter: I
. This means that i
(Roman numeral for 1) should return FALSE
. All other words may be spelt with an initial capital letter, i.e. Colour
should return TRUE
.
Rules for letter cases: Your program should return TRUE
for any word that has just the first letter capitalised. If the entire word is capitalised, e.g. COLOUR
it's your choice whether it is correct or not, as long as it is found in the word list in its lowercase form. If you accept COLOUR
you must accept all other words entirely in capitals. If you don't accept COLOUR
you must not accept any other word entirely in capitals. Any other mixture of lower and upper case e.g. coLoUR
should return FALSE
. As stated above only I
is correct, not i
. Briefly, both lowercase colour
and titlecase Colour
must be TRUE
, uppercase COLOUR
may be either TRUE
or FALSE
and any other mixed case must be FALSE
.
Standard rules apply, you may not use external libraries or spelling libraries built into your language, etc. If you use any external files, such as reading the word list via the internet, you must include that number of bytes in your score. Reading the uncompressed word list will add 5942 to your score.
Your code must be at least 95% accurate, including both false positives and false negatives. So if you have 30 false positives and 20 false negatives there are 50 errors in total which is acceptable (even though there are only 997 words, 94.98% accurate if you're being pedantic). One more false positive or false negative invalidates your code. You must post all the errors for verification. Don't make people guess where the errors are!
Shortest code in bytes wins. Add 10 points for each error. Please post a non-golfed version of your code as well so that other people can try to break it / verify that it works. If you can provide a link to a working online version that would be great! The list is 5942 bytes long so ideally you want your code to be shorter than that.
Start your post with the following:
<Language> - Bytes: <num>, False +ves: <num>, False -ves: <num> = Score: <num>
Score = bytes + 10 × (false_pos + false_neg)
I might provide a list of false positives to check against as people post answers.
Colour
returnsTRUE
, what aboutcOlOUr
? \$\endgroup\$