Content engineeringprototype

Thai Lessons

Forty years of public-domain language teaching, locked inside scanned PDFs nobody can search.

The classroom problem

Four Peace Corps Thai courses sit in the public domain as scanned PDFs and numbered MP3s. The teaching is sound and free to anyone. Reaching it takes work: a scan resists search, a page image resists drilling, and matching a lesson to its audio means counting files by hand. Good material, locked up.

The design decision

Treat extraction as the risky part, and make the build refuse bad data.

That instinct paid. This course hides its phonetics in a font that maps tone marks and IPA vowels into the Unicode private use area — characters that look fine in a PDF reader and arrive as garbage in any text layer. An early version checked romanization for missing vowels, missed those glyphs, and shipped corrupted entries. The integrity check now fails the build.

Rejecting them cost half the course: 51 of 99 entries thrown out as damaged. They were recoverable. The tone marks sat at a fixed offset from their real codepoints, and the phonetic symbols formed a small glyph table that each row’s Thai spelling confirms. Decoding both brought all 99 back.

Getting the words right solved one problem. Putting them in front of a learner solved a different one: Lesson 4 opened as eighteen numbered sentences, a nine-turn dialogue, and a language note, all on one scroll. Nothing on the page said where to stop.

The fix is chunking: every lesson’s content now sits inside a collapsed panel per topic, and any list longer than six items splits into labeled groups of that size. Lesson 4’s eighteen sentences became three groups of six; Lesson 6’s thirty-two numbers became four groups of eight. Opening a group marks it with a checkmark, stored in the browser. Two groups in, the third is obvious.

Every lesson with vocabulary, sentences, or a counting table also got a matching game built from its own data: up to six random pairs, real buttons, a move count and a time shown once the last pair is found. It’s the same principle the review mode already banked on: a fact tested sticks better than a fact reread. This just moves it earlier.

How it works

All thirteen lessons now carry audio, a page, and real content. The last five needed a decision first. Two turned out to be vocabulary after all, just three lines to an entry instead of one. The other three weren’t: Lessons 4 and 9 are full example sentences with a dialogue and language notes apiece. Lesson 6 is a counting table with no Thai script in it at all, numerals from twelve to nine thousand paired with how they’re said. Two lessons remain phonetic-alphabet charts, transcribed by hand.

Related lessons now link to each other: Lesson 6’s counting table points back to Lesson 5’s numbers, Lesson 9’s ordering sentences to Lesson 8’s dishes and Lesson 10’s food expressions. A review mode drills the vocabulary lessons with spaced repetition, keeping progress in the browser; you can export it. The matching game and the checkmarked sections live on the page itself. Same page, one more way back in.