[Documentation] How Machine Translation Does its Magic


h1 Posted 2 years, 3 months ago in the wee hours by oso

I’ve been to quite a few of these now – gatherings of geeks from around the world who sit around, surely over-caffeinated, for a day or two days or three days, and discuss and debate how they are going to save the world. That may come off as cynical, but, in fact, I write it in complete admiration, because we all discuss and debate how to save the world, but so few of us ask, OK, so what’s the next step.

My main goal for tomorrow is to write a comprehensible post on why open translation tools are important for both open source software and open content.

I know, I know, that last sentence probably reads like Latin to most of y’all, but I’ll do my best to explain what open source software and what open content is as well.

So what are translation tools? For most people on the internet, the answer is Google Translate. We see something on the web in a language that we don’t know and so we cut and paste the text into Google Translate and let it do its magic. How does that ‘magic’ happen? Two ways. First is standard grammar-based machine translation which I’ll go over below, thanks to an informative session by Fran Tyers of Apertium. The second way is through “statistical machine translation.” What this means is that Google Translate has a gigantic corpus, or database, of texts which have already been translated from one language to another. In this case, Google uses the translations of documents of the United Nations and it stores each of the translated phrases and sentences. So, if you enter in a sentence into Google Translate that it has already seen in a document translated by a professional UN translator, then it will simply offer you that exact translation word for word. If it can’t find the exact sentence or phrase, then it will use grammar-based rules to translate your text.

Let’s go over the steps that Google Translate and other machine translators process when translating your text. For the session led by Fran, we decided to translate the Serbian sentence “Velika reka teče kroz grad” into English. Here is a flow chart of that process (click on it to see it at full resolution). Below the flow chart, I’ll give more context to each step.

machine translation

Step 1: Select source and target languages of translation

In this case: Serbian > English

Step 2: Write phrase or sentence to be translated:

“Velika reka teče kroz grad”

Step 3: Source language analysis

The machine then identifies the “grammatical features” of each word. There are two types of grammatical features:

1.) Parts of speech (ie. adjective, noun, verb, pronoun, etc.)
2.) Sub-categories (ie. gender of word, case, singular or plural, conjugation, person etc.)

The combination of these “grammatical features” and the lemma of the word (that is, the ‘natural form’ of the word) is called a “lexical unit”.

Step 4: Choosing an analysis

The computer then uses probability based on word analysis and linguistic rules to choose a single lexical unit for each word. That is, based on statistics, it decides whether the word is feminine/masculine, plural/singular, etc.

Step 5: Transfer the grammar from source to target language

The machine then looks at the ‘lemma‘ of each word in the bilingual dictionary. The ‘lemma’ of each word is the so-called ‘citation form’ of that word. So, for example, the lemma of went is ‘go’. In the case of our Serbian sentence, the lemma of ‘velika’ is ‘veliki’. This is the form of the word you would look up in a dictionary.

Next, the machine checks its glossary for possible translations of the lemma of the word you are translating. Possible translations of “veliki”, for example, are ‘big’, ‘large’, and ‘great’. Apertium uses the most general translation. Other systems have probability-based methods of choosing which possible translation to use.

After translating each word, the machine then looks to see if re-ordering of the words is necessary. For example, from Spanish to English “la pelota blanca” would be rearranged to “the white ball” rather than left as “the ball white”. In this case, however, no re-ordering is necessary.

Step 6: Final translation

The final translation is “Big river passes through city.”

Step 7: Post-editing

The machine translation in this example is pretty close. However, in the Serbo-Croatian language articles do not exist. A human would therefore need to add either “the” or “a” before each noun.

The big river passes through the city.

break

So there you go: all the steps that a machine translator takes while doing its ‘magic’. You can learn more about machine translation on the event wiki here and here.

But machine translation is just one very small component of how both content and software is made available in multiple languages. Next post I’ll explain what is open software and open content and why open translation is important to both.



