Al momento questa pagina non è disponibile in italiano.

How DeepL built better document translation

A cura di: Aleks Matiiasevych, Senior Product Manager, Joshua Christl, Software Engineer, and Fabian Grewing, Senior Software Developer, DeepL

DeepL document translation is having a huge impact for businesses across industries, regions, and in a wide range of different languages. It saves users from the complex, error-prone task of extracting text from documents, translating it, and then flowing it back into designs. It transforms this into a simple process of drag, drop, done. Users get translated documents with all of their original layouts and formatting preserved, with all of the superior quality and security of DeepL translations, and with tools like glossaries and edit mode to keep them in control of the final result. They can save even more time by translating batches of documents at once.

Behind that simple user experience, though, sit a whole range of different functions. Successful document translation doesn’t just involve translating the text itself. To deliver a document that’s ready to use, you also need to read the characters in PDFs accurately, adjust to how copy length changes between languages, and preserve layouts so that everything still makes sense visually. Perfecting all of these different elements has been a long-running challenge for any document translation solution.

Senior Product Manager Aleks Matiiasevych, Software Engineer Joshua Christl and Senior Software Developer Fabian Grewing set themselves the task of solving the challenge. They were part of a team that launched a groundbreaking project to raise the bar for document translation. It involved carefully quantifying the importance of each aspect of the document translation experience, and testing different techniques for balancing them. In the process they developed innovative new features that have enabled DeepL to translate even the most complex document types. 

This is their story of building a better document translation experience.

Measuring everything that matters in document translation

Aleks: “My role is to talk to customers and analyze data, to find the biggest pain points in document translation, and the biggest opportunities to improve the experience. We aim to deliver an experience where users drag a document into our tool and then get the perfect, localized version back. However, text length always changes when you translate, and this creates lots of technical challenges: how do you prevent text overflowing onto new pages? How do you keep it in the right position? How do you preserve fonts and formatting?”

“We formalized the different elements involved in successful document translation into a set of nine metrics, measuring the different parameters that we could score our translations against. It meant we could test our quality and give each document a score on things like whether all of the text was present, whether font size was consistent within paragraphs, whether the original images, hyperlinks and footnotes were all carried over.”

Joshua: “Having consistent measurement in place was a really important part of raising the standards in document translation. Around half of the documents we translate are PDFs and they come in all kinds of different layouts: flyers, brochures, scientific papers, books, multi-column pages. We chose a representative corpus of real-world PDF examples, used a combination of manual and automatic scoring, and weighted the different metrics to create a single score for each translation. That way, we could easily track the improvement in our document translations over time.”

Fabian: “My role was to take the scores that Aleks and Joshua generated and find a way to improve them. Document translation uses our text translation but has a lot of other complex functionality as well. We tried various approaches to resizing fonts and reshaping the documents to keep as many of the different elements and proportions in place as we could.”

Understanding constraints, and innovating algorithms to balance them

Aleks: “To begin with, we took quite a simple approach. We know that Portuguese is almost always 25% longer than English, for example, and so we would try simply increasing or decreasing the font size by that proportion. We found this sometimes worked, but often didn’t deliver the best result. That’s when we started to look into smarter and more sophisticated approaches.”

Fabian: “The solution that we developed treats the different elements of the document layout as a set of constraints that we have to respect. We need to make sure that we keep elements and tables in the same positions, keep the size of font consistent within paragraphs, and keep similar ratios between the font sizes of headline and body copy. We can quantify all of this, put the numbers into a set of equations, and try to solve those equations in the way that least distorts the original proportions of the document. It’s about keeping things in sync as much as possible.”

“A big difference with our approach is that we treat documents as living things, with text that can flow over from one column or box into the next. Google, on the other hand, separates text boxes and panels out and tries to optimize each individually. Our approach means that we can choose a font size and style that works for each page as a whole, and that produces a more uniform size and style that fits better.”

Meeting the PDF challenge

Joshua: “All of this matters so much more when you’re translating PDFs, because the format is rigid. It’s very important for the user experience that the translated document has all of the different elements in the right place, with text and images aligned and on the correct pages, so that they have a PDF that they can use.” 

Aleks: “One of the important benefits of our scoring system is that it enables us to benchmark how we’re doing. We’ve been able to confirm that our quality is superior to most competitors both locally and internationally.”

Fabian: “It’s important for our customers to be able to translate a whole range of different document types and different languages, all within the same solution and the same user experience. I’ve had lots of conversations with our language experts about the expansion and contraction between copy length in different languages. We’ve been able to find fonts, styles and script systems that can display all of these different languages effectively, and without too much compromise of the original designs.”

Aleks: “We also have our edit mode feature, which allows you to edit specific words in the translation, choose different alternatives and rewrite your text before it’s all wrapped up again into the new PDF. That’s a valuable feature that gives people control even when they’re working within the rigid PDF format.”

Joshua: “Besides the edit mode feature, we’ve also created an option for people to save the translated copy from their PDF document as a Word document instead. This gives them the opportunity to review the translation in more detail and reflow into their original design, if that’s what they choose to do.”

Raising the bar on document translation

Aleks: “Our scoring system and the focus we brought to improving document translation really paid off. We can see the progress we’ve made, and that DeepL is now one of the leaders when it comes to document translation.”

Fabian: “Some types of really complex PDFs were almost untranslatable previously. The design just kept breaking. We’ve now got to a place where we can reproduce even those documents really well. I’d say that’s a big win.”

Joshua: “It all shows the value of having the right metrics to guide you. We were able to identify quickly which paths were taking us in the right direction. It meant that we could pick the algorithms that yielded the best results, and the end result has been to hugely improve document translation quality.”

Aleks: “The exciting thing is that this is just the start. As a team, we have regular discussions about what we can do next to move things forward. There are lots of interesting ideas for us to explore when it comes to giving users more control over how their document appears, which can really multiply the value that this functionality delivers. It’s going to be really interesting to see where document translation with DeepL goes next.”

Start translating your documents with ease now, or contact us to learn more about DeepL's superior document translation capabilities!
Condividi