Google Cloud Natural Language documents:classifyText API

The documents:classifyText API from Google Cloud Natural Language — 1 operation(s) for documents:classifytext.

OpenAPI Specification

google-cloud-natural-language-documents-classifytext-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Natural Language documents:analyzeEntities documents:classifyText API
  description: Provides natural language understanding technologies to extract insights from unstructured text including sentiment, entities, and syntax.
  version: v1
  contact:
    name: Google Cloud
    url: https://cloud.google.com/natural-language
servers:
- url: https://language.googleapis.com/v1
tags:
- name: documents:classifyText
paths:
  /documents:classifyText:
    post:
      operationId: classifyText
      summary: Google Cloud Natural Language Classify text
      description: Classifies the provided document into content categories.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClassifyTextRequest'
      responses:
        '200':
          description: Successful text classification response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifyTextResponse'
      tags:
      - documents:classifyText
components:
  schemas:
    ClassifyTextResponse:
      type: object
      properties:
        categories:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              confidence:
                type: number
    Document:
      type: object
      properties:
        type:
          type: string
          enum:
          - TYPE_UNSPECIFIED
          - PLAIN_TEXT
          - HTML
        content:
          type: string
        gcsContentUri:
          type: string
        language:
          type: string
    ClassifyTextRequest:
      type: object
      required:
      - document
      properties:
        document:
          $ref: '#/components/schemas/Document'