Translation API
Translation is a REST API that quickly translates English content into Indic languages, supporting single or multiple sentences.
Headers
The format of the data to be posted: “application/json”
A unique key/token provided by Reverie to identify the user using the Translation API.
The unique account ID to identify the user and the default account settings.
The parameter to identify the API : “localization”
The version refers to the specific iteration of the API that is being called. : “2.0/3.0” Note: The default version is “2.0”.
The language of the input text Codes: hi, en, as, bn, gu, kn, kok, ml, mr, mai, or, pa, ta, te, ne, ur
Language to which you want to localize the input text Codes: hi, en, as, bn, gu, kn, kok, ml, mr, mai, or, pa, ta, te, ne, ur
Domain for APPVERSION 2.0: 0, 1, 2, 3, 4, 5, 6, 7, 8 Domain for APPVERSION 3.0: generic, government, travel, ecommerce, infotainment, bfsi, food, education, medical
Body
List of input text for Translation.
Specify whether the content Translation process should use NMT technology or not.
- For Example, When the enableNmt value is true, the system will initially refer to the Lookup database to localize content. If the content is not available in the database, then the NMT is used for translation.
- Note - By default, the
enableNmt
=true
Specify whether the content Translation process should use transliteration technology or not.
- For Example, When the enableTransliteration value is true, the system will initially refer to the Lookup database to localize content. If the content is not available in the database, then nmt is used for translation. If nmt fails, transliteration is called.
- Note - By default, the
enableTransliteration
=true
The parameter will specify whether the application should refer to the Lookup DB or not.
- For Example, when the enableLookup is true, the system will initially refer to the Database to fetch contents.
- Note - By default, the
enableLookup
=true
The feature to screen the non-dictionary words used in a sentence. In other words, the mask will indicate the words that should not be translated into the target language.
- Note - By default, the
enableLookup
=true
- Note - To set the
nmtMask
=true
, it is mandatory thesrc_lang
=en
(English).
Determines the words that are to be masked.
- Note - On defining values in the
nmtMaskTerms
, then automatically thenmtMask
is set to true. - Example - Masking a term:
nmtMaskTerms: ["Reverie Language Technologies"]
Here, the API will mask the termReverie Language Technologies
, if found in the source content, and will transliterate the word.
Specify whether you want to filter out profane content from the input.
- Note - By default, the
filterProfane
=true
Response
An array of translation responses
The payload length served by NMT. Note: If LookUp DB serves the payload and the content is moderated, then tokenConsumed = 0.
Example: 102