Chapter 17. Cloud Translation: multilanguage machine translation

 

This chapter covers

  • An overview of machine translation
  • How the Cloud Translation API works
  • How Cloud Translation pricing is calculated
  • An example of translating image captions

If you’ve ever tried to learn a foreign language, you’ll recall that it starts out easy with vocabulary problems where you memorize the foreign equivalent of a word you know. In a sense, this is memorizing a simple map from language A to language B (for example, houseInSpanish = spanish['house']), shown in figure 17.1.

Figure 17.1. Mapping of English to Spanish words

Although this process is challenging for humans, computers are good at it, so this wouldn’t be a hard problem to solve. This memorization problem is nowhere near as challenging as a true understanding of the language, where you take a “conceptual representation” in one language and translate it to another, phrasing things in a way that sounds right in the new language. Machine translation aims to solve this problem.

Human languages developed in unique ways. Much like cities tend to grow from a small city center and expand, it’s believed that languages started with simple words and grew from there, evolving over hundreds of years into the languages we know today. If you were to hop into a time machine back to the Middle Ages, it’s unlikely that you’d understand anyone at all!

17.1. How does the Translation API work?

17.2. Language detection

17.3. Text translation

17.4. Understanding pricing

17.5. Case study: translating InstaSnap captions

Summary