2

I have some text in both an English and Chinese translation. I need to align the text, e.g. putting each sentence on separate lines and matching the English lines to corresponding Chinese lines.

Input 1:

今天小兔子去超市。他买了三平水。
…

Input 2:

Today Little Rabbit went to the supermarket. He bought three bottles of water.
…

Output:

今天小兔子去超市。   Today Little Rabbit went to the supermarket.
他买了三平水。      He bought three bottles of water.
…                 …
  • The output shown above is just a sample. If the software creates output with some special syntax to denote the matching components, it is fine too.
  • The text is organized into paragraphs.
  • I need to work with many hundreds of pages of such text.
  • Traditional text editors do not seem so adapt at handling text side-by-side, as one must add many tabs, and manually move text around.
  • I tried placing each translation in different columns of a spreadsheet, but found this is not a good way to align text as I must select huge areas and move them down with the mouse.

Is there any software that can aid in such an alignment, either providing automatic alignment by recognizing the Chinese and English words and moving the text to parallel lines or that makes the manual task of aligning parallel text more convenient?

3 Answers 3

2

Emacs's two-column mode is designed for this.

Enter two-column mode with F2b if you have the Chinese and English text in different files. If you have a Chinese column and an English column, move the cursor to the first character of the second column on any line and press F2s.

When you scroll in one window, the other window will follow.

If you have text in different sections of the same file, you can use Follow mode.

1

You can do that manually using Microsoft Word:

  1. In Page Layout, choose a two column layout. You can modify the widths using the More Columns entry if needed
  2. Type/paste a sentence in Chinese
  3. Choose Breaks, then Column Break
  4. Type/paste the English translation in the second column
  5. Keep going back and forth between the columns to add entries

enter image description here

Note that if you want it included within a longer text, you can surround the columns by two contiuous section breaks.

2
  • What to do when I reach the end of the page? The documents I'm working with are dozens of pages long.
    – Village
    Commented Oct 12, 2014 at 11:57
  • @Village In that case, you'll need two column breaks on every page. Both at the end of the Chinese and English columns. That looks like a lot of work for many pages, I'll post another answer soon
    – Tymric
    Commented Oct 12, 2014 at 12:06
0

Another method is using LaTeX.

The longtable environment allows for arranging the text into a table spanning multiple pages. The tex file would be formatted as follows:

\documentclass[12pt, a4paper]{article}

\usepackage{CJKutf8} % For Chinese characters support
\usepackage{longtable}

\begin{document}
\begin{longtable}{ll} % Use longtable with 2 columns and no borders
  今天小兔子去超市 &  Today Little Rabbit went to the supermarket \\
  他买了三平水。   &  He bought three bottles of water. \\
  ...            &  ... \\
\end{longtable}
\end{document}

Compile with pdflatex and you should end up with the required format in a pdf file

7
  • Eventually, I might place the text into LaTeX, but before it is even ready for any such syntax, I need to align the words. I'm not looking for a tool to display the aligned text nicely, but a tool that lets me align text that is not aligned yet.
    – Village
    Commented Oct 12, 2014 at 20:39
  • @Village All you need to do is add & between the columns and \\ at the end of each line. This can easily be done in Notepad++. Hold Alt and drag the mouse downwards to type on multiple lines at once, then use \input{} to include that file in a Latex longtable.
    – Tymric
    Commented Oct 12, 2014 at 20:42
  • Yes, but the text is not currently in perfect columns with one sentence matching another sentence. The text is now just in separate TXT files.
    – Village
    Commented Oct 12, 2014 at 20:48
  • @Village I misunderstood the question before the edit. I get it now. Would a command that replaces every dot (.) with a dot+newline put you on the right track? I could edit the answer to include that
    – Tymric
    Commented Oct 12, 2014 at 20:51
  • If it found a way to identify the difference between a . ending a sentence and a . after an abbreviation, such as "Mr.", then it would be on the right track. Chinese doesn't use "。" for this purpose, so the Chinese text has far fewer periods than the English text.
    – Village
    Commented Oct 12, 2014 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.