Readfirst · vocabulary for one book

Learn the words that open sentences

Frequency lists teach the words a book uses most. But you can read a sentence only when you know every word in it. Readfirst orders a book's vocabulary so that whole sentences become readable as early as possible, proves how close that order is to the best one possible, and turns the book into a course: study a few words, read a few pages, repeat.

Eleven public-domain books, four languages

This plan Most frequent words first Best any order can do

Words needed to read

"Fewest possible" is a proof: no order of this book's words reaches that share with fewer words.

The plan, word by word

Each word comes with a sentence from the book that it makes fully readable. The last column is the share of the book's sentences readable after that word.

    From plan to course

    A learner wants to read the story, in order. So the course cuts the book into sessions that grow from one page to about four. Before each session you study only the words worth learning for it, in the order that opens up its sentences soonest, and you read with glosses for the rest. Every learned word is taught just before the first page that uses it, so the rest of the book reviews it.

    Which words are worth learning is a rent-or-buy choice. A word can be glossed every time it appears (rent) or learned once with a flashcard (buy, which the course counts as six look-ups). On its own each word is easy to decide; what ties them together is comfort, because no sentence may need more than one, two or three glosses. Readfirst solves the whole book at once as an integer program and proves the result optimal, in under a second even for Don Quijote.

    What the numbers showed

    Open the Marianela study pack: the reader with every session, its word list and glossed pages. The same files come with an Anki deck in study order.

    How it works

    A scheduling problem

    Learn one word per step. Each sentence becomes readable at the step its last unknown word is learned. Making sentences readable as early as possible means keeping the sum of those steps small:

    minimise  Σsentences step at which the sentence's last word is learned

    That is a classic problem from operations research: scheduling jobs on one machine with prerequisites. Words are the jobs; a sentence is a job that can only finish after all of its words.

    Densest clusters first

    J. B. Sidney showed in 1975 that good schedules come in blocks. First learn the set of words that completes the most sentences per word learned. Then do the same on what is left, and so on.

    Finding that set is the densest-subgraph problem, which a max-flow computation solves exactly. Any order that keeps to the blocks is within a factor of two of the best. Inside a block, Readfirst picks words greedily, one completed sentence at a time.

    A proof comes with it

    The block boundaries trace the upper envelope of what any set of words can make readable. So the dashed line on the chart is a hard limit, and the plan touches it at every block boundary.

    On these eleven books the plan is within two words of the proven minimum at 50 percent and within 1 percent of it at 75 and 90 percent. The decomposition and its proof take under half a second, even for Don Quijote.

    How the claims are checked

    What it assumes

    Use it on your own book

    Give it any plain-text book. course writes a study pack: the reader page, an Anki deck in study order and a word list. The plain command prints the table above for your text and writes the sentence plan.

    pip install simplemma ortools wordfreq numpy genanki
    python -m readfirst.dictionary fetch          # meanings: es, fr, de, en
    python -m readfirst course my-book.txt --lang es --comfort balanced --out pack/
    python -m readfirst my-book.txt --lang es --know-top 1000 --plan plan.tsv