How is it that so many intergalactic species in movies and TV just happen to speak perfect English? The short answer is that no one wants to watch a starship crew spend years compiling an alien dictionary. But to keep things consistent, the creators of Star Trek and other science-fiction worlds have introduced the concept of a universal translator, a portable device that can instantly translate between any languages. So is a universal translator possible in real life? We already have many programs that claim to do just that, taking a word, sentence, or entire book in one language and translating it into almost any other, whether it's modern English or Ancient Sanskrit. And if translation were just a matter of looking up words in a dictionary, these programs would run circles around humans. The reality, however, is a bit more complicated. A rule-based translation program uses a lexical database, which includes all the words you'd find in a dictionary and all grammatical forms they can take, and set of rules to recognize the basic linguistic elements in the input language. For a seemingly simple sentence like, "The children eat the muffins," the program first parses its syntax, or grammatical structure, by identifying the children as the subject, and the rest of the sentence as the predicate consisting of a verb "eat," and a direct object "the muffins." It then needs to recognize English morphology, or how the language can be broken down into its smallest meaningful units, such as the word muffin and the suffix "s," used to indicate plural. Finally, it needs to understand the semantics, what the different parts of the sentence actually mean. To translate this sentence properly, the program would refer to a different set of vocabulary and rules for each element of the target language. But this is where it gets tricky. The syntax of some languages allows words to be arranged in any order, while in others, doing so could make the muffin eat the child. Morphology can also pose a problem. Slovene distinguishes between two children and three or more using a dual suffix absent in many other languages, while Russian's lack of definite articles might leave you wondering whether the children are eating some particular muffins, or just eat muffins in general. Finally, even when the semantics are technically correct, the program might miss their finer points, such as whether the children "mangiano" the muffins, or "divorano" them. Another method is statistical machine translation, which analyzes a database of books, articles, and documents that have already been translated by humans. By finding matches between source and translated text that are unlikely to occur by chance, the program can identify corresponding phrases and patterns, and use them for future translations. However, the quality of this type of translation depends on the size of the initial database and the availability of samples for certain languages or styles of writing. The difficulty that computers have with the exceptions, irregularities and shades of meaning that seem to come instinctively to humans has led some researchers to believe that our understanding of language is a unique product of our biological brain structure. In fact, one of the most famous fictional universal translators, the Babel fish from "The Hitchhiker's Guide to the Galaxy", is not a machine at all but a small creature that translates the brain waves and nerve signals of sentient species through a form of telepathy. For now, learning a language the old fashioned way will still give you better results than any currently available computer program. But this is no easy task, and the sheer number of languages in the world, as well as the increasing interaction between the people who speak them, will only continue to spur greater advances in automatic translation. Perhaps by the time we encounter intergalactic life forms, we'll be able to communicate with them through a tiny gizmo, or we might have to start compiling that dictionary, after all.
Como é que nos filmes e na TV tantos seres intergalácticos conseguem falar português perfeitamente? A resposta é que ninguém quer assistir à tripulação de uma nave espacial passar anos compilando um dicionário alienígena. Para manter as coisas consistentes, os criadores de "Guerra nas Estrelas" e de outros mundos de ficção científica introduziram o conceito de um tradutor universal, um aparelho portátil que pode traduzir instantaneamente qualquer língua. Mas é possível um tradutor universal na vida real? Já existem muitos programas que dizem fazer isso, que pegam uma palavra, sentença, ou mesmo um livro inteiro, em uma língua e traduzem para quase qualquer outro idioma, seja inglês moderno ou sânscrito antigo. Se a tradução fosse apenas uma questão de procurar palavras num dicionário, esses programas dariam um baile nos seres humanos. A realidade, no entanto, é um pouco mais complicada. Um programa de tradução baseado em regras usa uma base de dados lexical, que inclui todas as palavras constantes de um dicionário e as formas gramaticais que elas podem tomar e, assim, estabelece regras para reconhecer os elementos linguísticos básicos da língua de origem. Numa sentença aparentemente simples como: "As crianças comem os bolos", primeiro o programa analisa a sintaxe, ou a estrutura gramatical, identifica "as crianças" como o sujeito, e o resto da sentença como o predicado, que consiste no verbo "comer" e em um objeto direto, "os bolos". Ele então precisa reconhecer a morfologia do português ou como a língua pode se dividir em unidades menores de significado, tais como a palavra "bolo" e o sufixo "s" para indicar o plural. Finalmente, é necessário entender a semântica, ou seja, o significado das diferentes partes de uma sentença. Para traduzir essa sentença adequadamente, o programa precisa se remeter a um grupo diferente de vocabulário e regras para cada elemento da língua de destino. Mas é aqui que a coisa complica. A sintaxe de algumas línguas permite o arranjo das palavras em qualquer ordem. enquanto, em outras, ao se fazer isso, poderíamos fazer "o bolo comer a criança". A morfologia pode também ser um problema. O esloveno distingue entre duas crianças e três ou mais, usando um sufixo dual, ausente em tantas outras línguas, enquanto a falta do artigo definido no russo pode nos deixar em dúvida se as crianças estão comendo alguns bolos em particular ou apenas comendo bolos em geral. Finalmente, mesmo quando a semântica está tecnicamente correta, o programa pode deixar de perceber questões mais sutis, tais como saber se as crianças "mangiano" os bolos ou se elas "divorano" os bolos. Um outro método é a máquina de tradução estatística, que analisa uma base de dados de livros, artigos e documentos já traduzidos por humanos. Ao encontrar correspondência entre a fonte e a tradução feita, improváveis de ocorrer por acaso, o programa consegue identificar frases e padrões correspondentes, e os usa para futuras traduções. No entanto, a qualidade desse tipo de tradução depende do tamanho da base de dados inicial e da disponibilidade de amostras em determinadas línguas, ou de estilos de escrita. A dificuldade que os computadores têm com as exceções, irregularidades e matizes de significado, algo que os humanos percebem instintivamente, tem levado alguns pesquisadores a crer que nossa compreensão da língua é um produto singular da estrutura biológica do nosso cérebro. Na verdade, um dos mais famosos tradutores universais da ficção, o peixe Babel de "O Guia dos Mochileiros das Galáxias", não é de forma alguma uma máquina, mas uma pequena criatura que traduz as ondas cerebrais e os sinais nervosos de espécies sensíveis através de uma forma de telepatia. Por ora, aprender uma língua à moda antiga vai dar melhor resultado do que qualquer programa de computador disponível. Mas isso não é uma tarefa fácil, e o elevado número de línguas do mundo, assim como a crescente interação entre as pessoas que as falam, vão apenas continuar a estimular avanços na tradução automática. Quem sabe, quando encontrarmos formas de vida intergalácticas, sejamos capazes de nos comunicar com eles por meio de um aparelhinho