littleangels        English Nanny
Results 1 to 11 of 11

Thread: Machine Translation

  1. #1
    Join Date
    Nov 2016
    Location
    On the Yellow Brick Road, near El Dorado...
    Posts
    3,926
    Thanked: 1406

    Machine Translation

    If you were going to write some algorithms to translate German to English, or Chinese to Russian, or one language to another, what computer language would you use?

    Say that you found an old book that classifies sentences (in Language 1) into various categories, and gives formulas the author has devised to apply to each type of sentence to effect a reliable translation (into Language 2). What would be a good computer language to use to write these formulas and make a good translation program?

    For example, one of the rules of a formula might be: "If the second word in the phrase or sentence is a verb, when translated, that verb goes to the end of the sentence, unless the 3rd word is also a verb, in which case the first verb goes to the end of the sentence, and the second verb goes to the next-to-the-last position in the translated sentence."

    Or "Adjectives which precede a noun, are, when translated, placed after the noun."

    Or "Adverbs of time are always placed as the first word of the translated sentence, unless the verb they modify is a verb of motion, in which case they are placed after the verb."

    What would be a good language to write this in?
    "Defund the Social Sciences." - Fantastika, 2020

  2. #2
    Join Date
    Aug 2012
    Location
    Moscow
    Posts
    4,698
    Thanked: 1786
    Interesting question , I remember when I was working in Saudi Arabia back in the 80s the early computer terminals had an issue in displaying Arabic because letters in Arabic words change depending on following letters .....all about contextual analysis .....the early languages used for any kind of translation were the algorithm rich variants like Algol , my first real programming language after machine code nowadays these primitive languages are of no use . Google translate is using more AI and ANNs ( Artificial Neural Networks ) how times have changed!
    Last edited by vossy7; 11-05-2017 at 10:08.
    “You don't love someone for their looks, or their clothes, or for their fancy car, but because they sing a song only you can hear.”
    ― Oscar Wilde

  3. #3
    Join Date
    Jul 2014
    Location
    Moscow
    Posts
    13,591
    Thanked: 4061
    Quote Originally Posted by vossy7 View Post
    Interesting question , I remember when I was working in Saudi Arabia back in the 80s the early computer terminals had an issue in displaying Arabic because letters in Arabic words change depending on following letters .....all about contextual analysis .....the early languages used for any kind of translation were the algorithm rich variants like Algol , my first real programming language after machine code nowadays these primitive languages are of no use . Google translate is using more AI and ANNs ( Artificial Neural Networks ) how times have changed!


    I've heard Skype can do real time translation now. I never use Google Translate, I find Microsoft works better.
    If you trust the government you obviously failed history class. " George Carlin"

  4. #4
    Join Date
    Nov 2016
    Location
    On the Yellow Brick Road, near El Dorado...
    Posts
    3,926
    Thanked: 1406
    Quote Originally Posted by vossy7 View Post
    Interesting question , I remember when I was working in Saudi Arabia back in the 80s the early computer terminals had an issue in displaying Arabic because letters in Arabic words change depending on following letters .....all about contextual analysis .....the early languages used for any kind of translation were the algorithm rich variants like Algol , my first real programming language after machine code nowadays these primitive languages are of no use . Google translate is using more AI and ANNs ( Artificial Neural Networks ) how times have changed!
    I heard about Algol. It sounded very interesting but it wasn't offered at our school.

    I started on a translation program using Delphi, on one computer, and Modula-2 and "Rexx" on another. The first thing was a create a dictionary, so each word could be looked up - in the dictionary was the word, with info about it - was it a verb, a noun, an adverb, etc. Tense, case, plural form, accompanying gender in languages like German or Russian ("der," "die" or "das"), etc. Each word in the sentence to be translated was labeled with a Part of Speech. But some words can be more than one part of speech. "History" can be a noun ("We study history") or an adjective ("a history book"). "Hin" in German can be a preposition or a piece of a verb.

    So on the first pass-through, every word is labeled with a part of speech, except those words that could be more than one part of speech. The second pass-through would examine what words are adjacent to the unknowns, or what sentence position the unknowns occupy. If the adjective or noun precedes a noun, it's probably a adjective (in an English sentence). If "hin" occurs as the last word in a German sentence, it's most likely part of a verb and not an adjective. So to get the correct Parts of Speech, it is often necessary to loop through the sentence more than once.

    After all the words are given a part of speech, the next pass-through assigns them a "part of sentence". Is this "noun" the subject, or an object? Which words belong to which prepositions, etc. The sentence is diagrammed, so it can be reconstructed in the language it is to be translated into. "Hin" would be attached to the verb ("hingehen") and placed in the second position of the translated sentence ("go to"). The sentence is first reconstructed in the "part of sentence" manner, (the placement of verbs in English is usually in second position in the declarative sentence, and many times in last position in German, or an indirect object would precede a direct object) and then the words are translated in the "part of speech" manner.

    In English "I give you a ticket," not "I give ticket you" (but this positioning is the norm in a different language).

    Another supplemental approach was tasking the office manager to compile a database of common verbs in Russian with their prepositional usages. For example in English, the verb "offer" is used with "to" "We offer to you", or "for" "I offer for you a glass of beer" or "up" or other prepositions, or without a preposition ("I offer you a glass of beer). The construction "offer for" could also mean offer is a noun ("We made an offer for $10,000"), so back to Step 1.
    I figured a database of verbs with their prepositional helpers would go a long way to aid the translation. For example, "I run to the store" and "I run in the race" or "I run for election" in English it is "run" in all 3 instances. In German it might be "hingehen" or "rennen" or "laufen."

    She worked on this database for a few weeks, then it got lost when we scrubbed the malware-infested hard disk and I forgot to save it before wiping the disk.

    Also, any good translation program would have a database of idioms, of slang usages and of colloquialisms. How to detect each is another task.

    Throughout, a good translation program relies on the texter following strict grammar rules. It would be done a sentence at at a time, and within that sentence, a phrase at a time. And each phrase would be properly marked off with commas. But people don't follow the rules: "Most of the time, travellers worry about their luggage," is clear, but "Most of the time travellers worry about their luggage” is probably not what the writer intended.

    And that's about as far as I got, other projects were more attractive, which are also half-finished ... I have a great ability to start new things and never finish them.
    Last edited by TheInterocitor; 12-05-2017 at 14:13.
    "Defund the Social Sciences." - Fantastika, 2020

  5. #5
    Join Date
    Jul 2004
    Location
    here,since many years
    Posts
    21,169
    Thanked: 4877
    And that's about as far as I got, other projects were more attractive, which are also half-finished ... I have a great ability to start new things and never finish them. [/QUOTE]

    one thing is for sure. the better programs are not for free.
    http://www.toptenreviews.com/busines...tion-software/
    There is no greater treasure then pleasure....

  6. #6
    Join Date
    Nov 2016
    Location
    On the Yellow Brick Road, near El Dorado...
    Posts
    3,926
    Thanked: 1406
    Quote Originally Posted by Benedikt View Post
    And that's about as far as I got, other projects were more attractive, which are also half-finished ... I have a great ability to start new things and never finish them.
    one thing is for sure. the better programs are not for free.
    http://www.toptenreviews.com/busines...tion-software/[/QUOTE]

    Cool, I didn't know companies were still making money from translation. Like Wally said, the free Microsoft is not bad (better than Google IMHO).

    I had heard Google was making a huge list of idioms, several years ago, to facilitate its language translators, but I see no evidence of it.
    "Defund the Social Sciences." - Fantastika, 2020

  7. #7
    Join Date
    Aug 2012
    Location
    Moscow
    Posts
    4,698
    Thanked: 1786
    OK , a few points here, the only way we will ever get close to "pure machine translation" from one language to another is to replicate how the human brain deals with ,close to instantaneous ,interpretation .I have always been in awe of some of the interpreters I have had the pleasure to meet in my life time e.g. Pavel Palazhchenko who did a mind-blowing job for Mikhail Gorbachev and has done some work for a friend of mine in the last few years.
    So how do we do this , well I mentioned earlier the subject of ANNs , Artificial Neural Networks, which try to mimic how the human brain works , check them out.
    I worked for a company whose R & D people were working on an instant translator i.e. a hand held device which you could speak into and the desired language came out the other side !!!. The first thing we have to note is that existing compute power as we know it is still limited by the I/O latency of data required to make decisions .As humans we have our processor and memory/data storage side by side in our brains so the latency required for us to make decisions can sometimes be measured in nanoseconds or much less, picoseconds, for people with higher intelligence (that has to be proven though).
    So there is a lot of work being done to try to cut out this latency in current compute engines by a thing called "in-memory fabric" i.e. having all the data you need in RAM , so much closer to the code and compute engine. I met one of the global gurus in this area last year and surprise , surprise he is Russian .....from St.Pete ...his name is Nikita Ivanov....check him out........so glad I realised early in my life that my math studies would be important for me .....that's why I studied Applied Mathematics .......but Rus would say this was probably a waste of time
    “You don't love someone for their looks, or their clothes, or for their fancy car, but because they sing a song only you can hear.”
    ― Oscar Wilde

  8. The Following 2 Users Say Thank You to vossy7 For This Useful Post:

    natlee (12-05-2017), Uncle Wally (12-05-2017)

  9. #8
    Join Date
    Nov 2016
    Location
    On the Yellow Brick Road, near El Dorado...
    Posts
    3,926
    Thanked: 1406
    Quote Originally Posted by vossy7 View Post
    OK , a few points here, the only way we will ever get close to "pure machine translation" from one language to another is to replicate how the human brain deals with ,close to instantaneous ,interpretation .I have always been in awe of some of the interpreters I have had the pleasure to meet in my life time e.g. Pavel Palazhchenko who did a mind-blowing job for Mikhail Gorbachev and has done some work for a friend of mine in the last few years.
    So how do we do this , well I mentioned earlier the subject of ANNs , Artificial Neural Networks, which try to mimic how the human brain works , check them out.
    I worked for a company whose R & D people were working on an instant translator i.e. a hand held device which you could speak into and the desired language came out the other side !!!. The first thing we have to note is that existing compute power as we know it is still limited by the I/O latency of data required to make decisions .As humans we have our processor and memory/data storage side by side in our brains so the latency required for us to make decisions can sometimes be measured in nanoseconds or much less, picoseconds, for people with higher intelligence (that has to be proven though).
    So there is a lot of work being done to try to cut out this latency in current compute engines by a thing called "in-memory fabric" i.e. having all the data you need in RAM , so much closer to the code and compute engine. I met one of the global gurus in this area last year and surprise , surprise he is Russian .....from St.Pete ...his name is Nikita Ivanov....check him out........so glad I realised early in my life that my math studies would be important for me .....that's why I studied Applied Mathematics .......but Rus would say this was probably a waste of time
    I got my degree in Math from the university in St. Pete, too.

    Well...they do have a branch in St. Petersburg. The main campus of the University of South Florida is across the bay, in Tampa.

    It's one of life's great pleasures to meet creative, intelligent people, like your Nikita Ivanov. They are the people, not necessarily famous, who are the real "leaders" on this planet, who point, who lead, the way forward with real progress, not the "progress' as fuzzily defined and cheapened by politicians.

    I met Eugene Dolgoff some years ago, he was working on 3-D TV and other applications long ago. We were going to work with him but couldn't agree on terms. When he took his company public (this is not in Wikipedia) Wall Street speculators bankrupted his company, and his "partners" made off with many of his ideas and his patents.
    Last edited by TheInterocitor; 12-05-2017 at 22:23.
    "Defund the Social Sciences." - Fantastika, 2020

  10. The Following User Says Thank You to TheInterocitor For This Useful Post:

    vossy7 (12-05-2017)

  11. #9
    Join Date
    Aug 2012
    Location
    Moscow
    Posts
    4,698
    Thanked: 1786
    I would seriously like to hear from our resident interpreter here ........RL ....where are you when we really need your undivided attention
    “You don't love someone for their looks, or their clothes, or for their fancy car, but because they sing a song only you can hear.”
    ― Oscar Wilde

  12. #10
    Join Date
    Jul 2004
    Location
    here,since many years
    Posts
    21,169
    Thanked: 4877

    one thing not one can do

    I had heard Google was making a huge list of idioms, several years ago, to facilitate its language translators, but I see no evidence of it.[/QUOTE]


    not one can translate correctly, though not that i tried each and every one, the difference between the German formal SIE and familiar DU. or SIE plural, or SIE singular, formal.same for Russian language.
    suppose it will be a long time still, until we have these language- translation things they have in Startrek. Speak or write your own language and the mechanical translator repeats it in perfect -foreign language-.
    There is no greater treasure then pleasure....

  13. #11
    Join Date
    Nov 2016
    Location
    On the Yellow Brick Road, near El Dorado...
    Posts
    3,926
    Thanked: 1406
    Quote Originally Posted by Benedikt View Post
    I had heard Google was making a huge list of idioms, several years ago, to facilitate its language translators, but I see no evidence of it.

    not one can translate correctly, though not that i tried each and every one, the difference between the German formal SIE and familiar DU. or SIE plural, or SIE singular, formal.same for Russian language.
    suppose it will be a long time still, until we have these language- translation things they have in Startrek. Speak or write your own language and the mechanical translator repeats it in perfect -foreign language-.[/QUOTE]

    "Sie," the machine translator should be able to pick that up - it would have to find the nearest verb, see if the verb is 3rd person singular (she), or third person plural, but which would be the same verb ending as the first person formal. To figure out which of the latter two it is, the machine would check if the "s" is capitalized - if so, then it is formal "you." But it's still ambiguous if "Sie" is the first word in the sentence - it will always be capitalized - or if there is no verb in the phrase or sentence. Then you would have to dig for more context...

    The Google Russian-to-English translator seems to spit out "he" or "she" or "it" regardless of whether the noun is male, female or inanimate.
    "Defund the Social Sciences." - Fantastika, 2020

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •