Analysis updated 2026-05-18
Turn an original book and its translation into a single ePub for side by side bilingual reading.
Practice a new language by reading original sentences next to their translation in one file.
Fine-tune chapter matching and sentence alignment for books in less common language pairs.
| kerivin/bilingual-book-builder | 2arons/llm-cli | abe238/claude-video-plus | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | easy | easy |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | general | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Needs pip install with a GPU or CPU variant, and works best if you specify source and target languages.
bilingual-book-builder is a command line tool that takes two ePub versions of the same book, one in the original language and one translated, and combines them into a single new ePub with matching sentences placed side by side. The goal is to help someone read a book in a foreign language while seeing the original sentence right next to its translation. The process runs in three stages, and each stage relies on its own set of language models, so overall language support depends on all three working together. First, if you do not specify the languages yourself, a detector figures out what language each book is written in. Second, the text of each book is split into individual sentences, either with a fast simple splitter that covers two dozen languages or a more capable model based splitter that covers many more. Third, a sentence alignment model matches corresponding sentences between the two books using a technique called bertalign. The author notes that even languages not officially listed by these tools often still work in practice. You can install it with pip, choosing a version built for a machine with a graphics card or one for CPU only, or you can try it online through a hosted demo on HuggingFace, which the README warns is fairly slow and blocked in some regions. Once installed, the basic command just points at a source ePub and a target ePub, and the tool auto detects languages, matches chapters between the two books, and produces one merged bilingual ePub. There are many optional settings for tuning speed against accuracy: you can name the source and target languages directly to skip detection, control how many threads run in parallel, adjust how strictly chapters are matched, choose which book's cover art to keep, and swap in different alignment or splitting models if the defaults do not suit your languages. Chapters can also be matched manually instead of automatically if the automatic matching gets it wrong. The author is upfront that results depend heavily on the quality of the source ePubs, since messy tables of contents or missing metadata can throw off chapter matching, and mentions the code was written with AI assistance. Known limitations include some chapters being missed entirely, loss of text styling like bold and italics, and the tool currently only supporting a side by side layout rather than a stacked one.
A command line tool that merges two ePub translations of the same book into one bilingual ePub with matching sentences shown side by side.
Mainly Python. The stack also includes Python, bertalign, LaBSE.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly general.
This repo across BitVibe Labs
Verify against the repo before relying on details.