Transliterate Text
In this article you will learn how to transliterate a text using APIs or CLI commands.
Prerequisites
Make sure to follow Getting Started to log in and install the NeuralSpace Transliteration Service. If you are using APIs, save your authorization token in a variable called AUTHORIZATION_TOKEN
before moving ahead.
Transliterate
- CLI
- API
To transliterate text using the CLI, use the command mentioned below. Pass source language in source language
and target language in target language
using the language codes mentioned in Language Support. Set -n
to number of suggestions required.
neuralspace translation parse -t "TEXT TO BE TRANSLITERATED" -src "en" -tgt "hi" -n 3
Pass your text in the text
attribute, set sourceLanguage
and targetLanguage
using the language codes mentioned in Language Support. Set the number of suggestions (value from 1-10) you wish to obtain for your text in suggestionCount
.
curl --location --request POST 'https://platform.neuralspace.ai/api/transliteration/v1/transliterate' \
--header 'Accept: application/json, text/plain, */*' \
--header "authorization: ${AUTHORIZATION_TOKEN}" \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
"text": "airplane",
"sourceLanguage":"en",
"targetLanguage": "hi",
"suggestionCount": 3}'