nitesh13t / google-ajax-apis

Automatically exported from code.google.com/p/google-ajax-apis
0 stars 0 forks source link

5000 chars limit + POST accepted only on translate API and not on detect API #217

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
do a POST request to http://ajax.googleapis.com/ajax/services/language/detect

What is the expected output? What do you see instead?

- Expected to be able to send up to 5000 chars and get a JSON result.
- Right now got "405 HTTP method POST is not supported by this URL
ajax.googleapis.com".

What version of the product are you using? On what operating system?
v1.0, using RESTful interface with Flex

Please provide any additional information below.
using similar code with on
"http://ajax.googleapis.com/ajax/services/language/translate" is working
fine but I'm only interested in performing language detection to validate
an entry (need isReliable and confidence).

As detect and translate are both part of the LanguageDetection API please
adapt detect. Thanks!

Original issue reported on code.google.com by Cyri...@gmail.com on 24 Mar 2009 at 9:51

GoogleCodeExporter commented 9 years ago
CyrilHZ --

We only accept POST/5k requests to translations.  Here is what it says in the 
ToS:
"Don't[...]submit any request exceeding 5000 characters in length, to the 
translation components of the 
Service"

Specifically, it is only saying 5k characters in relation to translation.  I 
will mark this as a suggestion, not a 
bug.

Either way, language detect should still be equally as accurate with requests 
smaller than 5k.   Are you 
experiencing problems with the accuracy with requests that are 1-2k chars?

-Ben

Original comment by lisba...@google.com on 25 Mar 2009 at 6:13

GoogleCodeExporter commented 9 years ago
Hi Ben,

yes, I have a problem of accuracy with requests that are 1-2k chars, that's why 
I
wanted to update my detection component to handle 5000 chars. 

I have several examples, the latest one is a Czech text which is detected as 
Slovak
when cut in 2000 chars parts, but if I run the same test cutting it in 5000 
chars
parts and detecting the source using the translation component, then it returns 
Czech.

The texts that I'm working with are sometimes multilingual that's why I need to 
use
detect (to get isReliable and confidence) and not translate.

As detect and translate are both parts of the Language API, I expected 
"equality" in
the functioning mechanism.

Original comment by Cyri...@gmail.com on 26 Mar 2009 at 8:54

GoogleCodeExporter commented 9 years ago
Could you send a few example text blurbs that work in 5k but don't in 2k?

Thanks,
Ben

Original comment by lisba...@google.com on 26 Mar 2009 at 2:41

GoogleCodeExporter commented 9 years ago
what is the Maximum and minimum character length for Language detection?

Original comment by rajesh.s...@gmail.com on 18 May 2009 at 9:47

GoogleCodeExporter commented 9 years ago
Need an update on that one. 

The best I can achieve with the (detect) RESTFul API is sending 1200 characters 
if
I'm using ColdFusion CFHTTP tag or 300 when using Flex (limited by the browser 
doing
the request!). The problem is that I'm "checking" sometimes "large texts" that 
makes
me send hundred or thousand request. Accepting a POST request will reduce the 
number
of those requests.

Another suggestion would be to add the full json response of the detection API 
in the
translate API so that I can use it to detect larger portion of text (by using 
the
POST method).

Original comment by Cyri...@gmail.com on 4 May 2010 at 9:53

GoogleCodeExporter commented 9 years ago
Please, add the "POST" method for language detect api

Original comment by a.murau...@gmail.com on 10 Dec 2010 at 8:11