These are the methods that actually perform analysis and transformation of input text.
Analyze text
The method analyzes the input and detects problematic content, sentiment snippets, entities, topics, phrase structure, parts of speech, stopwords, and more.
Headers
Content-TypeAnalyze text › Responses
Successful response
textInput text.
languageLanguage code, when the language identification is used.
The state after the analysis. Can be used to set the state of the future analyses. (Set state to true to show.)
List available languages
Retrieve a list of supported languages.
The response includes the following attributes:
id- Language ID.name- Native name.englishName- English name.nativeEncoding- Encoding of the language.preferredFont- Recommended font for display.latin- Whether the language uses Latin script.rightToLeft- Whether the language uses right-to-left script (e.g., Arabic, Hebrew, Persian).
Headers
Content-TypeList available languages › Responses
Successful response
isoCodenameenglishNamenativeEncodingfontFacelatinrightToLeftText clean-up
A service method to remove JavaScript, CSS tags, JSON, and other markup, returning pure decoded text. The request body includes the markup content from which text will be extracted.
Note: This method does not process binary content.
Headers
Content-TypeText clean-up › Responses
Successful response
Named entity comparison
Compares two compound named entities and identifies differences. The request body should include:
language1(string) - IETF tag for the first entity's language.entity1(string) - The first entity.language2(string) - IETF tag for the second entity's language.entity2(string) - The second entity.type(string) - The entity type (currently only person is supported).
More information: Named Entities in the Tisane API Response Guide The response contains:
-
result(string) - Comparison result:no_single_entity- One or both entities are invalid.same- Entities are identical (name order might differ).different- Entities differ, with details indifferences.
-
differences(array of strings) - Lists detected differences:given_namesurnametitle(e.g., Mr., Mrs.)social_role(e.g., academic degrees)suffixvariation(e.g., spelling or style differences)
Headers
Content-TypeNamed entity comparison › Responses
Successful response
Semantic similarity
Calculate the semantic similarity between two text fragments, either in the same language or in different languages.
The request body should contain:
content1(string) - The first text fragment.language1(string) - The IETF language code forcontent1.content2(string) - The second text fragment to compare.language2(string) - The IETF language code forcontent2.settings(object) - Additional settings as per specifications. More information: Tisane API Configuration And Customization Guide.
The response is a number between 0 and 1, representing the similarity of the submitted text fragments.
Headers
Content-TypeSemantic similarity › Responses
Successful response
Detect language
Detects the languages used in the provided text fragment and returns the breakdown by offsets.
The request body should include:
content(string) - the text fragment to analyze.languages(string, optional) - a vertical bar-delimited list of language codes to use as cues.delimiter(string, optional) - a regular expression for segmenting the fragment; by default, the fragment is not segmented. The response is a JSON structure containinglanguages, which provides a breakdown of language codes.
Headers
Content-TypeDetect language › Request Body
contentThe text fragment to analyze.
languagesA vertical bar-delimited list of language codes to use as cues.
delimiterA regular expression for segmenting the fragment; by default, the fragment is not segmented
Detect language › Responses
Successful response
Translate text
This method translates the input text. The request body should include the following elements:
from(string) - A standard IETF tag for the source language. Use*or a vertical bar-delimited set of language codes to invoke autodetect.to(string) - A standard IETF tag for the target language. If the source and target languages are the same, paraphrasing will be applied.content(string) - The text content to translate.settings(object) - Additional translation settings.
More information: Tisane API Configuration And Customization Guide
The response is the transformed text.
Headers
Content-TypeTranslate text › Responses
Successful translation response