📜 ⬆️ ⬇️

JS Programming Contest: Word Classifier

Hola announces the start of the spring programming contest! The prize fund increased:

  1. First place: 3000 USD.
  2. Second place: 2000 USD.
  3. Third place: 1000 USD.
  4. We may decide to mark someone’s extremely original solutions with two special prizes of 400 USD.
  5. If you send someone a link to this contest, putting our address in CC, and this person will take the prize, you will receive half of the prize amount (of course, not to the detriment of the winner’s reward). For one winner, only one person can receive such an award - the one who sent the link first.

We are looking for talented programmers, so authors of interesting decisions will be invited for interviews.

Posted addition: Test program, frequently asked questions, common mistakes .
Posted addition: On the course of testing .

')

rules


This time we decided to try something new: for a change, this competition is not about code performance .

Competition terms in English are posted on GitHub . Below is a translation into Russian.


Formulation of the problem


You need to write a program that distinguishes the words of the English language from sequences of characters that are not words. In this problem, we consider the words of the English language those and only those lines that appear in the list of words.txt attached to the condition. Membership in the list is case-insensitive. It would seem that this is simple - you only need to check whether the string is found in the dictionary - if it were not for the limit on the size of the solution in 64 KiB.

It is hardly possible to write a program that would fit into the constraint and always give the right answers. But 100% correct answers are not required. We measure how often your program will respond correctly, and the program that gives the largest percentage of correct answers will win.

API

Your JS file must be a module for Node.js, exporting two functions:

init(data)

. , . data ( Buffer), , undefined .

test(word)

true, word , false . .

. , Buffer init. 64 JS-, . , gzip. , zlib.gunzipSync , init. , JS , . , , ; 64 .


. , — - , dknwertwi - sonicative. ASCII-, , ' ().

, hola.org/challenges/word_classifier/testcase. , . — . , , , . JSON-, 100 , — true false , ( ). , , . .

. , init, . , Buffer, , init data. test . , , .

, . 100 . . 100 , , . . , , .


. .

, , , , . — , , , . , , , . CoffeeScript, . README ( ). , , — . , , tar.gz zip, . 64 . , . , .

, , , .

!

Source: https://habr.com/ru/post/282624/


All Articles