Open format · v1 · offline-first

Read real books in a new language — tap any word to understand.

.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.

1 tap word → meaning
Offline no network, ever
Open just ZIP + JSON
Tap-to-translate

Tap a word. See exactly what it means.

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:

Translate into
Sentence 1 / 3
Tap an underlined word

One

Cerberus, Delta Pavonis

.

Tap a word above to reveal its translation.

Every highlight is precomputed and stored inside the file — this runs with no network.

Why .tbook

A format built around one gesture

Everything in a .tbook serves the moment you meet a word you don't know.

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.

Word-level alignment

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.

Many languages, one file

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.

Open and inspectable

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.

Made from any EPUB

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.

Future-proof

Versioned and additive: readers ignore fields they do not know and clamp odd offsets, so old apps keep opening new books.

Under the hood

From EPUB to tap-ready in one pass

The converter does the whole job — parse, translate, align, assemble — then validates the result.

EPUB parse · translate · align · assemble .tbook
  1. 1

    Parse

    Read the EPUB in reading order, split it into chapters, pull out the cover, and drop front-matter clutter.

  2. 2

    Segment

    Break paragraphs into sentences and tokenize each source word with precise character offsets.

  3. 3

    Translate & align

    For each sentence a language model returns the translation in chunks — each target fragment tagged with the source word(s) it renders.

  4. 4

    Resolve & join

    Match those words back to indices and stitch the fragments together, computing every highlight span deterministically.

  5. 5

    Assemble & validate

    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.

The format

Simple enough to read by hand

A .tbook is a ZIP with a manifest and one JSON file per chapter. Here's the shape of the data.

  • tappable source words
  • per-language translations
  • word-level alignment spans
  • inline emphasis (italic / bold)
  • per-paragraph roles

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.

chapters/ch1.json
{
  "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

Who it's for

Built for readers, lovable by builders

Language learners

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.

Developers

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.

Authors & publishers

Turn an existing EPUB into a learning edition without rebuilding your catalog. One file, many target languages, no platform lock-in.

Open format · offline-first · v1

Open the book. Tap the word.

Read the full specification, or grab the converter and turn your first EPUB into a .tbook.

epub → .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