locked
MS Translation SOAP Interface Has Transaction Limits? RRS feed

  • Question

  • I am using the Translator SOAP interface and it is working quite well....right up until it quits with the error message "The HTTP service located at http://api.microsofttranslator.com/V1/Soap.svc is too busy."

    It seems to always error out like this after some number (100+ ?) of translations have successfully completed.

    Am I doing something incorrectly, does the service have volume/transaction count limits, or.....?

    Any suggestions (please and thank you)?  Great service just before it quits!
    Wednesday, September 23, 2009 10:48 PM

Answers

  • Hi L,

    you are hitting an intentional throughput limit, which is there to protect the MT service, and other users of the service.
    You can do one or both of these things:

    - Whenever you hit the limit, sleep for two minutes and then retry.
    - Stop new requests when you have hit 50 in a minute.

    In practice this 50 number may be a bit lower, try how it works with your content.

    If you need a higher throughput limit for commercial use, let us know at mtlic@microsoft.com.

    Chris Wendt
    Microsoft Translator
    • Marked as answer by Vikram Dendi Saturday, September 26, 2009 10:47 PM
    • Unmarked as answer by LLahman Friday, June 4, 2010 3:03 PM
    • Marked as answer by LLahman Friday, June 4, 2010 3:04 PM
    Friday, September 25, 2009 11:32 PM
  • Hi Phil,

    you are right and I should have mentioned it before: the service strongly prefers balanced HTML, and if it doesn't receive it, it will make it so. This got a little stricter in the release last weekend. The benefit is the respect of untranslatable elements: <code>, <address>, <samp>, <script>, <var>, <kbd> and <textarea>. You can also set the class attriobute to "notranslate" as in <span class="notranslate"> to prevent translation of a span.

    Chris Wendt
    Microsoft Translator
    Friday, February 19, 2010 2:26 PM

