-
Type:
New Feature
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: LanguageResources
-
High
-
Emptyshow more show less
Documentation:
https://corporateapi2.docs.apiary.io/#reference/0/process-text/process-a-text-segment
The protocol is very simple, we do have 2 API endpoints:
1) http://prod.pangeamt.com:8080/NexRelay/v1/corp/engines is the
endpoint for a POST request to get the engines the user has access
to. It requires a json body with the user APIKey:
The response is the list of engines, something like:
{
"engines": [
,
]
}
the only relevant fields are the id (to be used in the translate
requests), src and tgt (2-letter language codes) and descr
(description to show to the user)
2) http://prod.pangeamt.com:8080/NexRelay/v1/translate
is the POST endpoint to translate. It is used with a json body
such as:
notice that for engine we need to send the id we received in the
/engines endpoint and that we can send an 'array' of sentences to
translate.
The response is a DOUBLE array:
[
[
],
[
]
]