SZU-T(1)

NAME
szu-t - translate CJK text into other languages

SYNOPSIS
szu-t [options] table_file [file ...]

DESCRIPTION
This is a program for translating Chinese, Japanese, or Korean (CJK) text into other languages. The translation method uses rules defined in a translation table file. These rules are applied at runtime to generate a text translation listing. If no input files are specified, text is read from the standard input (stdin). Program output is written to the standard output (stdout).

This program requires a translation table file, which is a delimited text file in the following format:

shijie|world
nihao|hello

Each line is a translation rule, and each translation rule consists of two or more fields delimited by the “|” character. The number of fields must be consistent throughout the entire table. The first field specifies a term in the source language, and subsequent fields define equivalent terms in the target language(s).

Using the example table depicted above, if we attempt to translate the text “nihao, shijie”, then the output of the program is:

1.1|nihao, shijie
1.2| hello , world

Translation tables may contain any number of translation rules, and translation rules may contain Unicode characters. If you are editing a translation table through a text editor, the table should be saved using the UTF-8 encoding. All input and output by this translation program is handled as UTF-8, which ensures safe string translation between languages.

Within a translation table, the translation rules should be reverse-sorted by the length of the source term (i.e. longest terms first, shortest terms last). General table editing and formatting can be handled by the szu-ed(1) editor, which automatically handles the correct table formatting.

For more details on translation table formatting and development, please refer to the Sanzang Utils tutorial.

OPTIONS

-h, --help
    print usage information and then exit

-v, --verbose
    include information useful for debugging

EXIT STATUS
The exit status is 0 on normal termination, and 1 on error.

DIAGNOSTICS
Errors will print a message to the standard error stream (stderr). To enable stack traces for debugging, enable the “verbose” option.

EXAMPLES
$ szu-t mytable infile > outfile

Translate text from infile to outfile, using the rules in mytable.

$ cat mytext | szu-r | szu-t mytable | less

Use the program as a filter with piped input and output.

SEE ALSO
szu-ed(1), szu-r(1)

BUGS
Please contact the author if any bugs are found, or file a bug report with the project. Incomplete or inaccurate documentation should be treated as a bug.

AUTHOR
yaoguai <http://lapislazulitexts.com/sanzang>