lilt-python

API bindings for the Lilt REST API.

View the Project on GitHub lilt/lilt-python

Translation

A machine translation (MT) or a translation memory (TM) match of a source segment.

Properties

Name Type Description Notes
target str The target string. [optional]
target_with_tags str The target string with source tags projected into the target. [optional]
align str \"MT only: A whitespace delimited list of source-target alignment indices.\" [optional]
provenance str Positive values indicate that the word is from the Memory, with contiguous identical entries (e.g., 2 2) indicating phrase matches. Negative contiguous values indicate entries from the Lexicon. 0 indicates a word from the background data. [optional]
score float The score of the translation. [optional]
is_tm_match bool TM only: If true, indicates an exact translation memory match. [optional]
target_delimiters List[str] A format string that indicates, for each word, if the word should be preceded by a space. [optional]
target_words List[str] The target string can be constructed by suffixing each `targetDelimiters` entry with its corresponding word in `targetWords` and concatenating the constructed array. Please note that the `targetDelimiters` array has one more entry than `targetWords` array which is why the last entry in the array will be the last value of `targetDelimiters`. [optional]

Example

from lilt.models.translation import Translation

# TODO update the JSON string below
json = "{}"
# create an instance of Translation from a JSON string
translation_instance = Translation.from_json(json)
# print the JSON string representation of the object
print(Translation.to_json())

# convert the object into a dict
translation_dict = translation_instance.to_dict()
# create an instance of Translation from a dict
translation_from_dict = Translation.from_dict(translation_dict)

[Back to Model list] [Back to API list] [Back to README]