Quick and easy bilingual parallel HTML

All about language programs, courses, websites and other learning resources
User avatar
tommus
Green Belt
Posts: 312
Joined: Sat Jul 04, 2015 3:59 pm
Location: Kingston, ON, Canada
Languages: English (N), French (B2), Dutch (B2), German (A1), Spanish (A1), Esperanto (A1)
x 527

Quick and easy bilingual parallel HTML

Postby tommus » Fri Mar 03, 2017 9:37 pm

I put together a couple of simple Java programs to separate text into sentences, and to produce bilingual parallel HTML text with the help of something like Google Translate. I suggest you use native text in your target language and translate it into your native language.

Note: You will need Java installed on your desktop. These two programs are NOT apps for tablets and smartphones.

Download and unzip this file: Zipped file

These two programs are very simple to use. However, you are pretty much on your own to get this working for you on your computer. I will try to address some issues here. Here is the content of the "Instructions.txt" included in the zip file.



Convert plain text to parallel bilingual HTML text.

Steps.

1. Ensure that Java is installed properly on your computer.
https://java.com/en/download/manual.jsp

2. There are two files: "parse.jar" and "html.jar",
and a directory "files" containing one empty file "input.txt".

3. Paste your target language plain text into "input.txt" and save it.

4. Double click on "parse.jar". That will produce a new file called "one.txt", with the text separated into individual sentences.

5. Copy the sentences and paste them into a translator such as Google Translate.

8. Copy the translation and paste it into a new file called "two.txt".

9. Check that both "one.txt" and "two.txt" have the same number of sentences, with each translation matching the correct sentence. Sometimes Google Translate will further divide some of the sentences, especially if they are long. A good text editor for this is Notepad++ because it numbers the sentences and clearly shows the separate sentences. You can have "one.txt" and "two.txt" open in Notepad++ and drag one tab onto the desktop to easily compare the two.

10. Double click on "html.jar"

11. This produces "twoline.html" and "twoline.txt" with the bilingual sentences inter-spaced.

No guarantee this will work on your particular computer.


2 x
Dutch
40 Boeken
● 35 Ned. Videos
● 370 Univ-Nederland
: 23 / 40
: 30 / 35
: 145 / 370
● 730 Video Nieuws
● 104 Skype NL Chats
● 730 Tekst Nieuws
: 480 / 730
: 66 / 104
: 480 / 730

Return to “Language Programs and Resources”

Who is online

Users browsing this forum: No registered users and 3 guests