openapi: 3.0.2
servers:
  - url: 'https://api.rosette.com/rest/v1/'
info:
  description: >-
    Welcome to Rosette. This platform uses natural language processing, statistical modeling, and machine learning to analyze unstructured and semi-structured text across 364 language-encoding-script combinations, revealing valuable information and actionable data. Rosette provides endpoints for extracting entities and relationships, translating and comparing the similarity of names, categorizing and adding linguistic tags to text and more.<br /><br />
    By default, Rosette will only process one call (active HTTP connection) at a time. You can send a second call once you have received a response from the first. <br /><br />
      The maximum payload size is 600KB, with a maximum character count of 50,000. <br /><br />
      The maximum size name for any of the name processing endpoints, (/name-similarity, /name-translation, /name-deduplication) is 500 characters.

  version: "1.0"
  title: Rosette Text Analytics
  termsOfService: "https://developer.rosette.com/terms-of-use"
  contact:
    name: "Rosette Text Analytics API"
    url: "https://developer.rosette.com"
    email: "support@rosette.com"
tags:
  - name: address-similarity
    description: Calculates a similarity score for a pair of addresses
  - name: categories
    description: Identifies the category (or categories) associated with a document.
  - name: entities
    description: Extracts entities from a document and links them to a knowledge base.
  - name: events
    description: Extracts events from a document.
  - name: language
    description:  Identifies the language(s) present in a document.
  - name: morphology
    description: Performs morphological analysis on a document.
  - name: name-deduplication
    description: Identifies potential duplicates from a list of names
  - name: name-similarity
    description: Calculates a similarity score for a pair of names
  - name: name-translation
    description: Provides tailored transliteration for proper names
  - name: record-similarity
    description: Calculates similarity scores for pairs of records
  - name: relationships
    description: Identifies connections between entities in a document
  - name: semantics-similar
    description: Returns a list of similar terms in the specified language(s)
  - name: semantics-vector
    description: Returns the text embedding for a document
  - name: sentences
    description: Identifies sentence boundaries within a document
  - name: sentiment
    description: Analyzes the subjective attitude of a document and its entities
  - name: syntax-dependencies
    description: Identifies the syntactic dependencies between tokens in a document
  - name: tokens
    description: Splits a document into tokens
  - name: topics
    description: Extracts a document's most salient themes
  - name: transliteration
    description: Transliterates Romanized Arabic chat to native Arabic script and visa-versa
  - name: info
    description: Returns general information about Rosette
  - name: ping
    description: Indicates whether Rosette's API is available

paths:
  /address-similarity:
    post:
      tags:
        - address-similarity
      summary: Match addresses from input
      description: >-
        Returns the confidence score of matching 2 addresses.
        You can specify the fields of the addresses to be matched or provide the address as a string.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#address-similarity"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddressSimilarityRequest'
            examples:
              JSON String:
                value:
                  address1:
                    houseNumber: 1600
                    road: Pennsylvania Ave. NW
                    city: Washington
                    state: D.C.
                    postCode: 20500
                  address2: 160 Pennsilvana Avenue, Washington, D.C., 20500

      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressSimilarityResponse'
  /categories:
    post:
      tags:
        - categories
      summary: Identify contextual categories in the input.
      description: >-
        Returns a category or categories identified in the input.  The possible
        categories are Tier 1 contextual categories defined in the QAG Taxonomy.
        The response is the contextual categories identified in the input.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#categorizer"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoriesRequest'
            examples:
              JSON String:
                value:
                  content: If you are a fan of the British television series Downton Abbey and you are planning to be in New York anytime before April 2nd, there is a perfect stop for you while in town.
              URI:
                value:
                  contentUri: https://www.rosette.com/about/
              Specify Language:
                value:
                  language: eng
                  content: If you are a fan of the British television series Downton Abbey and you are planning to be in New York anytime before April 2nd, there is a perfect stop for you while in town.
              With Option:
                value:
                  language: eng
                  content: If you are a fan of the British television series Downton Abbey and you are planning to be in New York anytime before April 2nd, there is a perfect stop for you while in town.
                  options:
                    singleLabel: true
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoriesResponse'

  /entities:
    post:
      tags:
        - entities
      summary: Extracts entities from a document and links them to a knowledge base.
      description:  >-
        Returns each entity extracted from the input.
        The response is a list of extracted entities. Each entity includes an entityId (Wikidata QID or temporary ID), mention (entity text in the input), normalized text (complete form of the entity in the input), the count (number of mentions of entity in the input), the salience [optional] (floating point number 0.0 or 1.0), the confidence [optional] (floating point number between 0 and 1), the linking confidence [optional] (floating point number between 0 and 1), and the PermID [optional] (ID to PermID knowledge base).
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#entity-extraction-and-linking"
      parameters:
        - in: query
          name: output
          required: false
          schema:
            type: string
          description: When set to Rosette, output is ADM format. Required to see  entity mentions from indoc coref.
          
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntitiesRequest'
            examples:
              JSON String:
                value:
                  content: The Securities and Exchange Commission today announced the leadership of the agency’s trial unit.  Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel.  In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters as well as coordinating with litigators in the SEC’s 11 regional offices around the country.
              URI:
                value:
                  contentUri: https://www.sec.gov/news/press-release/2017-161
              Specify Language:
                value:
                  language: eng
                  content: The Securities and Exchange Commission today announced the leadership of the agency’s trial unit.  Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel.  In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters as well as coordinating with litigators in the SEC’s 11 regional offices around the country.
              With Options:
                value:
                  language: eng
                  content: The Securities and Exchange Commission today announced the leadership of the agency’s trial unit.  Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel.  In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters as well as coordinating with litigators in the SEC’s 11 regional offices around the country.
                  options:
                    includeDBpediaTypes: true
                    calculateSalience: true
              Indoc Coref:
                value:
                  language: eng
                  content: The Securities and Exchange Commission today announced the leadership of the agency’s trial unit.  Bridget Fitzpatrick has been named Chief Litigation Counsel of the SEC and David Gottesman will continue to serve as the agency’s Deputy Chief Litigation Counsel. Since December 2016, Ms. Fitzpatrick and Mr. Gottesman have served as Co-Acting Chief Litigation Counsel.  In that role, they were jointly responsible for supervising the trial unit at the agency’s Washington D.C. headquarters as well as coordinating with litigators in the SEC’s 11 regional offices around the country.
                  options:
                    useIndocServer: true
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntitiesResponse'

  /entities/info:
    get:
      tags:
        - entities
      summary: Returns a list of entity types
      description: >-
        Returns list of supported entity types in the model. If you provide a profileId, it returns the list of entity types in the model used by the profileId. By default, the response lists all entity types by processor type.
      parameters:
        - in: query
          name: profileId
          required: false
          schema:
            type: string
          description: The id of the custom profile you are querying. This parameter is optional and for on-premise installations only.
        - in: query
          name: perSubsourceSupportedEntityTypes
          required: false
          schema:
            type: boolean
          description: >-
            When set to true returns the entity types by subsource in addition to by processor.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityInfoResponse'

  /entities/configuration/gazetteer/add:
    post:
      tags:
        - entities
      summary: Add gazetteer entries for entity extraction
      description: >-
        On-premise installations only.
        Allows you to dynamically add gazetteer entries to your instance.
        The entities object must be formatted as:
        {"entities": {"EntityTypeName": ["Value1", "Value2"] } }
        Example:
        {"entities": { "COMPANY": ["New Corp", "Best Business"] } }
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityDynGaz'
      responses:
        '200':
          description: OK

  /language:
    post:
      tags:
        - language
      summary: Identifies the language(s) in a document
      description: >-
        Returns list of candidate languages in order of descending confidence.
        The response is an ordered list of identified languages, including
        language and identification confidence, sorted by descending confidence.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#language-identifier"
      requestBody:
        content:
          application/json:
           schema:
             $ref: '#/components/schemas/LanguageRequest'
           examples:
            JSON String:
              value:
                content: Por favor Señorita, says the man
            URI:
              value:
                contentUri: https://en.wikipedia.org/wiki/Abd_Rabbuh_Mansur_Hadi
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguageResponse'
  /events:
    post:
      tags:
        - events
      summary: Extracts events from a document.
      description:  >-
        Returns each event extracted from the input.
        The response is a list of event mentions. Each event includes a list of roles as well as any negation cues. 
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#event-extractor"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventRequest'
            examples:
              travel:
                value:
                  content: On Tuesday, April 25, Principal Deputy National Security Advisor Jon Finer traveled to Colombia to lead the interagency U.S. delegation for the international conference on Venezuela.
              meet:
                value:
                 content: While in Colombia, Finer met with President Gustavo Petro. He also met with Foreign Minister Alvaro Leyva, Chief of Staff Laura Sarabia, Minister of Justice and Law Nestor Ivan Osuna, and Deputy Finance Minister Gonzalo Hernandez Jimenez to follow up on the recent bilateral meeting between President Biden and President Petro in Washington last week. 
              negation:
                value:
                  language: eng
                  content: President Biden decided not to fly to the conference in Georgia last Thursday. He traveled back to the White House on Friday"
                  options:
                    negation: both
    

          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventResponse'

  /events/info:
    get:
      tags:
        - events
      summary: Returns event schemas. 
      description: >-
        An event schema defines the event types you are extracting. It includes key phrases, roles, role types, and extractors. You can return the list of all models installed in the system, along with the schemas used to create the model. You can also return the schema for a specific model, where the model is represented by the workspace id (wid).
      parameters:
        - in: query
          name: workspaceId
          required: false
          schema:
            type: string
          description: The workspace id for a specific model installed on the server.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventInfoResponse'

  
  /morphology/{morphoFeature}:
    post:
      tags:
        - morphology
      summary: Runs morphological analysis on input
      description: >-
        Returns morphological analysis of input. The response may include
        lemmas, part of speech tags, compound word components, and Han readings. Support
        for specific return types depends on language.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#morphology"
      parameters:
        - in: path
          name: morphoFeature
          required: true
          schema:
            type: string
            enum:
              - complete
              - lemmas
              - parts-of-speech
              - compound-components
              - han-readings
          description: Type of data to return
      requestBody:
        content:
          application/json:
            schema:
             $ref: '#/components/schemas/MorphologyRequest'
            examples:
              JSON String:
                value:
                  content: The quick brown fox jumped over the lazy dog. 👍🏾 Yes he did. B
              URI:
                value:
                  contentUri: https://en.wikipedia.org/wiki/Abd_Rabbuh_Mansur_Hadi
              Optional - Specify Language:
                value:
                  language: eng
                  content: The quick brown fox jumped over the lazy dog. Yes he did. B
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MorphologyResponse'

  /name-deduplication:
    post:
      tags:
        - name-deduplication
      summary: Deduplicates names from input
      description: >-
        Returns a list of cluster IDs to be used for deduplication, given a list
        of names and a score threshold. Position in the cluster ID list
        corresponds to the position of a name in the input list, and identical
        cluster IDs signify names that are considered to be duplicates.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#name-deduplication"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NameDeduplicationRequest'
            examples:
              JSON String:
                value:
                  names:
                    - text: Joe Smith
                    - text: Joe Smidge
                    - text: Alex Black
                  threshold: 0.8
      responses:
        '200':
          description: OK
          content:
            application/json:
             schema:
              $ref: '#/components/schemas/NameDeduplicationResponse'

  /name-similarity:
    post:
      tags:
        - name-similarity
      summary: Match names from input
      description: >-
        Returns the confidence score of matching 2 names.
        You must specify the names to be matched.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#name-similarity"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NameSimilarityRequest'
            examples:
              JSON String:
                value:
                  name1: Michael Jackson
                  name2: 迈克尔·杰克逊
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NameSimilarityResponse'
  /name-translation:
    post:
      tags:
        - name-translation
      summary: Translate names from input
      description: >-
        Returns the translation of a name. You must specify the name
        to translate and the target language for the translation.
        You can also include additional parameters.</br> The endpoint returns a single translation; to return multiple candidates use the maximumResults parameter.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#name-translator"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NameTranslationRequest'
            examples:
              JSON String:
                value:
                  name: معمر محمد أبو منيار القذاف
                  targetLanguage: eng
              Multiple Values:
                value:
                  name: معمر محمد أبو منيار القذاف
                  targetLanguage: eng
                  maximumResults: 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NameTranslationResponse'
  /record-similarity:
    post:
      tags:
        - record-similarity
      summary: Match pairs of records
      description: >-
        Compares two lists of records and returns a similarity score for each pair of records. Each record contains one to five fields. The fields can be any of the following entity types: PERSON, ORGANIZATION, ADDRESS, DATE, or IDENTIFIER/TEXT. The records do not have to contain the same fields; only fields with the same field name are compared. If one record has three fields and the other has two fields, the missing field will be ignored and the other two fields compared.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#record-similarity"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordRequest'
            examples:
              Name and birthdate:
                value:
                  fields: 
                    dob: 
                      type: rni_date
                      weight: 0.1
                    primaryName:
                      type: rni_name
                      weight: 0.5
                  properties:
                    threshold: 0.7
                    includeExplainInfo: true
                  records:
                    left:
                      dob:
                        date: "1993/04/16"
                      primaryName:
                        text: "Ethan R"
                        entityType: PERSON
                        language: eng
                    right:
                      dob:
                        date: "1993-04-16"
                      primaryName:
                        text: "Evan R"
                        entityType: PERSON
                        language: eng
                
                
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordResponse'
        
  /relationships:
    post:
      tags:
        - relationships
      summary: Extract relationships from input
      description: >-
        Returns the relationships between entities in the input text. <br><br>
        The response is a list of extracted relationships. A relationship contains <br><br>
        predicate - usually the main verb, property or action that is expressed by the text<br>
        arg1 - usually the subject, agent or main actor of the relationship<br>
        arg1Id [optional] - the entity ID to link an entity to a knowledgebase <br>
        arg2 [optional] - complements the predicate and is usually the object, theme or patient of the relationship<br>
        arg2Id [optional] - the entity ID to link an entity to a knowledgebase<br>
        confidence - a measure of quality of relationship extraction, between 0 - 1
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#relationship-extractor"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRequest'
            examples:
              JSON String:
                value:
                  content: FLIR Systems is headquartered in Oregon and produces thermal imaging, night vision, and infrared cameras and sensor systems.  According to the SEC’s order instituting a settled administrative proceeding, FLIR entered into a multi-million dollar contract to provide thermal binoculars to the Saudi government in November 2008.  Timms and Ramahi were the primary sales employees responsible for the contract, and also were involved in negotiations to sell FLIR’s security cameras to the same government officials.  At the time, Timms was the head of FLIR’s Middle East office in Dubai.
              URI:
                value:
                  contentUri: https://www.sec.gov/News/PressRelease/Detail/PressRelease/1365171486708
              Optional - Specify Language:
                value:
                  language: eng
                  content: FLIR Systems is headquartered in Oregon and produces thermal imaging, night vision, and infrared cameras and sensor systems.  According to the SEC’s order instituting a settled administrative proceeding, FLIR entered into a multi-million dollar contract to provide thermal binoculars to the Saudi government in November 2008.  Timms and Ramahi were the primary sales employees responsible for the contract, and also were involved in negotiations to sell FLIR’s security cameras to the same government officials.  At the time, Timms was the head of FLIR’s Middle East office in Dubai.
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  relationships:
                    type: array
                    items:
                      $ref: '#/components/schemas/RelationshipResponse'
  /semantics/similar:
    post:
      tags:
        - semantics-similar
      summary: Finds terms similar to the input
      description: >-
        Provides the terms similar to the input. <br><br>
        Returns a mapping of each requested language to a list of terms
        similar to the input
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#semantic-similar"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SemanticsSimilarRequest'
            examples:
              JSON String:
                value:
                  content: spy
                  options:
                    resultLanguages:
                      - eng
                      - spa
                      - deu
                      - jpn
              URI:
                value:
                  contentUri: https://en.wikipedia.org/wiki/Espionage
                  options:
                    resultLanguages:
                      - eng
                      - spa
                      - deu
                      - jpn
              Options:
                value:
                  language: eng
                  content: spy
                  options:
                    resultLanguages:
                      - eng
                      - spa
                      - deu
                      - jpn
                    embeddingsMode: GEN_1
                    count: 4

          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  relationships:
                    type: array
                    items:
                      $ref: '#/components/schemas/SimilarTermsResponse'

  /semantics/vector:
    post:
      tags:
        - semantics-vector
      summary: Create embeddings from input
      description: >-
        Provides the embedding for the input text. <br><br>Returns a single vector of floating point numbers for your input, known as a text embedding. Among other uses, a text embedding enables you to calculate the similarity between two documents or two words.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#semantics-vector"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SemanticVectorsRequest'
            examples:
              JSON String:
                value:
                  content: Cambridge, Massachusetts
              URI:
                value:
                  contentUri: https://en.wikipedia.org/wiki/Cambridge,_Massachusetts
              Options:
                value:
                  language: eng
                  content: Cambridge, Massachusetts
                  options:
                    embeddingsMode: GEN_1
                    perToken: true
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'

      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SemanticVectorsResponse'

  /sentences:
    post:
      tags:
        - sentences
      summary: Determine sentences
      description: >-
        Divides the input into sentences.<br><br> The response contains a list of sentences.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#sentences"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRequest'
            examples:
              JSON String:
                value:
                  content: "This land is your land. This land is my land, from California to the New York island; from the red wood forest to the Gulf Stream waters. This land was made for you and Me. As I was walking that ribbon of highway, I saw above me that endless skyway: I saw below me that golden valley: This land was made for you and me."
              URI:
                value:
                  contentUri: https://en.wikipedia.org/wiki/Abd_Rabbuh_Mansur_Hadi
              Specify Language:
                value:
                  language: eng
                  content: "This land is your land. This land is my land, from California to the New York island; from the red wood forest to the Gulf Stream waters. This land was made for you and Me. As I was walking that ribbon of highway, I saw above me that endless skyway: I saw below me that golden valley: This land was made for you and me."
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentencesResponse'

  /sentiment:
    post:
      tags:
        - sentiment
      summary: Analyze sentiment of input
      description: >-
        Analyzes the positive and negative sentiment expressed by the input. <br><br>The response contains sentiment analysis results.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#sentiment-analyzer"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SentimentRequest'
            examples:
                JSON String:
                  value:
                    content: Original Ghostbuster Dan Aykroyd, who also co-wrote the 1984 Ghostbusters film, couldn’t be more pleased with the new all-female Ghostbusters cast, telling The Hollywood Reporter, “The Aykroyd family is delighted by this inheritance of the Ghostbusters torch by these most magnificent women in comedy.”
                URI:
                  value:
                    contentUri: http://www.hollywoodreporter.com/news/dan-aykroyd-new-ghostbusters-cast-767943
                Specify Language:
                  value:
                    language: eng
                    content: Original Ghostbuster Dan Aykroyd, who also co-wrote the 1984 Ghostbusters film, couldn’t be more pleased with the new all-female Ghostbusters cast, telling The Hollywood Reporter, “The Aykroyd family is delighted by this inheritance of the Ghostbusters torch by these most magnificent women in comedy.”
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SentimentResponse'

  /syntax/dependencies:
    post:
      tags:
        - syntax-dependencies
      summary: Create dependency data from input
      description: >-
        The Rosette API’s /syntax/dependencies endpoint will return the parse tree of the input text as a list of labeled directed links between tokens, as well as the list of tokens in the input sentence. <br><br>The /syntax/dependencies endpoint returns a list of sentences, their offsets, and their labeled dependencies, all connected to a list of tokens by indices.
     
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentRequest'
            examples:
                JSON String:
                  value:
                    content: Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday.
                URI:
                  value:
                    contentUri: https://www.rosette.com/about/
                Specify Language:
                  value:
                    language: eng
                    content: Yoshinori Ohsumi, a Japanese cell biologist, was awarded the Nobel Prize in Physiology or Medicine on Monday.
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyntaxDependenciesResponse'
  /tokens:
    post:
      tags:
        - tokens
      summary: Tokenize input
      description: >-
        Divides the input into tokens. <br><br>The response contains a list of tokens.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#tokenizer"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokensRequest'
            examples:
                JSON String:
                  value:
                    content: 中日贸易委员会会议
                URI:
                  value:
                    contentUri: https://en.wikipedia.org/wiki/Abd_Rabbuh_Mansur_Hadi

          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokensResponse'
  /topics:
    post:
      tags:
        - topics
      summary: Extract topics from input
      description: >-
        Returns each topic extracted from the input. <br><br>The response is a list of extracted keyphrases and a list of extracted concepts.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#topic-extractor"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TopicsRequest'
            examples:
                JSON String:
                  value:
                    content: Lily Collins is in talks to join Nicholas Hoult in Chernin Entertainment and Fox Searchlight's J.R.R. Tolkien biopic Tolkien. Anthony Boyle, known for playing Scorpius Malfoy in the British play Harry Potter and the Cursed Child, also has signed on for the film centered on the famed author. In Tolkien, Hoult will play the author of the Hobbit and Lord of the Rings book series that were later adapted into two Hollywood trilogies from Peter Jackson. Dome Karukoski is directing the project.
                URI:
                  value:
                    contentUri: http://www.hollywoodreporter.com/news/lily-collins-joins-nicholas-hoult-jrr-tolkien-biopic-1033539
                Options:
                  value:
                    language: eng
                    content: Lily Collins is in talks to join Nicholas Hoult in Chernin Entertainment and Fox Searchlight's J.R.R. Tolkien biopic Tolkien. Anthony Boyle, known for playing Scorpius Malfoy in the British play Harry Potter and the Cursed Child, also has signed on for the film centered on the famed author. In Tolkien, Hoult will play the author of the Hobbit and Lord of the Rings book series that were later adapted into two Hollywood trilogies from Peter Jackson. Dome Karukoski is directing the project.
                    options:
                      conceptSalienceThreshold: .4
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopicsResponse'
  /transliteration:
    post:
      tags:
        - transliteration
      summary: Runs transliteration on input
      description: >-
        Returns transliteration of Arabic written in Arabizi or Romanized Arabic script and vice versa. <br><br>The response is a transliteration string.
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-18"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransliterationRequest'
            examples:
                JSON String:
                  value:
                    content: ana r2ye7 el gam3a el sa3a 3 el 3asr
                URI:
                  value:
                    contentUri: https://www.letras.com/sabah/1670917/
                Specify Language:
                  value:
                    language: ara
                    content: ana r2ye7 el gam3a el sa3a 3 el 3asr
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransliterationResponse'
  /categories/supported-languages:
    get:
      tags:
        - categories
      summary: Supported languages
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-16"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'

  /entities/supported-languages:
    get:
      tags:
        - entities
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /entities endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-9"
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /entities/indoc-coref-server/supported-languages:
    get:
      tags:
        - entities
      summary: Indoc coref supported languages
      description: Returns a list of Rosette supported languages for the indoc coreference server on the /entities endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.htmll#supported-languages---indoc-coref"
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /events/supported-languages:
    get:
      tags:
        - events
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /events endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-10"
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /language/supported-languages:
    get:
      tags:
        - language
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /languages endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-5"
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /morphology/{morphoFeature}/supported-languages:
    get:
      tags:
        - morphology
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /morphology endpoint
      externalDocs:
        description: Features and Functions
        url: "/rest/doc#morphological-analysis-language-support"
      parameters:
        - in: path
          name: morphoFeature
          required: true
          schema:
            type: string
            enum:
              - complete
              - lemmas
              - parts-of-speech
              - compound-components
              - han-readings
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /morphology/supported-languages:
    get:
      tags:
        - morphology
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /morphology endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-6"
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /name-deduplication/supported-languages:
    get:
      tags:
        - name-deduplication
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /name-deduplication endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-3"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /name-similarity/supported-languages:
    get:
      tags:
        - name-similarity
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /name-similarity endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguagePairsResponse'
  /record-similarity/supported-languages:
    get:
      tags:
        - record-similarity
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /record-similarity endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-2"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguagePairsResponse'
  /address-similarity/supported-languages:
    get:
      tags:
        - address-similarity
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /address-similarity endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-1"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguagePairsResponse'
  /name-translation/supported-languages:
    get:
      tags:
        - name-translation
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /name-translation endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-4"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguagePairsResponse'
  /relationships/supported-languages:
    get:
      tags:
        - relationships
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /relationships endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-17"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /semantics/vector/supported-languages:
    get:
      tags:
        - semantics-vector
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /semantics/vector endpoint
      externalDocs:
        description: Features and Functions
        url: "/rest/doc#semantic-similarity-language-support"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /semantics/similar/supported-languages:
    get:
      tags:
        - semantics-similar
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /semantics/similar endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-11"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /sentences/supported-languages:
    get:
      tags:
        - sentences
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /sentences endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-8"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /sentiment/supported-languages:
    get:
      tags:
        - sentiment
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /sentiment endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-14"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /syntax/dependencies/supported-languages:
    get:
      tags:
        - syntax-dependencies
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /syntax/dependencies endpoint
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /tokens/supported-languages:
    get:
      tags:
        - tokens
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /tokens endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-7"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /topics/supported-languages:
    get:
      tags:
        - topics
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /topics endpoint
      externalDocs:
        description: Features and Functions
        url: "/rest/doc#topic-extraction-language-support"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /transliteration/supported-languages:
    get:
      tags:
        - transliteration
      summary: Supported languages
      description: Returns a list of Rosette supported languages for the /transliteration endpoint
      externalDocs:
        description: Features and Functions
        url: "https://docs.babelstreet.com/API/en/index-en.html#supported-languages-15"
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportedLanguageResponse'
  /info:
    get:
      tags:
        - info
      description: Returns general information about Rosette
      summary: Rosette information
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfoResponse'
  /ping:
    get:
      tags:
        - ping
      summary: Ping Rosette
      description: Pings Rosette for a response indicating the service is available.
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PingResponse'