6 comments | Feed for comments | Trackback URL

  1. 1ruth from Malaysia says:

    Keep writing; I’m reading. :)

  2. 2Prentiss Riddle from United States says:

    I’m looking forward to your post on why machine translation is important. Personally, I consider it dangerous in the hands of the lingustically naive — it almost always does a poor job and often does such a spectacularly bad job that unless someone views every word with a high degree of skepticism and is prepared to reverse-engineer the translation glitches, it can do more harm than good.

    That said, I have to admit I use it often, and I’ve grudgingly come to enjoy machine translation in some social software situations – for example, when someone turns on a translation bot in Second Life, which has the value of illustrating to everyone in the space how bad translation software is! :-)

  3. 3Francis Tyers from Spain says:

    “I’m looking forward to your post on why machine translation is important. Personally, I consider it dangerous in the hands of the lingustically naive — it almost always does a poor job and often does such a spectacularly bad job”

    I encourage you to look into the quality of machine translation output when translating between closely-related languages. It is understandable that the issues surrounding this would not be widely known as in the anglophone world we don’t really have any languages which are closely related (Scots could qualify but there is no really accepted standard).

    A quick note on the post: The section on SMT isn’t quite how I explained it, but that is probably down to a problem of my communicating the process rather than David’s scribing. For people who are interested in how SMT works, I would encourage them to look at the Wikipedia page on ‘Statistical machine translation’.

  4. 4Prentiss Riddle from United States says:

    Thanks for the reply, Francis. You’re probably right that the quality is better when translating among closely related languages. But that raises the question of whether automatic translation is necessary among closely related languages. Slang and regional differences aside (which automatic translators usually can’t deal with anyway), aren’t closely related languages in their written, literary-standard form often mutually intelligible without assistance?

    Admittedly I may be biased by the languages I have the most exposure to — phonology is about the only thing that keeps Spanish, Italian and Portuguese speakers from understanding each other. Perhaps within other language families there are gaps which stymie humans but are easily bridged by software.

  5. 5Francis Tyers from Spain says:

    “Admittedly I may be biased by the languages I have the most exposure to — phonology is about the only thing that keeps Spanish, Italian and Portuguese speakers from understanding each other. Perhaps within other language families there are gaps which stymie humans but are easily bridged by software.”

    The same goes for Catalan, Occitan, Galician and to a certain extent French. You ask if “whether automatic translation is necessary among closely related languages.”, as a native speaker of English, you don’t have any problem reading documentation. Everything is in English pretty much.

    Consider for a moment if you spoke English and yet your whole computer interface, all advertising, documentation, everything was in Scots. Sure, you can understand it, but isn’t it a bit frustrating? Try browsing around the Scots Wikipedia here:

    “Breetish fowk tae fecht Pechtish invaders, follaein the Romans leavin Breetain in the 4t century. This leid wis the forerinner o Modren Inglis; but while the byleids o ither Inglis regions hae been muckle chynged by the influences o ither furrin leids—Norman an Norman–French in parteecular —the Geordie byleid hauds ontae mony chairicteristics o the auld leid.”

    http://sco.wikipedia.org/wiki/Main_Page

    Imagine if you had to interact with your government and social services in Scots, if all application forms were in Scots, if people thought you were backward for using English.

    We’re trying to make translation for smaller languages practical. Of course if you don’t believe in linguistic diversity this argument is rubbish, people can just learn English and have done with.

  6. 6El Oso » Archive » Fidelis Morfaw of the WHO: Translating Health Information from United States says:

    [...] my interest in how the internet can facilitate and speed up the translation workflow, I was fascinated to hear [...]



Share Your Comments


h1

