nluaas-interpretation payload

Current version: v1

Messages with the application/x-nuance-nluaas-interpretation.v1+json dataContentType contain no additional service-specific fields beyond those described in data field structure. Note, however, that for NLUaaS the clientData field is part of the request object.

NLUaaS request and response objects

The request object describes the input, as well as the model, used for the interpretation. Parameters, extra resources, client data, and user ID may also be included to customize the interpretation. See InterpretRequest for details.

The input to interpret is either:

  • Plain text (inputUnion: "text"), as shown in Sample payload.
  • The result from ASRaaS ("inputUnion": "asrResult") as shown below, with the value encrypted (truncated in the example for brevity).
"input":
    {
      "asrResult":
      {
        "type_url": "type.googleapis.com/nuance.asr.v1.Result",
        "value":
        {
          "type": "Buffer",
          "data": [16, 210, ..., 46, 48]
        }
      },
      "inputUnion": "asrResult"
    }

The response object, in addition to providing a status message, describes the interpretation result, both the input (literal) and the candidate interpretations of the input. For more example payloads, see InterpretResult.

Notice that the first child under interpretations specifies the result type (type of interpretation). For example:

"result": {
   "interpretations": [{
       "singleIntentInterpretation": {
         ...
       }
     },
     ...

There are two interpretation result types:

  • Single-intent interpretation results include one or more alternative intents, complete with entities if they occur in the text. Each intent is shown with a confidence score and indicates whether the match was done from a grammar file (GRAMMAR) or a SSM or statistical semantic model (STATISTICAL) file. See SingleIntentInterpretation.

  • Multi-intent interpretation results contain a tree of nodes representing the detected operators, intents, and entities and their associations. Multi-intent interpretation requires a semantic model that is enabled for multi-intent (not currently supported).

    Although multi-intent interpretation may be requested without error, the results contain the same information as a single-intent interpretation. You will notice some formatting differences, for example, the root of the multi-intent interpretation contains the intent. See MultiIntentInterpretation.

Sample payload

  Single-intent interpretation