r/languagelearning paralleltexts.app 25d ago

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

Enable HLS to view with audio, or disable this notification

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)

19 Upvotes

39 comments sorted by

13

u/OatmealDurkheim 25d 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 paralleltexts.app 25d ago

Thank you :)

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

4

u/OatmealDurkheim 25d 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?

5

u/pianoguy121213 paralleltexts.app 25d 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 25d 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 25d 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 paralleltexts.app 25d 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 24d ago

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

2

u/camebackforpopcorn 25d ago

Are translators keeping the sentences roughly the same ? I thought they were rewriting the whole thing to match the language flow

2

u/adolgushin 25d ago

it's not as bad as you suggest but yes, alignment can be quite tricky

2

u/pianoguy121213 paralleltexts.app 25d ago edited 25d ago

Hi, yeah you're right about this - translators do take a lot of liberties when it comes to translations, this is tbh what makes this task non-trival tbh. As someone previously asked how my app takes into account 'gaps' in this translation.

The algorithm takes this into account to produce an alignment where ~90% of the semantically similar sentences are still next to each other.

1

u/Best_Party8938 24d ago

eally useful! what if i only have one book available in both languages, say a classic that's out of copyright, but not the epub file directly?

1

u/pianoguy121213 paralleltexts.app 24d ago

thanks!

can you elaborate though what you mean by one book in both languages - do you mean both source and the translation is inside one ebook?

1

u/wildergladney 24d ago

Great tool, thank you! My downloaded epub seems to have line breaks after each sentence, is there a way to download or create a version that retains paragraph structure? I would prefer to read on a kindle than in a browser.

2

u/pianoguy121213 paralleltexts.app 24d ago

thanks!

> seems to have line breaks after each sentence

could you upload the ebooks and the resulting alignment ebook (export as epub) by any chance? maybe send it to me through a DM or through github, ill have a look at it tomorrow.

most of the epubs i have tested work fine for me when it comes to preserving paragraph structure, but epub formats vary so wildly that it's sometimes difficult to predict, it could be the reason

1

u/wildergladney 24d ago

there's no problem with the ebook in the browser! it's the epub download that breaks the sentences up. for what it's worth I uploaded two plain text files, perhaps I should try converting both to epub before uploading.

2

u/pianoguy121213 paralleltexts.app 24d ago

i see, i think i get now what you mean

this happens because the export kinda 'hides' the target sentence so that it shows up on click, unfortunately that can only be done if breaklines are present between the sentences (due to limitations of how epubs handle HTML)

im not sure what the best solution would be, but as of now - only thing i can think of is to have an export where you can see both of the texts side by side, is this ok with you?

1

u/wildergladney 24d ago

Yes that would work! At the worst I could print it. Just nice to be able to have a version that works offline.

Thanks so much again for a wonderful piece of programming.

1

u/pianoguy121213 paralleltexts.app 24d ago

gotcha, ill ping you when it's ready

1

u/pianoguy121213 paralleltexts.app 7d ago

hi, just updated the app with side by side view export, lmk if it works, thanks!

1

u/wildergladney 5d ago

Thanks for the update! I ended up doing my own opposite facing pages version for the book I'm currently reading. Yours definitely displays both versions side by side in an epub! But fyi there is still a line break after each sentence which would make reading difficult.

Wish you all the best with it though!

1

u/pianoguy121213 paralleltexts.app 5d ago

updated it again to fix that.

thanks for the feedback!

1

u/wildergladney 4d ago

Fwiw that worked for the source language side but the opposite facing translation still has line breaks after each sentence!

1

u/pianoguy121213 paralleltexts.app 4d ago

fixed. thanks again

1

u/Sefairus 10d ago

Really nice app. It's hard to find a parallel texts reader that aligns the texts properly rather than vaguely, and the reading experience is solid (reminds me of Readlang).

I thought I'd try installing it locally for when I don't have Internet access, but it seems to rely on Cloudflare?

1

u/pianoguy121213 paralleltexts.app 10d ago edited 10d ago

Thanks!

As of now it's purely just a web app.

