Text Classification

FREEMIUM
By MeaningCloud
Updated 3 months ago
Social
4.2/10
Popularity Score
486ms
Latency
100%
Success Rate

Text Classification API Documentation

Automatic multilingual text classification according to pre-established categories defined in a model. The algorithm used combines statistic classification with rule-based filtering, which allows to obtain a high degree of precision for very different environments. Three models available: IPTC (International Press Telecommunications Council standard), EuroVocs and Corporate Reputation model. Languages covered are Spanish, English, French, Italian, Portuguese and Catalan.

View API Details
GETclass-1.1
GETclass-1.1

Automatic classification of multilingual texts

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
AcceptSTRING
CONSTANT
Required Parameters
modelSTRING
REQUIREDClassification model to use. It will define into which categories the text may be classified. Possilbe values are: IPTC_es, IPTC_en, IPTC_ca, IPTC_pt, IPTC_it, IPTC_fr, EUROVOC_es_ca, BusinessRep_es, BusinessRepShort_es
AcceptSTRING
REQUIRED - CONSTANT
Optional Parameters
urlSTRING
OPTIONALURL with the content to classify. Currently only non-authenticated HTTP and FTP are supported. The content types supported for URL contents can be found at https://textalytics.com/core/supported-formats. (Required if 'txt' and 'doc' are empty)
ofSTRING
OPTIONALOutput formatl, xml or json
titleSTRING
OPTIONALDescriptive title of the content. It is an optional field, and it can be plain text, HTML or XML, always using UTF-8 encoding. The terms relevant for the classification process found in the title will have more influence in the classification than if they were in the text.
txtSTRING
OPTIONALInput text. It can be plain text, HTML or XML, always using UTF-8 encoding. (Required if 'doc' and 'url' are empty)
verboseSTRING
OPTIONALVerbose mode. Shows additional information about the classification.
categoriesSTRING
OPTIONALList of prefixes of the code of the categories to which the classification is limited. Each value will be separated by '|'. All the categories that do not start with any of the prefixes specified in the list will not be taken account in the classification. For example, if only a clasification within the human interest category, the prefix used would be 0800.
Code Snippet
unirest.get("https://text-classification.p.rapidapi.com/class-1.1.php?of=json&txt=The+85th+Academy+Awards+ceremony+took+place+February+24%2C+2013.&verbose=n&categories=0800&model=IPTC_en")
.header("X-RapidAPI-Host", "text-classification.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Accept", "application/json")
.header("Accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://text-classification.p.rapidapi.com/class-1.1.php
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://text-classification.p.rapidapi.com/class-1.1.php?of=json&txt=The+85th+Academy+Awards+ceremony+took+place+February+24%2C+2013.&verbose=n&categories=0800&model=IPTC_en")
.header("X-RapidAPI-Host", "text-classification.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Accept", "application/json")
.header("Accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication