I often use Google Translate when reading, but I have no idea about how it works at all until this week’s study. Google Translate is based on something called “statistical machine translation”. The hidden principle and procedures is not magic, but a series training and processing based on statistics.
Machine translation was always regarded to be inaccurate and full of mistakes until recent years with the development of machine learning. In fact, machine translation is not easy at all. Translation requires fully understanding the sentence to be translated and having an even better knowledge of the target language. (machine translation,62) One of the biggest challenge is that language itself is ambiguous. Different people may understand one same sentence in different ways. For instance, when I once translated Trump’s Twitter related to recent government shutdown, I was puzzled with his meaning. In his Twitter, he said that “Every nation has not only the right but the absolute duty to protect its borders and its citizens. A nation without borders is a nation not at all. Without borders we have the reign of chaos, crime, cartels and believe it or not coyotes.” The word “coyote” can be understood in two ways——one is its self-meaning, the other one is illegal migrants (a kind of metaphor). I don’t know which one to choose to translate.
There are two architectures in Google Translation——encoder and decoder. First, convert a sentence that need to be translate into a sector (a series of number that can be readable by computers) with the help of bi-directional recurrent neutral network, which is called encoding process. Second, convert the sector into a translated sentence with another bi-directional recurrent neutral network, which is called decoding process. There are 8 layers of LSTM-RNN that have residual connections between layers with some tweaks for accuracy and speed between encoder and decoder. In the process, Google Translate continuously identify the best possible alignment and find correspondent at word level by learning pattern and data from thousands of transaction examples. Therefore, Google Translate is also called example based translations.
Karen Hao, “The Technology Behind OpenAI’s Fiction-Writing, Fake-News-Spewing AI, Explained,” MIT Technology Review, February 16, 2019.
Thierry Poibeau, Machine Translation (Cambridge, MA: MIT Press, 2017). Selections.
https://blog.statsbot.co/machine-learning-translation-96f0ed8f19e4