Integrate PangeaMT with translate5

XMLWordPrintable

      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:

      {"apikey":"the-user-apikey"}

      The response is the list of engines, something like:
      {
          "engines": [
             

      {             "id": 1,             "processid": 1,             "serviceid": 1,             "inserviceid": 0,             "src": "en",             "tgt": "es",             "descr": "ENES_B_plain",             "domain": "",             "flavor": "",             "status": 0         }

      ,
             

      {             "id": 2,             "processid": 1,             "serviceid": 2,             "inserviceid": 0,             "src": "es",             "tgt": "en",             "descr": "ESEN_generic",             "domain": "",             "flavor": "",             "status": 0         }

          ]
      }       

      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:

      { "src":"en", "tgt":"es", "apikey":"the-user-apikey", "engine":"1", "text":[ "This is a sentence","This is a another one" ]}

      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:
      [
          [
             

      {             "src": "This is a sentence",             "tgt": "Esto es una frase"         }

          ],
          [
             

      {             "src": "This is a another one",             "tgt": "Esto es otra"         }

          ]

      ]

            Assignee:
            Ines-Paul Baumann (Inactive)
            Reporter:
            Marc Mittag [Administrator]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: