openapi: 3.0.0
servers:
  - url: http://api.datumbox.com/
info:
  description: Datumbox offers a Machine Learning platform composed of 14 classifiers and Natural Language processing functions. Functions include sentiment analysis, topic classification, readability assessment, language detection, and much more.
  title: api.datumbox.com
  version: "1.0"
  x-apisguru-categories:
    - machine_learning
    - text
  x-logo:
    url: http://www.datumbox.com/img/logo.png
  x-origin:
    - converter:
        url: https://github.com/lucybot/api-spec-converter
        version: 2.7.31
      format: swagger
      url: http://www.datumbox.com/api-sandbox/api-docs
      version: "1.2"
  x-providerName: datumbox.com
tags:
  - description: Document Classification Functions
    name: Document-Classification
  - description: Information Retrieval Functions
    name: Information-Retrieval
  - description: Metrics
    name: Metrics
paths:
  /1.0/AdultContentDetection.json:
    post:
      deprecated: false
      description: The Adult Content Detection function classifies the documents as adult or noadult based on their context. It can be used to detect whether a document contains content unsuitable for minors.
      operationId: AdultContentDetection
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Classifies the Document as adult or noadult
      tags:
        - Document-Classification
  /1.0/CommercialDetection.json:
    post:
      deprecated: false
      description: The Commercial Detection function labels the documents as commercial or non-commercial based on their keywords and expressions. It can be used to detect whether a website is commercial or not.
      operationId: CommercialDetection
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Classifies the Document as commercial or nocommercial
      tags:
        - Document-Classification
  /1.0/DocumentSimilarity.json:
    post:
      deprecated: false
      description: The Document Similarity function estimates the degree of similarity between two documents. It can be used to detect duplicate webpages or detect plagiarism.
      operationId: DocumentSimilarity
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                api_key:
                  description: Your API Key
                  type: string
                copy:
                  description: The second text. It should not contain HTML tags.
                  type: string
                original:
                  description: The first text. It should not contain HTML tags.
                  type: string
              required:
                - api_key
              type: object
      responses:
        "200":
          description: No response was specified
      summary: Estimates the similarity between 2 Documents
      tags:
        - Metrics
  /1.0/EducationalDetection.json:
    post:
      deprecated: false
      description: The Educational Detection function classifies the documents as educational or non-educational based on their context. It can be used to detect whether a website is educational or not.
      operationId: EducationalDetection
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Classifies the Document as educational or noeducational
      tags:
        - Document-Classification
  /1.0/GenderDetection.json:
    post:
      deprecated: false
      description: The Gender Detection function identifies if a particular document is written-by or targets-to a man or a woman based on the context, the words and the idioms found in the text.
      operationId: GenderDetection
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Gender Detection Service
      tags:
        - Document-Classification
  /1.0/KeywordExtraction.json:
    post:
      deprecated: false
      description: The Keyword Extraction function enables you to extract from an arbitrary document all the keywords and word-combinations along with their occurrences in the text.
      operationId: KeywordExtraction
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                api_key:
                  description: Your API Key
                  type: string
                n:
                  description: The number of keyword combinations (n-grams) that you wish to extract.
                  maximum: 5
                  minimum: 1
                  type: integer
                text:
                  description: The text that you want to analyze. It should not contain HTML tags.
                  type: string
              required:
                - api_key
              type: object
      responses:
        "200":
          description: No response was specified
      summary: Extracts the Keywords of the Document
      tags:
        - Information-Retrieval
  /1.0/LanguageDetection.json:
    post:
      deprecated: false
      description: The Language Detection function identifies the natural language of the given document based on its words and context. This classifier is able to detect 96 different languages.
      operationId: LanguageDetection
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Identifies the Language of the Document
      tags:
        - Document-Classification
  /1.0/ReadabilityAssessment.json:
    post:
      deprecated: false
      description: The Readability Assessment function determines the degree of readability of a document based on its terms and idioms. The texts are classified as basic, intermediate and advanced depending their difficulty.
      operationId: ReadabilityAssessment
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Evaluates the Readability of the Document
      tags:
        - Document-Classification
  /1.0/SentimentAnalysis.json:
    post:
      deprecated: false
      description: The Sentiment Analysis function classifies documents as positive, negative or neutral (lack of sentiment) depending on whether they express a positive, negative or neutral opinion.
      operationId: SentimentAnalysis
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Identifies the Sentiment of the Document
      tags:
        - Document-Classification
  /1.0/SpamDetection.json:
    post:
      deprecated: false
      description: The Spam Detection function labels documents as spam or nospam by taking into account their context. It can be used to filter out spam emails and comments.
      operationId: SpamDetection
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Classifies the Document as spam or nospam
      tags:
        - Document-Classification
  /1.0/SubjectivityAnalysis.json:
    post:
      deprecated: false
      description: The Subjectivity Analysis function categorizes documents as subjective or objective based on their writing style. Texts that express personal opinions are labeled as subjective and the others as objective.
      operationId: SubjectivityAnalysis
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Classifies Document as Subjective or Objective
      tags:
        - Document-Classification
  /1.0/TextExtraction.json:
    post:
      deprecated: false
      description: The Text Extraction function enables you to extract the important information from a given webpage. Extracting the clear text of the documents is an important step before any other analysis.
      operationId: TextExtraction
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                api_key:
                  description: Your API Key
                  type: string
                text:
                  description: The HTML source of the webpage.
                  type: string
              required:
                - api_key
              type: object
      responses:
        "200":
          description: No response was specified
      summary: Extracts the clear text from Webpage
      tags:
        - Information-Retrieval
  /1.0/TopicClassification.json:
    post:
      deprecated: false
      description: The Topic Classification function assigns documents in 12 thematic categories based on their keywords, idioms and jargon. It can be used to identify the topic of the texts.
      operationId: TopicClassification
      requestBody:
        $ref: "#/components/requestBodies/SentimentAnalysis"
      responses:
        "200":
          description: No response was specified
      summary: Identifies the Topic of the Document
      tags:
        - Document-Classification
  /1.0/TwitterSentimentAnalysis.json:
    post:
      deprecated: false
      description: The Twitter Sentiment Analysis function allows you to perform Sentiment Analysis on Twitter. It classifies the tweets as positive, negative or neutral depending on their context.
      operationId: TwitterSentimentAnalysis
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                api_key:
                  description: Your API Key
                  type: string
                text:
                  description: The text of the tweet that we evaluate.
                  type: string
              required:
                - api_key
              type: object
      responses:
        "200":
          description: No response was specified
      summary: Identifies the Sentiment of Twitter Messages
      tags:
        - Document-Classification
components:
  requestBodies:
    SentimentAnalysis:
      content:
        application/x-www-form-urlencoded:
          schema:
            properties:
              api_key:
                description: Your API Key
                type: string
              text:
                description: The text that you want to analyze. It should not contain HTML tags.
                type: string
            required:
              - api_key
            type: object