us online casino zeus casino game online windows online casino win online casinos win big money playing casino slots online wildvegas online casino what online casinos accept amex what is the best online casino to play at western union online casinos weight loss patch casino online weight loss online casino virtual roulette online casino gaming vegus palms online casino vegas strip online casino reviews vegas online casinos vegas casinos online excitement vegas casino online vegas casino for sale chips online usa online casinos usa no deposit online casinos usa freedom online casino usa casinos online usa accepted online casinos us online casinos us online casino reviews us friendly online casinos united states online casinos united states online casino united states most respected online casinos uk online casino reviews uk online casino uk casino online uk best casino online turnkey online casino tunica online casino top ten online casinos top paying online casinos top online casino games poker htm top online casino blackjack top best online casino the office season 2 casino night online the newest casinos online with sign up bonuses texas tea casino game online television advertising for online casinos sun vegas online casino sun palace online casino strip poker online casino harem video phone mobile strategies casinos online reviews games htm starting an online casino start your own online casino spinning jackpots microgaming online casinos news spille online casino spil casino online slovenija online casino slotto online casino slots online casinos slots of vegas online casino silver dollar online casino set up an online casino safest online casinos safe online casinos safe online casino rushmore online casino rushmore casino online run your own online casino rules of poker casino online royal vegas online casino march codes royal vegas online casino rome casino online robinsonville online casinos riverbelle online casino riverbell online casino revolution money exchange online casinos reputable online casinos reputable online casino 01qq reputable online casino reliable online casinos registering with online casinos real vegas online casino real online casinos real online casino slots real online casino rate online casinos rama phone canada casino find cell online orphan results movie pure platnium online casinoes prism online casino popular online casinos playtech online casinos players only online casino play poker online casinos online play online casinos play online casino ladbrokes play online casino play jade elephant online casino play for fun online casino games play for fun online casino play casino slot online play casino online slot play casino online play casino games online with real money play casino games online for fun play casino game online platinumplay online casino platinum play online casino phoenician flash online casino pharaohs gold online casino reviews phantom efx downloads do not appear in online casino paypal deposite online casino paypal accepted online casinos owning an online casino own your own online casino own a online casino online video blackjack gambling casino online video baccarat casino online vegas sister casinos online vegas casino online usa casinos online uk casinos online sports books and casino online sportbooks and casino online slots casinos payouts online slots casinos online slot machine casino online slot casinos no deposit online slot casinos online slot casino money online slot casino online real money casinos for united states online play money casino online play for fun casino slot machines online play casino slot machines online play casino online no download hot hot penny casino online no deposit casinos online no deposit casino coupons online java casino slots online jackpot casinos online internet casino online grand casino slots online gay adult casino games online games casino online gambling casinos online gambling casino win money online gambling casino online gambling and casinos online for illinois casino online flash casinos online flash casino online chinese casino online casinos with tournaments online casinos with the best slots online casinos with bonuses online casinos who accept echeck deposits online casinos vip online casinos using moneyexchange online casinos use cnwb for deposit online casinos usa players online casinos us players online casinos trustworthy online casinos that will come through a filter online casinos that use ewallet express fro banking online casinos that use ewallet express for banking online casinos that pay you to play online casinos that offer e check as a deposit option online casinos that allow us players online casinos that allow us play online casinos that accept us players online casinos that accept paypal online casinos that accept money order deposits online casinos that accept all us players online casinos no deposit code accepting all us players online casinos no deposit bonus online casinos no deposit online casinos list online casinos in usa online casinos in the united states online casinos in las vegas online casinos i slots online casinos guidelines online casinos giving new players no deposit bonus online casinos for us players online casinos for sale online casinos for play money online casinos for money online casinos for american players online casinos excepting us players online casinos ewalletexpress online casinos accepting us players online casinos accepting echeck online casinos accepting american express online casinos accepting all usa players online casinos 01qq online casinos online casinoes online casinoer online casino worldwide online casino work online casino without any deposit online casino with the lowest deposit online casino with paypal online casino with no deposit bonus online casino with ladbrokes online casino with instant bank wire online casino with hotshots progressive online casino with good payouts online casino win or get money back online casino wheel of fortune online casino vegas strip online casino usa players no deposit required with sign up bonus online casino us visa accepted online casino us players online casino us bonus online casino us online casino uk online casino turnkey online casino tournaments online casino toolbar online casino titanic online casino texes shootout online casino surveillance online casino strategier online casino strategi online casino spillere online casino spiller online casino spille online casino spil online casino slots online casino slotmachines online casino slot machines online casino slot machine online casino slot online casino sites worldwide online casino site in uk online casino site online casino sinup bonuses online casino sign up bonuses online casino sign up bonus online casino scames online casino s online casino royale online casino royal online casino roulette spin no bet online casino roulette pass spin online casino roulette online casino ripoffs online casino reviews bonuses online casino reviews online casino review online casino reveiw online casino resources online casino reports online casino regler online casino real money online casino ratings and promos online casino ratings online casino promotions bonuses online casino promotion bonus online casino portal online casino poquer online casino poker tournament online casino poker super times pay online casino poker