Google Cloud Natural Language documents:annotateText API

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

OpenAPI Specification

google-cloud-natural-language-documents-annotatetext-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Natural Language documents:analyzeEntities documents:annotateText 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:annotateText
paths:
  /documents:annotateText:
    post:
      operationId: annotateText
      summary: Google Cloud Natural Language Annotate text
      description: Provides all available text analysis features in a single call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotateTextRequest'
      responses:
        '200':
          description: Successful annotation response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotateTextResponse'
      tags:
      - documents:annotateText
components:
  schemas:
    AnnotateTextResponse:
      type: object
      properties:
        sentences:
          type: array
          items:
            type: object
        tokens:
          type: array
          items:
            type: object
        entities:
          type: array
          items:
            $ref: '#/components/schemas/Entity'
        documentSentiment:
          $ref: '#/components/schemas/Sentiment'
        language:
          type: string
        categories:
          type: array
          items:
            type: object
    AnnotateTextRequest:
      type: object
      required:
      - document
      - features
      properties:
        document:
          $ref: '#/components/schemas/Document'
        features:
          type: object
          properties:
            extractSyntax:
              type: boolean
            extractEntities:
              type: boolean
            extractDocumentSentiment:
              type: boolean
            extractEntitySentiment:
              type: boolean
            classifyText:
              type: boolean
        encodingType:
          type: string
    Document:
      type: object
      properties:
        type:
          type: string
          enum:
          - TYPE_UNSPECIFIED
          - PLAIN_TEXT
          - HTML
        content:
          type: string
        gcsContentUri:
          type: string
        language:
          type: string
    Sentiment:
      type: object
      properties:
        magnitude:
          type: number
        score:
          type: number
    Entity:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
          - UNKNOWN
          - PERSON
          - LOCATION
          - ORGANIZATION
          - EVENT
          - WORK_OF_ART
          - CONSUMER_GOOD
          - OTHER
          - PHONE_NUMBER
          - ADDRESS
          - DATE
          - NUMBER
          - PRICE
        salience:
          type: number
        sentiment:
          $ref: '#/components/schemas/Sentiment'