DEV Community

Ryah
Ryah

Posted on Fully Autonomous

She knew the sounds. The sentences kept cheating.

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🀝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

My eight-year-old daughter was struggling to read, so I built this for her. Blending sounds into words is the part she finds hard.

The problem is simple to state. A child learning to read is taught letter-sounds a few at a time.
A sentence is only real practice if every word in it can be sounded out with the sounds she has so far.

Most "easy" sentences fail. The duck is in the pond looks like beginner material. But a child who
knows c and k, and has not yet been taught that ck is one sound, cannot read duck. She can
only guess, and guessing is the habit you are trying not to build.

So I built readable-for-her: you tell it which sounds she knows, and it gives you sentences she
can read every word of.

$ readable --stage 3 --count 8
Letter-sounds: s a t p i n m d g o c k   Sight words: the

 1. The pot is in the pit.
 2. Sid got a tan map.
 3. Pam sat on the mat.
 4. A man is mad.
 5. Dad can mop in a pan.
 6. A cat is sad.
 7. A kid can sit.
 8. A dog can stand.
Enter fullscreen mode Exit fullscreen mode

Twelve sounds and one sight word. Nothing on that page is out of her reach.

It also checks sentences you already have:

$ readable --check "The duck is in the pond" --stage 3
ok   The          (sight word)
NOT  duck         uses a sound she has not met
ok   is           i-s
ok   in           i-n
ok   the          (sight word)
ok   pond         p-o-n-d

1 word(s) she cannot sound out yet.
Enter fullscreen mode Exit fullscreen mode

It follows the way she is actually being taught

At home she practises blending by ear first, with no letters, before she reads printed words.

A child who cannot blend sounds by ear will not blend them from print. So the tool is a ladder, and
sentences are the sixth rung, not the first:

  1. Listen. No letters. I say "a ... m", she says "am".
  2. Two-sound words. at, in, am.
  3. Three-sound words, sounded out: m-a-p, map. Words that start with a sound you can stretch (mmm, sss) come first.
  4. Chains. tin, pin, pit, sit, kit. One sound changes each time.
  5. Phrases. the cat and the dog.
  6. Sentences.
  7. A story. Five sentences about one person. That is actual reading.
$ readable --step story --stage 3 --count 5
Kim is on the mat.
Kim sat on the pit.
The map is in the pan.
Kim got the pot.
Kim is mad.
Enter fullscreen mode Exit fullscreen mode

Every step prints the same rule for moving on: four out of five without help, on two different days.
I decide. The tool never promotes her by itself.

None of these techniques are mine. They are the usual ones from phonics teaching: blending by ear before print, saying each sound and then pushing the sounds together, starting with sounds that can be held (mmm, sss) because they are easier to join, and changing one sound at a time so she has to look at every letter. The tool puts them in order and keeps every word inside the sounds she knows.

Demo

Eight sentences made from the first three letter-sets

Checking a sentence: the word duck is flagged as not yet readable

A five-sentence story chosen by the local model

Word chains where one sound changes each time

Code

https://github.com/ryahai/readable-for-her

GitHub logo ryahai / readable-for-her

Practice sentences a beginner reader can actually sound out, ranked for sense by a small open-weight model that runs locally.

readable-for-her

Practice sentences a beginner reader can actually sound out.

You tell it which letter-sounds a child has been taught so far. It writes short sentences using only those sounds, then a small open-weight language model running on your own computer puts the ones that make sense at the top.

$ readable --stage 3 --count 8
Letter-sounds: s a t p i n m d g o c k   Sight words: the
Ranked for sense by a local model, best first (463 considered):

 1. The pot is in the pit.
 2. Sid got a tan map.
 3. Pam sat on the mat.
 4. A man is mad.
 5. Dad can mop in a pan.
 6. A cat is sad.
 7. A kid can sit.
 8. A dog can stand.

Every word above uses only the twelve sounds in the first three sets, plus the sight word "the".

Eight sentences for the first three letter-sets

The images in…

How I Built It

The tool has two parts, and the split between them is the whole design.

Rules decide what she can read. A word is readable only if it can be cut, left to right, into
letter-sounds she has been taught. Digraphs are strict: duck needs ck, bell needs ll, and
knowing l on its own does not unlock ll. Sentences are assembled from about 140 short regular
words and thirteen sentence shapes. This part cannot put an unreadable word on the page, and one of
the tests proves it by generating sentences at all seven stages and checking every word.

A model decides what makes sense. Rules are happy to write A mat can dig. They have no idea a
pig is the one that digs. That judgement is what a language model is for, so each candidate sentence
is scored by SmolLM2-135M, an
open-weight model, running locally through Transformers.js. The score is how surprised the model is
by the sentence. The cat sat on a mat scored 6.5; The mat sat on a cat scored 8.8.

The model never writes anything. It only ranks. That was deliberate: a 135-million-parameter model
asked to write under a spelling constraint will break the constraint. Asked only "which of these
sounds like something a person would say", it is good enough, and it cannot do any harm.

One thing went wrong on the way. The first version sorted by raw score, and the page came back as
eight copies of X is on the Y. A language model finds short, common patterns least surprising, so
the shortest shape won every time. The fix was to compare each sentence only with others of its own
shape, and to cap how many of one shape a page can hold.

A second thing went wrong, and it was worse. The digraph rule had a hole: at the third letter-set the
tool offered sock, sounded out as s-o-c-k, because she knew every letter in it. That is the exact
mistake the tool exists to prevent. It was caught when the word list for the "three-sound words"
step printed it. The rule now says two letters that make one sound must be read as one
sound, and there is a test with sock in it.

For stories the model does a different job: it reads the story so far together with each possible next
sentence and keeps the one that follows most naturally. Left alone it repeats itself (Kim is on the
mat. Kim sat on a mat.
), so a sentence must end somewhere new and must not be built like the one
before it.

It runs on an 8 GB laptop with very little memory to spare: about 400 MB for the model, and roughly
a tenth of a second per sentence.

I should say plainly how it was made. I set the goal and the rules; the code and tests were written
by an AI coding agent (Claude Code). The model inside the tool is the open one.

Why Does Open Innovation Matter?

Three reasons, all of them practical.

It runs where she is. After the first download it needs no internet. A reading page for a
child should not depend on a connection or an account.

It costs nothing to run. A fresh page is one command. With a paid API I would ration them.

I can see what it is doing, and so can you. The word bank is a file. The sentence shapes are a
file. If your school teaches sounds in a different order, you pass your own list. If you want a
different model, it is one flag. None of that is possible when the reading scheme lives inside
someone else's product.

A closed model would also have been the wrong tool even if it were free. I did not need a model that
writes well. I needed a small one I could run a few hundred times a page, purely as a judge.

Handing it over

I tested the finished tool with her, using the story step. She tried it and it worked well.

Prize Categories

Overall prize only. This project does not use any partner technology.

Top comments (0)