All replies

  • Hi L,

    you are hitting an intentional throughput limit, which is there to protect the MT service, and other users of the service.
    You can do one or both of these things:

    - Whenever you hit the limit, sleep for two minutes and then retry.
    - Stop new requests when you have hit 50 in a minute.

    In practice this 50 number may be a bit lower, try how it works with your content.

    If you need a higher throughput limit for commercial use, let us know at mtlic@microsoft.com.

    Chris Wendt
    Microsoft Translator
    • Marked as answer by Vikram Dendi Saturday, September 26, 2009 10:47 PM
    • Unmarked as answer by LLahman Friday, June 4, 2010 3:03 PM
    • Marked as answer by LLahman Friday, June 4, 2010 3:04 PM
    Friday, September 25, 2009 11:32 PM
  • Chris,

    Thank you for the reply.  I understand the message and the reasons for the limits.  I will be sending an email to the referenced address before long so we can begin to prepare for production implementation which is a few weeks off.  Until then, I think we can work around this during development.  I had a feeling something like this would be the answer.

    Thanks again!
    Saturday, September 26, 2009 12:11 PM
  • I had the same problem and I tried merging the pieces of text for translation into one, spliting them with a separation string.
    However I now get another exception:

    The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Translate'. The
    maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the
    MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 76, position 205.

    Can't you make the quota a little bigger ?
    I quess I have to combine your technique with mine to get what I want...

    Also your tanslator seems to change the formatting of the input text.
    E.g. I translated the contents of an SRT (subtitle) file here and the translator removed newlines, added spaces, changed the case of untranslated text, etc.
    I think that all of these are bad features (not to mention that they make my method -described above- become problematic :( ).
    Google's tranlation tool seems to preserve the formatting better. Perhaps you could add an option whether the translator should reformat the translated text or not.

    • Edited by Kostas0 Friday, October 9, 2009 9:06 PM
    Friday, October 9, 2009 8:06 PM
  • Hi Kostas,

    the limit protects the service and its users. But indeed you may go up to the size limit and you'll be fine. When combining segments and then inserting splits and markers, be sure to never cut sentences into two pieces. The engine needs to see a sentence fully intact to provide a reasonable translation, and a sentence cannot stretch over multiple requests.
    If you combine sentences that do not end with a language-appropriate sentence end punctuation, be sure to add one (for instance a period followed by space in English).

    Chris Wendt
    Microsoft Translator
    Friday, October 9, 2009 8:31 PM
  • Yes, I do whatever I can to give the sentences right.
    But the changes in the formatting I mentioned above (I have edited my previous post) introduce some trouble (e.g. the translation adds spaces inside my separator strings, changes the case of non-translated pieces of text -- which usually are my separator stings -- , etc).
    Anyway... I'l find a way to solve my problems.

    Thanks,
    Kostas.
    Friday, October 9, 2009 8:59 PM
  • I think I've found a nice separator.
    I separate sentenses using the character '¶' (U+00B6).
    It seems to work quite fine most of the times...

    You know, it would be nice if you treated a special symbol (e.g. '§'  U+00A7) like a fullstop and leave it untranslated/unchanged in the output.
    In this way, a programmer could translate many sentenses at once (using '§' as a separator) and without having to add fullstops that don't exist in the original text (e.g when translating movie subtitles).
    Can you do sth like that please ?

    Your translator fails to translate the words below (it leaves them as is):
    οδηγήσω
    προσλαμβάνεις
    Κουνηθείτε
    καρναβάλια
    κατέβηκες
    έφθασες
    υπόνομο
    σκάσε
    ξεκουραστείς
    έγδαραν
    μάγκες
    Θεούλη
    σοβαρολογείς
    ακούσεις
    σκοτωθώ
    Κανείς
    πεθάναμε
    αστοχήσεις
    Ξεκλείδωσα
    Κρατηθείτε
    Κρατήσου
    εξοντώσατε
    απολύσω
    ............

    Do you ever see the translations with low rating (to improve your translator) ?

    Your translator is a great tool !
    I hope you improve it !
    Saturday, October 10, 2009 1:33 PM
  • Hi Kostas,

    the ¶ character is just a normal character. It is not a sentence breaking character. It will worsen the translation when interpreted as part of the sentence.
    I do think you have a good point in suggesting a universal sentence breaking character.

    Chris Wendt
    Microsoft Translator
    Thursday, October 15, 2009 12:02 AM
  • Kostas,

    the API is HTML aware, so you can use HTML sentence-breaking tags, for instance <p>. In fact any tag that is not known in HTML to be internal (non-sentence breaking) is an external (sentence breaking) tag.

    The non-sentence breaking tags are

    a
    a0
    a1
    a10
    a11
    a12
    a13
    a14
    a15
    a16
    a17
    a18
    a19
    a2
    a20
    a3
    a4
    a5
    a6
    a7
    a8
    a9
    acronym
    b
    b*
    bdo
    big
    div
    em
    font
    g0
    g1
    g10
    g11
    g12
    g13
    g14
    g15
    g16
    g17
    g18
    g19
    g2
    g20
    g3
    g4
    g5
    g6
    g7
    g8
    g9
    i
    s
    small
    span
    strong
    sub
    sup
    u

    where b* means any tag starting with the letter b. Any other tag breaks the sentence.
    Tuesday, October 20, 2009 2:05 AM
  • Thanks a lot.

    Wrapping each sentence in a "<p>...</p>" pair solves the problem.
    Tuesday, October 20, 2009 5:30 PM
  • Good, thanks for letting us know.
    Also thanks for reporting the untranslated words.

    Chris Wendt
    Microsoft Translator
    Tuesday, October 20, 2009 11:54 PM
  • Hi L,

    you are hitting an intentional throughput limit, which is there to protect the MT service, and other users of the service.
    You can do one or both of these things:

    - Whenever you hit the limit, sleep for two minutes and then retry.
    - Stop new requests when you have hit 50 in a minute.

    In practice this 50 number may be a bit lower, try how it works with your content.

    If you need a higher throughput limit for commercial use, let us know at mtlic@microsoft.com .

    Chris Wendt
    Microsoft Translator

    Chris, what do you mean by "In practice this 50 number may be a bit lower?".

    In my opinion, it makes a lot of sense to have a specific limit and not a "may be a bit lower"...

    Your support seems very good and we are considering using your API, but can't we get a more precise number of the amount of requests we can make for a certain period of time?

    It's a little sacary to not know if we are reaching the limit or not. And this is specially important for what we are trying to achieve.

    Please reassure us. Thank you
    Monday, November 2, 2009 3:22 PM
  • Correcting myself: if you stay below 50 requests per minute and below 1000 characters per request you are quite safe. We'll fail the request only under extreme situations.
    Thursday, November 12, 2009 11:57 PM
  • A delimiter character is a good workaround, but it seems a much better solution to add an option to the API to accept multiple text snippets in one call.  This ensures that delimiters don't get transformed, or if something goes wrong with one of the snippets you don't end up with a "off by one" issue.
    Tuesday, January 5, 2010 5:48 PM
  • I couldn't agree more. We are considering this for an update of the API.
    Tuesday, January 5, 2010 9:49 PM
  • Just a note of interest. Wrapping each text in <p> </p> works fine.

    However, until today, I was using the simpler method of placing <p> between each text, e.g. text1<p>text2<p>text3. That made it very easy to split the returned string into individual translations.

    Now it seems that the behaviour of the Microsoft Translator has changed. It now inserts closing </p> tags, even if they were not present in the original text. The closing tags are all placed at the end of the string.

    Thus text1<p>text2<p>text3 is converted to text1<p>text2<p>text3</p></p>. This left me with a lot of closing tags on the end of my last translation!

    I have already fixed my code, by wrapping each text in <p> </p> tags, which is clearly a safer method.

    Phil
    Wednesday, February 17, 2010 11:34 PM
  • Hi Phil,

    you are right and I should have mentioned it before: the service strongly prefers balanced HTML, and if it doesn't receive it, it will make it so. This got a little stricter in the release last weekend. The benefit is the respect of untranslatable elements: <code>, <address>, <samp>, <script>, <var>, <kbd> and <textarea>. You can also set the class attriobute to "notranslate" as in <span class="notranslate"> to prevent translation of a span.

    Chris Wendt
    Microsoft Translator
    Friday, February 19, 2010 2:26 PM
  • Hi L,

    you are hitting an intentional throughput limit, which is there to protect the MT service, and other users of the service.
    You can do one or both of these things:

    - Whenever you hit the limit, sleep for two minutes and then retry.
    - Stop new requests when you have hit 50 in a minute.

    In practice this 50 number may be a bit lower, try how it works with your content.

    If you need a higher throughput limit for commercial use, let us know at mtlic@microsoft.com.

    Chris Wendt
    Microsoft Translator

    can you guys make a website where we can signup for a commercial unlimited throughput with no limits and also list the price? also for an extra fee there should be an un-branded version without the 'microsoft' text. also can you add the "english" language text into the drop-down box because it isn't there. also there should be a control panel to remove the 'share' and 'widget' buttons.
    and does this work with SSL https websites?,
    A 'popup' box doesn't appear on a SSL website saying "do you only want to view secure content" right?
    Thursday, March 4, 2010 9:51 AM
  • rydaz:

    Thank you for your feedback on needing a no-limits service. We will take this into account as we do capacity planning; any announcements regarding this will be made on our blog. We will also take into account your requests for more UI customization.

    The "english" language drop down does appear - what might be cause for confusion is that if you were translating from english, in the translated view the english option turns into "Original" indicating the original language. This allows users to go back to the original english page. This behavior also works the same way for other source language pages.

    SSL support is coming this month. Once that's in place - you should not see any popups.

    Thanks again for the feedback!

     


    Vikram Dendi, Biz, Product Strategy & UX Lead
    Microsoft Translator
    Saturday, May 15, 2010 2:39 PM
  • V2 of the API supports arrays: no tricks necessary anymore to segment text via HTML tags. You can pass text as seperate elements to the TranslateArray() method and you will receive them as separate elements. The elements do not need to be consecutive, but are all tranbslated to the same target langauge in a single call.

    Chris Wendt
    Microsoft Translator

    Tuesday, June 1, 2010 2:44 PM
  • Vikram

     

    You state in your post that a new version of the API will support SSL and that will be available later in May. I have kept an eye on the forums but have not seen the new version yet released. Any further news on a release date?

    Monday, June 7, 2010 8:22 AM
  • Just to make sure this is answered for future reference - the V2 API was released and SSL is now available.
    Friday, September 9, 2011 6:47 PM
  • Please note that we just announced multiple volume tiers, pricing and other exciting news at the BUILD conference. Refer to the FAQ for all the details and consider it authoritative over this thread in terms of volume/throughput limit questions.


    Vikram Dendi, Director of Product Management
    Microsoft Translator
    Wednesday, September 14, 2011 5:54 PM