-1
\$\begingroup\$

Take an input of a noun or list of nouns (your choice), and return the plural form of that word.

Your program will be scored on the list of 4205 words below, which are all the words in the google-10000-english-usa-no-swears.txt file which were both determined to be nouns and have a known/valid plural by combining some Mathematica code with a Python library to detect words already pluralized and a little bit of manual editing.

Github link with both files

When given a word in fixedSingulars as input, your program should return the plural form of that word as given in fixedPlurals. If the word at that position in fixedPlurals is identical (other than capitalization if your program messes with that) to the output of your code, it qualifies as a success. Your total number of successes will then be divided by 4205 (the length of the lists) to get your accuracy.

Your score will be determined by taking the reciprocal of the accuracy to the fifth power and multiplying that by the number of bytes, so \$(\frac{1}{a})^5\cdot l\$, where \$a\$ is the accuracy and \$l\$ is the length of the code. Lowest score wins.

As an example, a basic solution which simply appends an "s" to every word scored a 76.4 (on an old version of the dataset, but still should be similar score-wise) due to only being 7 characters long, but having 62% accuracy. On the other hand, a 60 character program scores very similarly if it has 95% accuracy, while a 1-byte program only would need to get 42% correct to arrive at the same score.

Rules:

  • Any reasonable I/O is permitted
  • The result of the program must be known, either through it being fast enough that it can be run directly, or through using an algorithm that is reproducible elsewhere to that the result of running it on the full word list is known
  • The program must be deterministic
\$\endgroup\$
16
  • 1
    \$\begingroup\$ How are "a", "in", "files" singular nouns? \$\endgroup\$
    – emanresu A
    Dec 31 '21 at 20:11
  • 1
    \$\begingroup\$ "as" is not the plural of "a". \$\endgroup\$
    – emanresu A
    Dec 31 '21 at 20:12
  • \$\begingroup\$ One a. Two (aa) as. SCNR \$\endgroup\$ Dec 31 '21 at 20:14
  • 1
    \$\begingroup\$ Ok, but "ins" and "ats" aren't even words. \$\endgroup\$
    – emanresu A
    Dec 31 '21 at 20:20
  • 5
    \$\begingroup\$ newsings.txt has 3062 words while newplurals.txt has 5817, so they clearly don’t correspond; how is one supposed to tell what the expected outputs are? Only 4359 words in newplurals.txt are unique; the rest are duplicates. 967 words are listed in both files. newplurals.txt is missing a } at the end. And those are just the obvious problems one can see without even looking at the words. Near the very beginning of newsings.txt we have the plurals “services” and “products” (but also “product”), while the very first word of newplurals.txt is “as”. This needs a lot more checking. \$\endgroup\$ Dec 31 '21 at 22:45