6

As of Monday 20th November we are getting the error error below for requests to the annotate API using the PHP SDK, it appears the minimum number of tokens now allowed is 20. This was previously allowing any number of words to be submitted. The test console will still accept a minimum of 1 word https://cloud.google.com/natural-language/

Can anyone confirm whether this change is permanent and if so that the min is now 20 words? This has caused us a major issue I can find no formal announcement about this change.

Thanks in advance...

{
"error": {
"code": 400,
"message": "Invalid text content: too few tokens (words) to process.",
"status": "INVALID_ARGUMENT",
"details": [
  {
    "@type": "type.googleapis.com/google.rpc.BadRequest",
    "fieldViolations": [
      {
        "field": "document",
        "description": "Invalid text content: too few tokens (words) to process."
      }
    ]
  }
 ]
}
  • 5
    Are you using `classifyText`? That method has a minimum of 20 tokens (see here: https://cloud.google.com/natural-language/docs/basics#content-classification). There is no minimum for the other NL API methods. – Sara Dec 12 '17 at 15:00

0 Answers0