How do I translate a name using the RESTful (JSON) web service?

Construct an HTTP post to:

http://localhost:9022/rws-names/services/rest/NameTranslation/translate

 

The header should contain the following:

Accept: application/json

 

The payload must be valid JSON in the format given by this example:

{"entityType": "PERSON",
"names": ["Mohammed Al Fayed"], "source": {
"lang":"ENGLISH", "scheme": "FOLK", "script": "Latn"
}, "target": {
"lang":"ARABIC", "scheme": "NATIVE", "script": "Arab"
}}

 

The 'names' argument can contain a list of names separated by commas for batch translation. 

 

The expected output is:

[{"results":[{"annotations":{"orthography":null,"segmentation":null,"nonDictionaryTokens":null,"languageOfOrigin":{"indices":[0,8,9,19],"languageOfOrigin":["ARABIC","ARABIC"]}},"translation":"مُحَمَّد اَلْفَايِد","confidence":1.0}],"originalName":"Mohammed Al Fayed"}]

 

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.




Powered by Zendesk