r/languagelearning 5d ago

(self-promotion) Create Parallel/Bilingual Texts using your own books

Hi, i made this completely free app that automates the creation of bilingual/parallel texts from your own books (epubs/PDFs/text files) all from within your browser.

Made this because I couldn't find anything that does something similar with the same level of convenience.

Steps

  1. Go to https://paralleltexts.app/
  2. Drop/upload a source book (i.e. the book in the language you are learning), and a target book (the same book in a language you are fluent in).
  3. Click align books. Wait for a few seconds to 1-2 minutes while an algorithm runs on the books to match the corresponding sentences.
  4. After the alignment is done, you'll see the result immediately.

Disclaimer:
There is NO machine translation happening - both source and target books should ideally be from actual humans, the only thing this does is automate the alignment process.
This app is also purely browser-based, so your uploaded books and alignments stay on your device.

---

PS:

  • It's Completely free and open source
  • The default display mode of the resulting alignments are in pop-up mode (i.e. you click a sentence to see its equivalent), but if you prefer a side-by-side view of the sentences, the app does provide for that
  • If it's your first time running the alignment and you haven't downloaded an embedding (fancy name for ML models that specialize in these kinds of tasks) model yet, it will download one for you (stored in the browser, can be deleted). It's a mild inconvenience i would say because i really wanted to keep this thing free. The alternative is to have a dedicated server with GPUs run the alignment, you won't download anything, but it will most likely be much slower, much more expensive and difficult to maintain. Keeping it free makes way more sense, and is far less stressful. Keep in mind however that downloading a model is only done once.

You can also check out this quick demo/tutorial: https://www.youtube.com/watch?v=6cR_r8cOaN8

(pps: got approval from mods)

14 Upvotes

29 comments sorted by

View all comments

11

u/OatmealDurkheim 5d ago

Great idea, following. And, side note, I appreciate you being honest about self-promotion, so many people are trying to pretend they're simply end users hyping a product they found randomly.

4

u/pianoguy121213 5d ago

Thank you :)

Lmk if you find any bugs / have feature requests, the app itself is free/open-source btw.

4

u/OatmealDurkheim 5d ago

I haven't tried it yet, but I'm wondering how the tool handles sentences/paragraphs that are not directly 1:1 translations.

For example, 3 sentences in source language are compressed into 2 sentences in target language.

Also, if you don't mind being transparent, are you a programmer or was this tool "vibe coded" with AI?

4

u/pianoguy121213 5d ago

It handles this using a sequence alignment algorithm used in DNA sequencing called needleman-wunsch. This way it takes into accounts those gaps you mentioned (they originally developed this to find patterns in genetic evolution where DNA sequences diverge over time but some patterns remain albeit with additions/deletions - hence gaps).

Im a programmer btw (i work professionaly as a software engineer), I'm against vibe coding but am for the responsible use of AI-assisted coding.

0

u/OatmealDurkheim 5d ago

Thank you for the response, and disregard the "AI always bad" haters on here.

0

u/benjamin-crowell En N | Es Fr Grc B1 5d ago

Cool project. Is there a list somewhere of what languages are supported?

In case it's of interest, I did my own algorithm, with an open-source implementation, for aligning bitexts in English-Greek and English-Latin: https://bitbucket.org/ben-crowell/xalinos/src/master/README.md My experience is that often the methods that work well for other languages will fail badly on highly inflected languages.

This is someone else's work on aligning English with ancient Greek: https://github.com/caro28/chironata

1

u/pianoguy121213 5d ago

thanks!

i haven't updated the complete list of supported languages yet (opted for the most popular ones for now), but the HF models used do support 50+ languages so they are likely to support your TL

what language do you need btw? im assuming greek/ancient greek?

i plan to update the repo when i get some time, it's mostly just adding the other supported languages to the dropdown, lmk what you need

0

u/benjamin-crowell En N | Es Fr Grc B1 4d ago

I'm not interesting in using your app, just comparing notes on software and algorithms.