locked
TranslateArray2 not returning alignment information RRS feed

  • Question

  • I'm trying to get alignment information using https://api.microsofttranslator.com/V2/Http.svc/TranslateArray2, but it doesn't seem to be returning any (see sample output below). Any clue? Has the feature to provide alignment been deprecated? Thanks in advance.

    Ruben

    <ArrayOfTranslateArray2Response 
        xmlns="http://schemas.datacontract.org/2004/07/Microsoft.MT.Web.Service.V2" 
        xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
        <TranslateArray2Response>
            <Alignment/>
            <From>en</From>
            <OriginalTextSentenceLengths 
                xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:int>184</a:int>
            </OriginalTextSentenceLengths>
            <TranslatedText>Crear y administrar cuentas en su nombre</TranslatedText>
            <TranslatedTextSentenceLengths 
                xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                <a:int>188</a:int>
            </TranslatedTextSentenceLengths>
        </TranslateArray2Response>
    </ArrayOfTranslateArray2Response>

    Tuesday, January 26, 2016 2:03 PM

All replies

  • There is a limitation on Alignment API where we don’t expose the values: https://msdn.microsoft.com/en-us/library/dn198370.aspx 

    Restrictions

    Alignment is only returned for a subset of the language pairs at this point:

    • from English to any other language;
    • from any other language to English except for Chinese Simplified, Chinese Traditional, and Latvian to English
    • from Japanese to Korean or from Korean to Japanese

    You will not receive alignment information in the following cases:

    • If the translation comes from CTF (added under your account with AddTranslation()).
    • If the sentence is a canned translation. Example of a canned translation is "This is a test", "I love you" and other high frequency sentences.
    • By any method other than TranslateArray2(). Specifically, the Translate() method does not expose alignment. TranslateArray2() is a true superset of Translate().

    If you are expecting alignment based on the above, please let us know. Please provide additional details so that we can investigate it further. 


    Microsoft Translator team - www.microsoft.com/Translator

    Wednesday, January 27, 2016 5:22 PM