Skip to content

Detect language

Request

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 containing languages, which provides a breakdown of language codes.
Security
Tisane-API-Key
Headers
Content-Typestring
Example:application/json
Bodyapplication/jsonrequired
contentstring

The text fragment to analyze.

languagesstring

A vertical bar-delimited list of language codes to use as cues.

delimiterstring

A regular expression for segmenting the fragment; by default, the fragment is not segmented

POST
/detectLanguage
curl -i -X POST \
  https://api.tisane.ai/detectLanguage \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_API_KEY_HERE' \
  -d '{
    "content": "c'\''est la vie"
  }'

Responses

Successful response

Bodyapplication/json
object
Response
{ "languages": [ {} ] }