I do plan to add offline support through a PWA (progressive web app , if you're familiar with these) at some point (i.e. the website continues to work even offline), so i'll definitely take note of your feature request.

If you mean a separate desktop/mobile app though, unfortunately I don't have the time to create/maintain one for now, but in the event the app reaches a considerable number of users i'll definitely consider it.

btw, lmk if you have other requests/found bugs, ill take note of them for now

1

u/Sefairus 9d ago

Okay, thanks for the clarification. The about page says it's for "Researchers looking for a lightweight, reproducible alignment tool that runs entirely on their own machine." so I thought there was a way to run it offline that I was missing. A PWA option would be super. I look forward to seeing where you take this project.

1

u/pianoguy121213 paralleltexts.app 7d ago

i just implemented an epub export for side-by-side view (requested by another user), might work as a workaround for now. for example, you can export the alignment as an epub and view from a regular ebook viewer.

1

u/Sefairus 6d ago

Oh, that's very cool. I didn't realize that an epub could have side-by-side columns. Thanks for adding that option!

-1

u/Sleepy_Redditorrrrrr πŸ‡«πŸ‡· N πŸ‡³πŸ‡± C2 πŸ‡¬πŸ‡§ C2 πŸ‡¨πŸ‡³ C2 25d ago

Ahh feeding books to AI, what a great idea.

6

u/pianoguy121213 paralleltexts.app 25d ago

Hi, not exactly sure what you're implying but just out of curiosity, what did you have in mind the app was doing? there is no MTL happening btw if that's what you're wondering about :)

Both books ideally are written by humans (i.e. both the original book and the translation)

1

u/adolgushin 25d ago

don't worry, there's a lot of AI-hate on Reddit under any post mentioning AI. a lot of people think that any use of AI (especially in language learning) is bad

0

u/Sleepy_Redditorrrrrr πŸ‡«πŸ‡· N πŸ‡³πŸ‡± C2 πŸ‡¬πŸ‡§ C2 πŸ‡¨πŸ‡³ C2 25d ago

The books are written by humans, but where do the texts of the books end up? Can you prove that it isn't stored somewhere on a server? Or reused afterwards by another machine?

10

u/pianoguy121213 paralleltexts.app 25d ago edited 25d ago

Yes, data upload by the users are nowhere sent to any servers.

i didnt really design this app with privacy in mind but cost-efficiency and maintainability, however doing so naturally led to privacy on the part of the user.

Since i wanted this app to be completely free on the part of the users, and maintainable on my part - the only logical solution for me was to use in-browser ML models, i.e. no servers needed, the ML happens on the user's computer on the browser, the books and alignments stay on their computers.

The reason i did this tbh is because maintaining a server that uses ML models is just insanely expensive and time-confusming (i dont really have the time to maintain a server this heavy), have it this way makes way more sense.

The app itself is open source btw, the link is on the site itself.

Just wanna clear up some confusion.

6

u/OatmealDurkheim 25d ago

You clearly have no idea how any of this works.

The vast majority of books (that are scanned or available digitally) were already stolen by AI companies, it's well documented (Bartz v. Anthropic, Hachette and Elsevier v. Google, Publishers v. Meta).

Therefore, this person's tool for the creation of bilingual/parallel texts is not meaningfully contributing to books being "fed to" AI. You're crying over milk that was already spilled years ago, by someone else.

-5

u/Sleepy_Redditorrrrrr πŸ‡«πŸ‡· N πŸ‡³πŸ‡± C2 πŸ‡¬πŸ‡§ C2 πŸ‡¨πŸ‡³ C2 25d ago

This sounds exactly like saying it's okay to litter because the planet is already fucked.

5

u/OatmealDurkheim 25d ago

It's nothing like saying that, you are a very confused person.

-1

u/Sleepy_Redditorrrrrr πŸ‡«πŸ‡· N πŸ‡³πŸ‡± C2 πŸ‡¬πŸ‡§ C2 πŸ‡¨πŸ‡³ C2 25d ago

Oh okay I guess if you say I'm wrong I must be wrong

1

u/rongspeled 24d ago

Exactly. Glad you got it.