components:
  parameters:
    identityId:
      name: identityId
      in: path
      description: Unique identifier for an identity
      required: true
      schema:
        type: string
      example: 123
  securitySchemes:
    RosetteAPI-Key:
      type: apiKey
      name: X-RosetteAPI-Key
      in: header
  schemas:
    FileRequest:
      type: object
      properties:
        content:
          type: string
          format: binary
          description: content to attach
        request:
          type: string
          format: binary
          description: json file of options (optional)
    ContentString:
      type: object
      properties:
        content:
          type: string
    ContentUri:
      type: object
      properties:
        contentUri:
          type: string
    DocumentRequest:
      allOf:
        - oneOf:
          - $ref: '#/components/schemas/ContentString'
          - $ref: '#/components/schemas/ContentUri'
        - properties:
            language:
              description: 3 letter code of language.
              type: string
    MentionOffsets:
      type: object
      properties:
        startOffset:
          type: integer
        endOffset:
          type: integer
    AddressSimilarityRequest:
      type: object
      properties:
        address1:
          $ref: '#/components/schemas/Address'
        address2:
          $ref: '#/components/schemas/Address'
    Address:
      oneOf:
        - $ref: '#/components/schemas/AddressFielded'
        - $ref: '#/components/schemas/AddressString'
    AddressString:
      type: object
      properties:
        address:
          type: string
          description: an address string
    AddressFielded:
      type: object
      properties:
        city:
          type: string
          description: the city, town, village, etc.
        cityDistrict:
          description: a borough or district within a city,
          type: string
        country:
          description: a sovereign nation or its dependent territory,
          type: string
        countryRegion:
          description: informal subdivision of a country,
          type: string
        entrance:
          description: numbered/lettered entrance,
          type: string
        house:
          description: venue or building name,
          type: string
        houseNumber:
          description: external building number,
          type: string
        island:
          description: a named island,
          type: string
        level:
          description: expression indicating a floor number,
          type: string
        poBox:
          description: post office box,
          type: string
        postCode:
          description: postal code,
          type: string
        road:
          description: street name,
          type: string
        staircase:
          description: numbered/lettered staircase,
          type: string
        state:
          description: a first-level administrative division,
          type: string
        stateDistrict:
          description: a second-level administrative division or county,
          type: string
        suburb:
          description: unofficial neighborhood name,
          type: string
        unit:
          description: a secondary unit designator,
          type: string
        worldRegion:
          description: West Indies, if appropriate,
          type: string
    AddressSimilarityResponse:
      type: object
      properties:
        score:
          type: number
          description: Similarity score of two addresses
    CategoriesRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/CategoriesOptions'
    CategoriesOptions:
      type: object
      properties:
        options:
          properties:
            scoreThreshold:
              type: number
              description: override the internal default threshold
            singleLabel:
              type: boolean
              description: return only a single category label per document
    CategoriesResponse:
      type: object
      properties:
        categories:
          type: array
          description: list of categories
          items:
            $ref: '#/components/schemas/CategoryLabel'
    CategoryLabel:
      type: object
      properties:
        label:
          type: string
          description: label for contextual category
        confidence:
          type: number
          description: confidence (0.0 - 1.0)
        score:
          type: number
          description: raw score (-INF - INF)
    EntitiesRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/EntitiesOptions'
    EntitiesOptions:
      type: object
      properties:
        options:
          properties:
            calculateConfidence:
              type: boolean
              description: return linking confidence score
            calculateSalience:
              type: boolean
              description: return salience score
            includeDBpediaTypes:
              type: boolean
              description: return the full ontological path of the type within the DPBedia hierarchy
              default: false
            includePermID:
              type: boolean
              description: return the id to PermID knowledge base
              default: false
            linkEntities:
              type: boolean
              description: link entities in the text to knowledge base(s); cloud default is true, enterprise default is false
            linkMentionMode:
              type: string
              description: optional link candidate generation mode - find entities in text or consider pre-existing (extracted by previous processors) entities
              default: text
              enum:
                - text
                - entities
            modelType:
              type: string
              description: NER model type to use; default is statistical. DNN is only valid for language codes ara, eng, and kor.
              enum:
                - statistical
                - DNN
            structuredRegionProcessingType:
              type: string
              description: set how structured text is processed
              enum:
                - none
                - nerModel
                - nameClassifier
            enableStructuredRegion:
              type: boolean
              description: enable the Apache Tika processor to extract lists and tables for contentUri (HTML) input
              default: false
            useIndocServer:
              type: boolean
              description: Enables indoc coreference.
              default: false
    EntitiesResponse:
      type: object
      properties:
        entitiesResponse:
          type: array
          description: list of extracted entities
          items:
            $ref: '#/components/schemas/Entity'

    Entity:
      type: object
      properties:
        type:
          type: string
          description: entity type
        mention:
          type: string
          description: mention text
        normalized:
          type: string
          description: normalized mention text
        count:
          type: integer
          description: mention count
        mentionOffsets:
          type: array
          description: list of offsets for all mentions
          items:
            $ref: '#/components/schemas/MentionOffsets'
        entityId:
          type: string
          description: entity id
        confidence:
          type: number
          description: confidence score  (0.0.-1.0)
        linkingConfidence:
          type: number
          description: linking confidence score (0.0.-1.0)
        DPediaTypes:
          type: array
          description: If includeDBPediaTypes option is true, this field contains a list of the full ontological path of the type(s) within the DBpedia hierarchy
          items:
            type: object
            properties:
              DPpediaType:
                type: string
        permId:
          type: string
          description: Thomeson Reuters Permanent Identifier
        salience:
          type: number
          description: salinece score (0.0 or 1.0), indicating whether the entity is important to the overall scope of the document
   
    EntityInfoResponse:
      type: object
      properties:
        languages:
          type: array
          items:
            type: object
            properties:
              language:
                type:
                  string
              processors:
                type: array
                items:
                  type: object
                  properties:
                    processor:
                      type:
                        string
                    subsources:
                      $ref: '#/components/schemas/Subsources'
    Subsources:
      type: array
      items:
        type: object
        properties:
          subsource:
            type:
              string
          entity_types:
            type: array
            description: List of supported entity types
            items:
              type: string

    EntityDynGaz:
      type: object
      properties:
        language:
          description: 3 letter code of language.
          type: string
        configuration:
          properties:
            profileId:
              description: optional custom profile id
              type: string
            entities:
              type: string
              description: List of gazetteer entries
    EventRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/EventOptions'
    EventOptions:
      type: object
      properties:
        options:
          properties:
            workspaceId:
              type: string
              description: The id of a single events workspace (model)
            plan:
              type: string
              description: A list of languages and workspaces. Allows multiple event models to be used in a single call
            negation:
              type: string
              description: Determines whether to evaluate the event for negation
              default: ignore
              enum:
                - ignore
                - both
                - only_positive
                - only_negative
            
    EventResponse:
      type: object
      properties:
        events:
          type: array
          description: list of extracted events
          items:
            $ref: '#/components/schemas/Event'
    Event:
      type: object
      properties:
        eventType:
          type: string
        mentions:
          type: array
          items:
            $ref: '#/components/schemas/RoleOffsets'
        confidence:
          type: number
          description: confidence score  (0.0.-1.0)
        workspaceId:
          type: string
          description: identifier of the event model that extracted the event
    RoleOffsets:
      type: object
      properties:
        startOffset:
          type: integer
        endOffset:
          type: integer
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Roles'
        polarity: 
          type: string
          description: whether the event happened or didn't happen 
        negationCues:
          type: array
          description: value of how negation cues should be extracted
          items:
            $ref: '#/components/schemas/NegationOffsets'
    NegationOffsets:
      type: object
      properties:
        startOffset:
          type: integer
        endOffset:
          type: integer
        dataSpan:
          type: string
          description: text value of the negation cues
    
    Roles:
      type: object
      properties:
        startOffset:
          type: integer
        endOffset:
          type: integer
        name:
          type: string
          description: name of the role type
        id:
          type: string
        dataSpan:
          type: string
          description: text of the role
        confidence:
          type: string
        extractorName:
          type: string
          description: name of the extractor used to extract the role
        roleType:
          type: string 
   
   
    EventInfoResponse:
      type: object
      properties:
        data:
          type: string
        identifier:
          type: array
          items:
            $ref: '#/components/schemas/Data'
    Data:
      type: object
      properties:
        version:
          type: string
        name:
          type: string
        import:
          type: array
          items:
            type: string
        extractors:
          type: array
          items:
            $ref: '#/components/schemas/Extractors'
        roleTypes:
          type: array
          items:
            $ref: '#/components/schemas/RoleTypes'
        eventTypes:
          type: array
          items:
            $ref: '#/components/schemas/EventTypes'
      
    Extractors:
      type: object
      properties:
        name:
          type: string
        kind:
          type: string
          enum: 
            - morphological
            - semantic
            - exact
            - entity
        useConditions:
          type: array
          items:
            type: string
        extractorItem:
          type: array
          items:
            $ref: '#/components/schemas/ExtractorItems'
            
    ExtractorItems:
      type: object
      properties:
        surface-form:  
          type: string
        lemmas:
          type: array
          items:
            type: string
        types:
          type: array 
          items:
            type: string 
        items: 
          type: array
          items:
            type: string
  
    RoleTypes:
      type: object
      properties:
        name:
          type: string
        extractors:
          type: array
          items: 
            type: string
    EventTypes:
      type: object
      properties:
        name:
          type: string
        keys:
          type: array
          items: 
            $ref: '#/components/schemas/Keys'
        roles:
          type: array
          items: 
            $ref: '#/components/schemas/RoleInfo'    
    Keys:
      type: object
      properties:
        name: 
          type: string
        roleType:
          type: string
    RoleInfo:
      type: object
      properties:
        name:
          type: string
        roleType:
          type: string
        required:
          type: boolean
       
       
       
    LanguageRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/LanguageOptions'

    LanguageOptions:
      type: object
      properties:
        options:
          properties:
            koreanDialects:
              type: boolean
              default: false
            multilingual:
              type: boolean
              default: false

    LanguageResponse:
      type: object
      properties:
        languageDetections:
          type: array
          description: List of detected languages
          items:
            $ref: '#/components/schemas/LanguageDetectionResult'

    MorphologyRequest:
        allOf:
          - $ref: '#/components/schemas/DocumentRequest'
          - $ref: '#/components/schemas/MorphologyOptions'

    MorphologyOptions:
      type: object
      properties:
        options:
          properties:
            modelType:
              type: string
              description: Model type to use for Chinese, Japanese, Korean, or Thai. For Korean input without spaces, use `DNN`. For Chinese, Japanese, and Thai, use `perceptron` for an alternative algorithm
              enum:
                - default
                - perceptron
                - DNN
            disambiguatorType:
              type: string
              description: For Hebrew only, determines disambiguator used. Default is `perceptron`. `DNN` is a deep nueral network model.
              enum:
                - perceptron
                - DNN
                - dictionary
    MorphologyResponse:
      type: object
      properties:
        compounds:
          description: list of compounds
          type: array
          items:
            type: array
            items:
              type: string
        hanReadings:
          description: list of Han Readings
          type: array
          items:
            type: array
            items:
              type: string
        lemmas:
          description: list of lemmas
          type: array
          items:
            type: string
        posTags:
          description: list of part of speech tags
          type: array
          items:
            type: string

    NameDeduplicationRequest :
      allOf:
        - $ref: '#/components/schemas/Name'
        - type: object
          properties:
            threshold:
              type: number

    EntityType:
      type: string
      description: the entity type of the object
      enum:
        - PERSON
        - LOCATION
        - ORGANIZATION
    Language:
      type: string
      description: ISO 639-3 code for the name's language
    Script:
      type: string
      description: ISSO 15924 code for the name's script
    Text:
      type: string
      description: a name to be matched
    Name:
      type: object
      properties:
        entityType:
          $ref: '#/components/schemas/EntityType'
        language:
          $ref: '#/components/schemas/Language'
        script:
          $ref: '#/components/schemas/Script'
        text:
          $ref: '#/components/schemas/Text'

    NameDeduplicationResponse:
      type: object
      properties:
        results:
          type: array
          description: list of cluster IDs
          items:
            type: string
            
    NameSimilarityRequest:
      type: object
      properties:
        name1:
          $ref: '#/components/schemas/Name'
        name2:
          $ref: '#/components/schemas/Name'
    NameSimilarityResponse:
      type: object
      properties:
        score:
          type: number
          description: a name matcher result
   
    RecordRequest:
      type: object
      properties:
        fields:
          $ref: '#/components/schemas/Fields'
        properties:
          $ref: '#/components/schemas/Properties'
        records:
          $ref: '#/components/schemas/Records'
            
    Fields:
      type: object
      properties:
        fieldname:
          type: object
          properties:
            type:
              type: string
              enum:
                - rni_name                
                - rni_address              
                - rni-date
            weight:
              type: number
              description: value indicating weighting 
    Properties:
      type: object
      properties:
        threshold:
          type: number
          description: results must be greater than threshold to be returned
        includeExplainInfo:
          type: boolean
          description: true returns the full details of how the records matched
    Records:
      type: object
      properties:
        left:
          type: array
          items:
            $ref: '#/components/schemas/FieldRecords'
        right:
          type: array
          items:
            $ref: '#/components/schemas/FieldRecords'  
    FieldRecords:
      type: array
      items: 
        $ref: '#/components/schemas/FieldProperties'
    FieldProperties:
      type: object
      properties:
        namefieldname:
          type: array
          items:
            $ref: '#/components/schemas/NameProperties'
        datefieldname:
          type: array
          items:
            $ref: '#/components/schemas/DateProperties'
        addressfieldname:
          type: array
          items:
            $ref: '#/components/schemas/AddressProperties'
    NameProperties:
      properties:
        text:
          type: string
        language:
          type: string
        entityType:
          $ref: '#/components/schemas/EntityType'
        languageOfOrigin:
          $ref: '#/components/schemas/Language'   
        script:
          $ref: '#/components/schemas/Script'
    DateProperties:
      properties:
        date:
          type: string
    AddressProperties:
      properties:
        address:
          type: string

          
    RecordResponse:
      type: object
      properties: 
        fields:
          $ref: '#/components/schemas/Fields'
        results:
          type: array
          items:
            $ref: '#/components/schemas/Results'
    
    Results:
      type: object
      properties:
        score:
          type: number
        left:
          $ref: '#/components/schemas/RecordResponseFields'
        right:                
          $ref: '#/components/schemas/RecordResponseFields'          
        explainIfo:
          $ref: '#/components/schemas/ExplainInfo'
        leftOnlyFields:
          type: array
          items: 
            type: string          
        rightOnlyFields:
          type: array
          items:
            type: string
          
    RecordResponseFields:
      anyOf:
        - $ref: '#/components/schemas/Names'
        - $ref: '#/components/schemas/Dates'
        - $ref: '#/components/schemas/AddressResp'
    
    Names:
      type: object
      properties:
        fieldname: 
          type: object
          properties:
            text: 
              type: string
    Dates:
      type: object
      properties:
        fieldname: 
          type: object
          properties:
            date: 
              type: string
    AddressResp:
      type: object
      properties:
        fieldname: 
          type: object
          properties:
            address: 
              type: string
  
  
    ExplainInfo:
      anyOf:
        - $ref: '#/components/schemas/ScoredFieldsName'
        - $ref: '#/components/schemas/ScoredFieldsAddress'
        - $ref: '#/components/schemas/ScoredFieldsDate'
      
    ScoredFieldsName:
      type: object
      properties:
        fieldname:
          type: object
          properties:
            weight: 
              type: number
            calculatedWeight:
              type: number
            rawScore:
              type: number
            finalScore:
              type: number
            details:
              type: object
              properties:
                leftInput:
                  $ref: '#/components/schemas/NameDetails'
                rightInput:
                  $ref: '#/components/schemas/NameDetails'
                scoreTuples:
                  type: array
                  items:
                    $ref: '#/components/schemas/ScoreTuples'
                scoreAdjustments:
                    $ref: '#/components/schemas/ScoreAdjustments'
                finalScore: 
                  type: number
                defaultInput:
                  type: object
                  properties:
                    empty:
                      type: string
                empty:
                  type: boolean
    
    ScoredFieldsAddress:
      type: object
      properties:
        fieldname:
          type: object
          properties:
            weight: 
              type: number
            calculatedWeight:
              type: number
            rawScore:
              type: number
            finalScore:
              type: number
            details:
              type: object
              properties:
                leftInput:
                  $ref: '#/components/schemas/AddressDetails'
                rightInput:
                  $ref: '#/components/schemas/AddressDetails'
                scoreTuples:
                  type: array
                  items:
                    $ref: '#/components/schemas/ScoreTuplesAddress'
                scoreAdjustments:
                    $ref: '#/components/schemas/ScoreAdjustments'
                finalScore: 
                  type: number
                fieldScores:
                  type: array
                  items:
                    $ref: '#/components/schemas/FieldScores'
                empty:
                  type: boolean
                defaultInput:
                  type: object
                  properties: 
                    empty:
                      type: boolean

    FieldScores:
      type: object
      properties:
        leftField:
          type: string
        rightField:
          type: string
        score:
          type: number
        marked:
          type: boolean

    ScoredFieldsDate:
      type: object
      properties:
        fieldname:
          type: object
          properties:
            weight: 
              type: number
            calculatedWeight:
              type: number
            rawScore:
              type: number
            finalScore:
              type: number
            details:
              type: object
              properties:
                leftInput:
                  $ref: '#/components/schemas/DateDetails'
                rightInput:
                  $ref: '#/components/schemas/DateDetails'
                scoreTuples:
                  type: array
                  items:
                    $ref: '#/components/schemas/ScoreTuplesDate'
                scoreAdjustments:
                    $ref: '#/components/schemas/ScoreAdjustments'
                finalScore: 
                  type: number
                scores:
                  type: array
                  items:
                    $ref: '#/components/schemas/ScoreTuples'
                defaultInput:
                  type: object
                  properties:
                    empty:
                      type: boolean
                empty:
                  type: boolean
      
        
    NameDetails:
      type: object
      properties:
        data:
          type: string
        normalizedData:
          type: string
        latnData:
          type: string
        script:
          type: string
        languageOfUse:
          type: string
        languageOfOrigin:
          type: string
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/Tokens'
        entityType:
          type: string
        empty:
          type: boolean
    Tokens:
      type: object
      properties:
        token:
          type: string
        latnTokn: 
          type: string
        tokenWeight:
          type: number
        bin:
          type: number
        biasedBin:
          type: number
        tokenType:
          type: string
    DateDetails:
      type: object
      properties:
        originalString: 
          type: string
        day:
          type: number
        month:
          type: number
        yearWithoutCentury: 
          type: number
        century:
          type: number
        modifiedJulianDay: 
          type: number
        canonicalForm:
          type: string
        empty: 
          type: boolean
    AddressDetails:
      type: object
      properties:
        fieldInputInfos:
          type: array
          items:
            $ref: '#/components/schemas/FieldInputInfo'
        empty:
          type: boolean
            
            
    FieldInputInfo:
      type: object
      properties:
        data:
          type: string
        normalizedData:
          type: string
        latnData: 
          type: string
        script:
          type: string
        languageOfUse:
          type: string
        languageOfOrigin:
          type: string
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/AddTokens'
        addressField:
          type: string
        empty:
          type: boolean
            
    AddTokens:
      type: object
      properties:
        token:
          type: string
        latnToken: 
          type: string
        tokenWeight:
          type: number
      
    ScoreTuplesDate:
      type: object
      properties:
        scoreinIsolation:
          type: number
        scoreInContest:
          type: number
        left:
          type: string
        right:
          type: string
        marked:
          type: boolean
        weight:
          type: number
        component:
          type: string
          
    ScoreTuples:
      type: object
      properties:
        scoreinIsolation:
          type: number
        scoreInContext:
          type: number
        left:
          type: string
        right:
          type: string
        marked:
          type: boolean
        reason:
          type: string
        leftMinTokenIndex:
          type: number
        leftMaxTokenIndex:
          type: number
        rightMinTokenIndex:
          type: number
        rightMaxTokenIndex:
          type: number
    ScoreTuplesAddress:
      type: object
      properties:
        scoreinIsolation:
          type: number
        scoreInContext:
          type: number
        left:
          type: string
        right:
          type: string
        marked:
          type: boolean
        reason:
          type: string
        leftMinTokenIndex:
          type: number
        leftMaxTokenIndex:
          type: number
        rightMinTokenIndex:
          type: number
        rightMaxTokenIndex:
          type: number
        leftField: 
          type: string
        rightField:
          type: string
        
    ScoreAdjustments:
      type: object
      properties:
        unbiasedScore: 
          type: number
        score: 
          type: number
        parameter:
          type: string
                      
      
    NameTranslationRequest:
      type: object
      properties:
        entityType:
          $ref: '#/components/schemas/EntityType'
        sourceLanguageOfOrigin:
          $ref: '#/components/schemas/Language'
        sourceLanguageOfUse:
          $ref: '#/components/schemas/Language'
        sourceScript:
          $ref: '#/components/schemas/Script'
        targetLanguage:
          $ref: '#/components/schemas/Language'
        targetScheme:
          type: string
          description: transliteration schme for the translation
        targetScript:
          $ref: '#/components/schemas/Script'
        maximumResults:
          type: number
    NameTranslationResponse:
      type: object
      properties:
        sourceScript:
          $ref: '#/components/schemas/Script'
        sourceLanguageOfUse:
          $ref: '#/components/schemas/Language'
        targetLanguage:
          $ref: '#/components/schemas/Language'
        targetScript:
         $ref: '#/components/schemas/Script'  
        targetScheme:
          type: string
          description: transliteration scheme for the translation
        translation:
          type: string
          description: the translation
        confidence:
          type: number
          description: The confidence of the translation
        translations:
          type: array
          items:
            $ref: '#/components/schemas/Translations'
    Translations:
      type: object
      properties:
        translation:
          type: string
          description: the translation
        confidence:
          type: number
          description: The confidence of the translation 

    RelationshipResponse:
      type: object
      properties:
        arg1:
          type: string
          description: relationship arg1
        arg1id:
          type: string
          description: relationship arg1 id
        arg2:
          type: string
          description: relationship arg2
        arg2id:
          type: string
          description: relationship arg2 id
        confidence:
          type: number
          description: a measure of the quality of relationship extraction
        predicate:
          type: string
          description: relationship type or predicate

    EmbeddingsMode:
      type: string
      description: >
        the generation of semantic embeddings to use for all languages; defaults to second generation unless the
        language only supports first generation embeddings
      enum:
        - DEFAULT
        - GEN_1
        - GEN_2
    SemanticsSimilarRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/SimilarTermsOptions'
    SimilarTermsOptions:
      type: object
      properties:
        options:
          properties:
            count:
              type: integer
              description: how many to return per language
            embeddingsMode:
              $ref: '#/components/schemas/EmbeddingsMode'
            resultLanguages:
              type: array
              description: languages to return similar terms in
              items:
                $ref: '#/components/schemas/LanguageCode'

    LanguageCode:
      type: object
      properties:
        languageCode:
          type: string
          description: 3 digit language code

    SimilarTermsResponse:
      type: object
      properties:
        similarTerms:
          description: similar terms per language
          type: object
          properties:
            language:
              type: string
            similarTerms:
              type: array
              items:
                type: object
                properties:
                  term:
                    type: string
                  similarity:
                    type: number

    SemanticVectorsRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/SemanticVectorsOptions'
    SemanticVectorsOptions:
      type: object
      properties:
        options:
          properties:
            embeddingsMode:
              $ref: '#/components/schemas/EmbeddingsMode'
            pertoken:
              type: boolean
              description: whether to return per-token embeddings
    SemanticVectorsResponse:
      type: object
      properties:
        documentEmbedding:
          type: array
          description: document embeddings
          items:
            type: number
        tokenEmbeddings:
          type: array
          description: per-token embeddings
          items:
            type: number
        tokens:
          type: array
          description: extracted tokens
          items:
            type: string


    SentencesResponse:
      type: object
      properties:
        sentences:
          description: list of sentences
          type: array
          items:
            type: string

    SentimentRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/SentimentOptions'
    SentimentOptions:
      type: object
      properties:
        options:
          properties:
            modelType:
              type: string
              enum:
                - DNN
              description: use deep neural network sentment model for English only (DNN)
    SentimentResponse:
      type: object
      properties:
        document:
          $ref: '#/components/schemas/Label'
        entities:
          type: array
          items:
            $ref: '#/components/schemas/Entity'
    Label:
      type: object
      properties:
        confidence:
          type: number
          description: confidence (0.0 -1.0)
        label:
          type: string
          description: label for contextual category

    SyntaxDependenciesResponse:
      type: object
      properties:
        sentence:
          type: array
          description: list of sentences with dependencies
          items:
            $ref: '#/components/schemas/Sentences'
        tokens:
          type: array
          description: tokens
          items:
            type: string
    Sentences:
      type: object
      properties:
        dependencies:
          type: array
          description: list of dependencies
          items:
            $ref: '#/components/schemas/Dependency'
        endTokenIndex:
          type: integer
          description: Token endTokenIndex
        startTokenIndex:
          type: integer
          description: Token startTokenIndex
    Dependency:
      type: object
      properties:
        dependencyType:
          type: string
          description: dependencyType
        dependentTokenIndex:
          type: number
        governorTokenIndex:
          type: number

    TokensRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/MorphologyOptions'
    TokensResponse:
      type: object
      properties:
        tokens:
          type: array
          description: list of tokens
          items:
            type: string

    TopicsRequest:
      allOf:
        - $ref: '#/components/schemas/DocumentRequest'
        - $ref: '#/components/schemas/TopicsOptions'
    TopicsOptions:
      type: object
      properties:
        options:
          properties:
            conceptSalienceThreshold:
              type: number
              description: Topics are only returned if the concept salience is greater than the threshold. Threshold must be between 0 and 1.
            keySalienceThreshold:
              type: number
              description: Topics are only returned if the keyphrase salience is greater than the threshold. Threshold must be between 0 and 1.
    TopicsResponse:
      type: object
      properties:
        concepts:
          type: array
          description: list of concepts
          items:
            $ref: '#/components/schemas/Concept'
        keyphrase:
          type: array
          description: list of keyphrases
          items:
            $ref: '#/components/schemas/Keyphrase'
    Concept:
      type: object
      properties:
        conceptId:
          type: string
        phrase:
          type: string
        salience:
          type: number
    Keyphrase:
      type: object
      properties:
        phrase:
          type: string
        salience:
          type: number

    TransliterationRequest:
      allOf:
          - $ref: '#/components/schemas/DocumentRequest'
          - $ref: '#/components/schemas/TransliterationOptions'
    TransliterationOptions:
      type: object
      properties:
        options:
          properties:
            reversed:
              type: boolean
              description: transliterate from native Arabic script to Arabizi
    TransliterationResponse:
      type: object
      properties:
        transliteration:
          type: string
          description: transliteration

    LanguageDetectionResult:
      type: object
      properties:
        language:
          type: string
          description: detected langguage
        confidence:
          type: number
          description: detection confidence

    SupportedLanguageResponse:
      type: object
      properties:
        supportedLanguages:
          type: array
          description: List of supported languages
          items:
            $ref: '#/components/schemas/SupportedLanguage'
    SupportedLanguage:
      type: object
      properties:
        language:
          type: string
          description: language code
        script:
          type: string
          description: script code
        licensed:
          type: boolean
          description: true if user is licensed for the language
    SupportedLanguagePairsResponse:
      type: object
      properties:
        supportedLanguagePairs:
          type: array
          description: list of supported language pairs
          items:
            $ref: '#/components/schemas/SupportedLanguagePair'
    SupportedLanguagePair:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/TextDomain'
        target:
          $ref: '#/components/schemas/TextDomain'
        licensed:
          type: boolean
          description: true if user is licensed for the language
    TextDomain:
      type: object
      properties:
        transliterationScheme:
          type: string
        script:
          type: string
          description: script code
        language:
          type: string
          description: language code
    InfoResponse:
      type: object
      properties:
        buildNumber:
          type: string
        buildTime:
          type: string
        name:
          type: string
        version:
          type: string

    PingResponse:
      type: object
      properties:
        message:
          type: string
        time:
          type: integer




security:
  - RosetteAPI-Key: []