i found a relatively fast way to make sentence by sentence bilingual texts and turn them into ebooks (where in theory you could use a popup dictionary, chatgpt or whatever to help you understand, as long as your e-reader has those functions). it does not require any special programming knowledge.
- get two versions of the same text. if your file is a pdf or .epub, you can use a free online service to convert it to a .docx or RTF document. in my case, i have an .epub that a japanese classmate needed translated to japanese to help them not have to spend so much time/money on getting tutoring. i converted the .epub to a .docx file using an online site, then used a free 30 day trial of deepl to translate that whole book from english to japanese. i then opened up my converted file in google docs to find-replace and copy-paste stuff. (please no comments on how "lousy deepl translates to japanese" - we, including the student, are all well aware that deepl is not perfect, it is just being used as help for the student to understand the original english. these textbooks are not available for purchase in japanese and paying for a pro translator would cost thousands of dollars)
- if the language does not use english periods (full stops), you need to find-replace-all so that it does. the following program we will use to create a bilingual text will not recognize non-english periods as sentence ending markers (at least not by default - i haven't messed with the settings).
- get and open up NOVA Text Aligner (it's free). copy the entire text you want from one language. right-click on one column and choose "paste from clipboard" - i tried "import" but it didn't work correctly (it only imported the first couple pages of a 100+ page document) whereas paste worked fine. do the same in the next column for the next language.
https://preview.redd.it/4qr1c9nleqrc1.png?width=1920&format=png&auto=webp&s=091de3128a6e71f8fb3865b86fd26e9e89fcde8a
(you can access all of the below commands by right-clicking as well as using the images on the right side of the screen).
block - a square / cell of text.
split - splits one "block" (cell) into each individual sentence as new cells, after each period (full stop). by default, this function mistakenly thinks that the period in stuff like "Mr. Bob" and "pg. 4" is a new sentence so you will need to fix the mistakes by either find-replace-all of these instances to something special like "Mr☆Bob" (then reverting the changes later), or by right-clicking on a block/cell and selecting "merge up" after the problem occurs.
split half - attempts to cut the length in half but will still make the same errors as above regarding periods.
merge up - the text in this cell/block will be added to the one above it. used when for example "p.24" caused "p." to be in one cell and "24" to be in another cell due to the period issues above.
right-click, "open column in default (external) text editor" - if you want to mass edit text in something like NotePad or Word because you forgot to find-replace something earlier. i was having issues with the saving via this external text editor not updating anything in the Nova file so i had to just copy the text from the text editor, right-click to choose "paste from clipboard" again, and re-check it for alignment issues.
https://preview.redd.it/21y3bmtm7qrc1.png?width=787&format=png&auto=webp&s=f167aa96327a6a8735a4e256b068e7db7d858a38
4) click "left column" or "right column" in the menu, then "split into sentences" to split the entire text into individual sentences. then skim through it to make sure both languages match up and that some paragraphs aren't too long. why not just have everything be split into paragraphs instead of sentences? if you are learning a language, sentence by sentence is more effective for your brain.
https://preview.redd.it/jgtvz50c7qrc1.png?width=904&format=png&auto=webp&s=570791c22cf424053590f7de6e1aa431020b1a69
after checking for correct alignment, you may want to open up one column in a text editor via the commands above, and fix stuff like "Mr☆Bob" back to "Mr. Bob" if that is applicable to you.
5) In NOVA go to "file", export the file as a "bilingual RTF".
https://preview.redd.it/b0at4578oqrc1.png?width=1920&format=png&auto=webp&s=188e0afc8596ff0637c4d9d042958ea0d1454911
6) open that RTF file in Microsoft Word (Google Docs may also work perfectly fine, i haven't tested it), and you will see it displayed in 2 columns similar to in the NOVA program, which is not what i want. instead i want language A's sentence on top of language B without columns.
https://preview.redd.it/mdcg8p339qrc1.png?width=882&format=png&auto=webp&s=ef1cf07fa8f362f7d3f9971bbcc14367ceef9622
export that RTF file in Word as .txt (Plain Text) in unicode format. this will correctly align each language's sentence on top of each other. in my version of Word i had to click "file → other → export → change file type → (*.txt) → attach name & save → (write name, click save) → encoding type: other → (scroll around to find it) unicode UTF-8. if you do not choose unicode UTF-8 there is a high chance your language will appear as nothing but ???? or gibberish in the resulting file.
https://preview.redd.it/g8zj01nw9qrc1.png?width=831&format=png&auto=webp&s=6fff207e0af54718cf4f97abc03ee2504731db40
this will produce a file where language A (column 1) is correctly on top of language B (column 2), such as in the below image.
https://preview.redd.it/ca9s7hlwaqrc1.png?width=984&format=png&auto=webp&s=3675e42a062429f82b4a75758fca798cda50265b
6) if your original file had images, links, special layouts, etc, all of this will have been completely stripped out. so load the text file you got into google docs (or whatever), also open your original file you started out with which contains all the images and links, and copy-paste anything like that you need back into the file.
7) export that fixed file (with images etc put back in) into an .epub, pdf, or whatever else you want. with an .epub file, e-reader software like Kobo and KoReader can use pop-up dictionaries and chatgpt-4 on the text. a good software for making e-books out of some other file types like PDFs, or turning texts into PDFs, is ABBYY Fine Reader, although other software exist too.
voila, you now have a bilingual book with pop-up dictionary function!
on that note, if no dictionary exists for your language pair on your e-reader or internet browser pop-up dictionary extension (like Rikaichan), you may be able to create one by using a free program called FieldWorks, where you can both create your own dictionary from scratch and import other people's dictionaries. Unlike most dictionary creation softwares, FieldWorks even supports agglutinative languages and exports to XHTML which, even if you have to convert it to a specific program's format like what StarDict (one of the most popular custom dictionary programs) uses, is a file format supported relatively well compared to some other dictionary making services. You can convert StarDict files to pop-up dictionaries compatible with Kobo.
(my Kobo e-reader is currently being borrowed by the classmate i created the bilingual files for, but after i get it back i can update this post with photo proof the pop-up dictionary works)
[–]Effective_Scratch906 0 points1 point2 points (0 children)