AI Automatic Translation of Doctoral Thesis
Since I have translated the blog content into English, is it possible to automatically translate a doctoral thesis? My doctoral thesis is over 200 pages long and contains many diagrams. Can AI automatically translate so much LaTeX code without missing a word? How to translate the diagrams in the paper?
First, change the original prompt for translating Markdown to translating LaTeX. When I was translating Markdown, I separated the content by lines, and when a few consecutive lines reached 2048 characters, I requested GPT-4 once. I still do this when translating LaTeX.
Just like Markdown, the content output by GPT-4 often has prefixes and suffixes. Fortunately, after setting the temperature to 0.1, the prefixes and suffixes are relatively fixed, and a post-processing script can be written to remove them directly. In addition, GPT-4 does not understand the escape characters in LaTeX well, such as the typical underscore _, dollar sign $, and tab &. They often do not escape, causing syntax errors. This can also be done through a post-processing script, using some rules to identify whether or not to escape, and if necessary, add it automatically.
In general, GPT-4’s LaTeX ability is good, except that some references are messed up, causing the references to become question marks, and there are no problems elsewhere. It can be compiled directly after the post-processing script.
Secondly, in order to translate the diagrams in the paper, I first tried some PDF translation tools and found that none of them could be used. These tools can only translate large blocks of text in PDFs. For architecture diagrams, they will mess up the entire diagram. Therefore, I used the method of image translation. First, convert the PDF to an image, then call the Youdao image translation API. If Chinese characters are recognized, replace the original PDF with the translated image; if no Chinese characters are recognized (such as some experimental result diagrams), keep the original.
In fact, the principle of Youdao image translation is also to do OCR on the image first, translate each recognized text block one by one, and then replace the text in the original position of the image with the translated text block. I feel that this can also be done for PDFs, and PDFs can still be vector diagrams. I hope that those who make PDF translation tools can improve.
The whole translation took half a day, and some minor problems were too lazy to fix. Although the translation quality is definitely not as good as handwritten, especially the image translation quality is average, but it is basically readable. Except for some minor adjustments to ustcthesis.cls (such as putting the English cover in front of the Chinese cover), no manual modifications were made to the translated content.
AI automatic translation version: High Performance Data Center Systems with Programmable Network Interface Cards (PDF, 8 MB)
Chinese original version: High Performance Data Center Systems Based on Programmable Network Cards (PDF, 8 MB)
Now the papers on arxiv all have LaTeX source code. According to this method, they can all be directly translated into Chinese papers. I hope that one day the multimodal model can be strong enough to only need PDF, not LaTeX source code, to do translation, which would be amazing.