Ask a questionAsk a question
 

AnswerMS Translation SOAP Interface Has Transaction Limits?

  • Wednesday, September 23, 2009 10:48 PMLLahman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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!

Answers

  • Friday, September 25, 2009 11:32 PMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    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

All Replies

  • Friday, September 25, 2009 11:32 PMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    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
  • Saturday, September 26, 2009 12:11 PMLLahman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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!
  • Friday, October 09, 2009 8:06 PMKostas0 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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 byKostas0 Friday, October 09, 2009 9:06 PM
    • Edited byKostas0 Friday, October 09, 2009 8:32 PM
    •  
  • Friday, October 09, 2009 8:31 PMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 09, 2009 8:59 PMKostas0 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Saturday, October 10, 2009 1:33 PMKostas0 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 !
  • Thursday, October 15, 2009 12:02 AMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Tuesday, October 20, 2009 2:05 AMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 5:30 PMKostas0 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks a lot.

    Wrapping each sentence in a "<p>...</p>" pair solves the problem.
  • Tuesday, October 20, 2009 11:54 PMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Good, thanks for letting us know.
    Also thanks for reporting the untranslated words.

    Chris Wendt
    Microsoft Translator
  • Monday, November 02, 2009 3:22 PMFabio Milheiro Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Thursday, November 12, 2009 11:57 PMChris WendtMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.