Truly offline
Every translation and alignment is baked in when the file is made. No API calls, no account, no signal — read on a plane, in the metro, anywhere.
.tbook is an open ebook format for language learners. It pairs the original text with a sentence-by-sentence translation and word-level alignment, so a single tap reveals the meaning — fully offline.
A reader shows the book in its original language. Tap any word and the full-sentence translation appears — with the matching word(s) highlighted. Try it:
Cerberus, Delta Pavonis
.
Every highlight is precomputed and stored inside the file — this runs with no network.
Everything in a .tbook serves the moment you meet a word you don't know.
Every translation and alignment is baked in when the file is made. No API calls, no account, no signal — read on a plane, in the metro, anywhere.
Not just a sentence translation. Each source word maps to the exact target word(s) it becomes — even when the sentence is reordered or one word turns into several.
The source language is the pivot; every target aligns back to it. Adding a language costs one translation per sentence — not a combinatorial blow-up.
A .tbook is just a ZIP of UTF-8 JSON. No proprietary blobs, no DRM — open it with any archiver and read the structure yourself.
An LLM-powered converter turns a standard EPUB into a .tbook, sentence by sentence. Runs are cached and resumable — adding a language only translates what is new.
Versioned and additive: readers ignore fields they do not know and clamp odd offsets, so old apps keep opening new books.
The converter does the whole job — parse, translate, align, assemble — then validates the result.
Read the EPUB in reading order, split it into chapters, pull out the cover, and drop front-matter clutter.
Break paragraphs into sentences and tokenize each source word with precise character offsets.
For each sentence a language model returns the translation in chunks — each target fragment tagged with the source word(s) it renders.
Match those words back to indices and stitch the fragments together, computing every highlight span deterministically.
Pack the manifest, cover, and chapter JSON into a ZIP, then check every offset and index before shipping.
Translations are cached on disk, so an interrupted run resumes where it left off — and a fully-cached book assembles offline, with no API key.
A .tbook is a ZIP with a manifest and one JSON file per chapter. Here's the shape of the data.
words marks the character range of every tappable token. tr maps each language to its translation. align ties spans of the translation back to source words — that is exactly what lights up when you tap.
The optional spans and paragraphStyles add inline emphasis and paragraph roles. Readers ignore fields they do not recognize and clamp out-of-range offsets, so the format can grow without breaking older apps.
{
"src": "Stan went to the living room.",
"words": [[0,4],[5,9],[10,12],[13,16],[17,23],[24,28]],
"tr": {
"ru": {
"text": "Стэн прошёл в гостиную.",
"align": [
{ "t": [0,4], "w": [0] },
{ "t": [5,11], "w": [1] },
{ "t": [12,13], "w": [2] },
{ "t": [14,22], "w": [4,5] }
]
}
},
"spans": [ { "s": 17, "e": 28, "k": "i" } ]
}A sentence — source text, tappable words, aligned translations
Read books a notch above your level. The safety net is one tap away, so you stay in the story instead of reaching for a dictionary.
A small, documented, open spec with reference implementations. No SDK to license — read the ZIP, follow the tap algorithm, ship a reader in an afternoon.
Turn an existing EPUB into a learning edition without rebuilding your catalog. One file, many target languages, no platform lock-in.
Read the full specification, or grab the converter and turn your first EPUB into a .tbook.
# build the converter, then convert any EPUB
$ cd converter
$ go build -o convert ./cmd/convert
$ ./convert book.epub -t ru,de -o book.tbook