POST
/
v2
/
translate
Translate a segment
curl --request POST \
  --url https://api.lilt.com/v2/translate \
  --header 'Content-Type: application/json' \
  --data '{
  "source": "<string>",
  "memory_id": 123,
  "source_hash": 123,
  "n": 123,
  "prefix": "<string>",
  "rich": false,
  "tm_matches": true,
  "project_tags": false,
  "containsICUData": false
}'
{
  "untokenizedSource": "Authentication not required.",
  "tokenizedSource": "Authentication not required .",
  "sourceDelimiters": [
    "",
    " ",
    " ",
    "",
    ""
  ],
  "translation": [
    [
      {
        "score": 3.4936864e-8,
        "align": "0-0 1-1 2-2 3-3",
        "targetDelimiters": [
          "",
          " ",
          " ",
          "",
          ""
        ],
        "targetWords": [
          "Authentifizierung",
          "nicht",
          "erforderlich",
          "."
        ],
        "target": "Authentifizierung nicht erforderlich .",
        "targetWithTags": "Authentifizierung nicht erforderlich.",
        "isTMMatch": false,
        "provenance": "0 0 0 0"
      }
    ]
  ]
}

Authorizations

key
string
query
required

Body

application/json
memory_id
integer
required

A unique Memory identifier.

source
string

A unique Segment identifier.

source_hash
integer

A source hash code.

n
integer

Return top n translations (deprecated).

prefix
string

A target prefix

rich
boolean
default:false

Returns rich translation information (e.g., with word alignments).

tm_matches
boolean
default:true

Include translation memory fuzzy matches.

project_tags
boolean
default:false

Project tags. Projects tags in source to target if set to true.

containsICUData
boolean
default:false

Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained.

Response

A TranslationList object.

An ranked list of translations and associated metadata.

untokenizedSource
string

The untokenized source segment. Punctuation has not been separated from words.

Example:

"Authentication not required."

tokenizedSource
string

The tokenized source segment. Punctuation has been separated from words.

Example:

"Authentication not required ."

sourceDelimiters
string[]

A format string that indicates, for each word, if the word should be preceded by a space.

Example:
["", " ", " ", "", ""]
translation
object[]

A list of Translation objects.