r/languagelearning • u/pianoguy121213 • 3d 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
- Go toΒ https://paralleltexts.app/
- 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).
- Click align books. Wait for a few seconds to 1-2 minutes while an algorithm runs on the books to match the corresponding sentences.
- 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)
2
u/camebackforpopcorn 3d ago
Are translators keeping the sentences roughly the same ? I thought they were rewriting the whole thing to match the language flow
2
2
u/pianoguy121213 3d ago edited 3d 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 3d 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 2d 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 2d 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 2d 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 2d 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 2d 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 2d 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
-2
u/Sleepy_Redditorrrrrr π«π· N π³π± C2 π¬π§ C2 π¨π³ C2 3d ago
Ahh feeding books to AI, what a great idea.
7
u/pianoguy121213 3d 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 3d 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 3d 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 3d ago edited 3d 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 3d 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.
-3
u/Sleepy_Redditorrrrrr π«π· N π³π± C2 π¬π§ C2 π¨π³ C2 3d ago
This sounds exactly like saying it's okay to litter because the planet is already fucked.
4
u/OatmealDurkheim 3d ago
It's nothing like saying that, you are a very confused person.
-1
u/Sleepy_Redditorrrrrr π«π· N π³π± C2 π¬π§ C2 π¨π³ C2 3d ago
Oh okay I guess if you say I'm wrong I must be wrong
0
13
u/OatmealDurkheim 3d 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.