TenshiTranslator.OutputFormat.LineByLineFormat module¶
- class TenshiTranslator.OutputFormat.LineByLineFormat.LineByLineFormat¶
Bases:
OutputFormat
Output format that outputs the japanese lines followed by the translated lines.
The format follows the following fules:
An empty line between two japanese line and translations
If the japanese line is empty, there will be two empty lines in the output
If the japanese line contains no japanese characters, it will be outputted as is with no translation
This format is intended for translators to quickly reference and check translations
- writeFile(outputFilePath: str, japaneseLines: list[str], englishLines: list[str])¶
Writes the translated lines to a file. file will be overwritten if it already exists
- Parameters:
outputFilePath – path to the output file.
japaneseLines – list of japanese lines
englishLines – list of translated lines