Open format · v2 · 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

Uno

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, chapter text and per-language gloss files into a ZIP, then check every offset, index and digest 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 of JSON: a manifest, a language-free text skeleton per chapter, and one gloss overlay per chapter and language. Here is the shape of the data.

  • sentence ranges in the paragraph text
  • translation text, per language
  • links from translated words to source words
  • inline emphasis (italic / bold)
  • per-paragraph roles

text stores each paragraph once; sents are ranges into it, and the tappable words come from the shared tbook-w2 tokenizer. In the gloss overlay, t is the translation and a gives every translated word the index of the source word(s) it renders — exactly what lights up when you tap.

Adding a language appends one overlay per chapter without touching the text. The optional spans and role add inline emphasis and paragraph roles; readers ignore fields they do not recognize, and digests reject an overlay that no longer matches its text.

text/ch1.json
{
  "id": "cd0f91ee6",
  "paragraphs": [
    { "id": "eb7f661e", "role": "heading",
      "text": "Prologue", "sents": [[0, 8]] },
    { "id": "a732da8b", "role": "subtitle",
      "text": "Cerberus, Delta Pavonis", "sents": [[0, 23]] },
    { "id": "e3b0c442", "role": "sceneBreak",
      "text": "", "sents": [] },
    { "id": "4ee30ecc",
      "text": "Stan went to the living room.",
      "sents": [[0, 29]],
      "spans": [{ "s": 17, "e": 28, "k": "i" }] }
  ]
}

text/ch1.json — paragraph text, sentence ranges and roles, no 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.

Read it

Apps that open a .tbook

The .tbook format is open, so anyone can build a reader for it. Two exist today — TReader for Android and its desktop build — and we are looking forward to the ones the community writes next.

Open format · offline-first · v2

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