Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParallelTexts — The Little Prince sample alignment

ParallelTexts

A free, fully in-browser tool for aligning two books in different languages sentence-by-sentence for creating Parallel Texts.

Upload a book and its translation (EPUB, PDF, or TXT), run the alignment pipeline entirely in your browser, then read the result as a paginated parallel ebook or export it as a TSV.

Main Demo

main-demo.mp4

Samples

The Little Prince — popover view The Little Prince — side-by-side view Alice in Wonderland — popover view Alice in Wonderland — side-by-side view

Overview

Upload and Align your own books

align_your_own_books.mp4
  1. Upload two books (source + translation) on the homepage, or try a built-in sample.
  2. Align — pick languages, click Align books; the model downloads once and runs in your browser.
  3. Read — popover view (tap a sentence for its translation) or side-by-side view (parallel columns).
  4. Export — download as TSV or EPUB from the alignment details drawer.

Reading modes

Popover Side by side
Popover view — tap a sentence to see its translation Side-by-side view — aligned sentences in parallel columns

Why the hell did I make this?

"This is completely useless, why not just read a book as is with a popup dictionary and be done with it?"

Yeah, normally I would agree, but I've recently had the misfortune of having a large portion of my time being forcefully spend on unimportant things like not immersing. I've simply decided that immersion, even if not "pure" immersion, is better than no immersion at all.

That being said, even if you find this useless, you might be interested in my upcoming project which aligns sentences and images instead.

Features

  • Three input formats — EPUB, PDF, and plain TXT.
  • Aligns sentences in 50+ languages
  • Fully in-browser ML — The model runs in the browser, so no need for a backend. The tradeoff is that you have to download a model.
  • Two reading modes — popover view (tap a sentence to see its translation) and side-by-side view.
  • TSV export and import — one sentence pair per row; gap rows preserved; any 2- or 3-column TSV works on import.

Use Cases

  • Beginner learning with real content — align a book you're studying with a translation you already understand, then read sentence by sentence instead of grinding through a textbook
  • Reading above your level — keep the original text in front of you while dipping into the translation only when you need it
  • Reading way way way above your level — you've done one month of immersion and you're ready for 雪国. sure bro.

Upcoming project

Similar to this — but instead of aligning two texts, it aligns sentences in a book with image frames from an adaptation (anime, movie, drama, etc.).

Upload a light novel (or any book) plus a video or frame dump from its adaptation, and read with the corresponding scene right next to each sentence. Think Monogatari stills beside the original LN narration, or Classroom of the Elite images next to the LN text.

Feel free to hmu if you find this interesting.

ETA: ~2-6 months.

Upcoming project — Harry Potter sentence + frame alignment

Harry Potter adaptation — frame beside sentence Harry Potter adaptation — reading with scene still Harry Potter adaptation — aligned prose and frame

Known Limitations

  • Private / incognito windows — embedding models (up to ~1.2 GB) are cached via the browser's Cache Storage API so they don't need to be re-downloaded every session. Private/incognito windows back that storage with an ephemeral, memory-limited partition instead of disk (by design, so nothing survives after the window closes), and writing a file that large to it can silently fail. When that happens the model has to be re-downloaded on every alignment instead of being reused, and in the worst case the failed cache write can cause the alignment itself to fail. Use a normal window for a reliable experience.

License

ParallelTexts is licensed under the GNU General Public License v3.0.

Copyright (c) 2026, nullspace05.

Third-party components (including BSD-3-Clause code adapted from ttu-ttu/ebook-reader) are listed in THIRD_PARTY_NOTICES.md.


Acknowledgements

ParallelTexts would not exist without Transformers.js. The whole alignment pipeline — multilingual sentence embeddings, ONNX inference, running entirely in the browser with no backend — is built on @huggingface/transformers.

Parts of the paginated book reader and reading-progress system are adapted from ttu-ttu/ebook-reader (BSD-3-Clause), including:

  • Character-count bookmarking (exploredCharCount approach) — see src/lib/reading-progress.ts
  • CSS multi-column pagination workarounds for iOS/iPadOS WebKit — see src/components/paginated-reader.tsx

Full upstream license text: THIRD_PARTY_NOTICES.md.

Sample alignment credits

The homepage example alignments use texts from the sources below. ParallelTexts only hosts the aligned exports — not the underlying books.

アリスはふしぎの国で / Alice's Adventures in Wonderland

銀河鉄道の夜 / Night on the Galactic Railroad

  • Original: 宮沢賢治 Kenji Miyazawa (1924). Public domain.
  • Japanese: Aozora Bunko
  • English: translation by Composer 2.5

Aventures d'Alice au pays des merveilles / Alice's Adventures in Wonderland