Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The user must be authorized to access the project and all its content.


EXAMPLE

-

 Here we want to sample translations done in a project. We expect one sample per supplier and language combination. If your project has 3 target languages and 1 translator for each language then we will obtain 3 samples. The condition here is that a segment shall only be retained if all translators were involved: The first for the first target language, the second for the second and the third for the third. If a segment was translated into just one target language, it is excluded. The idea is to sample the exact same segments for all the suppliers/languages. Given this condition, the system may not be able to sample your project if your suppliers did not work on the same segments.

Code Block
POST /resources/segments/randomsample/new
BODY:
{
  "type": "Project",
  "pid": 1678,
  "tsk": "TR",
  "size": 2
}


The method returns the requested sample. To keep the json below small, we removed the sample details in the results node.

The system identified translation jobs for 2 target languages and 2 suppliers. It thus created 2 samples.

Code Block
{
  "samples": [
    {
      "segments": 2,
      "words": 50,
      "src": "en",
      "trg": "es",
      "tsk": "TR",
      "cid": 102,
      "uid": null,
      "dsid": 1849,
      "pid": 1678,
      "result": {
        "rows": [],
        "docs": {},
        "users": {}
      },
      "columns": [
        {
          "index": 0,
          "fkey": "1~en~0",
          "fkeyLayout": "1~en~0",
          "ftype": 1,
          "fqualifier": 0,
          "name": "Anglais",
          "loc": "en",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 1,
          "fkey": "1~es~0",
          "fkeyLayout": "1~es~0",
          "ftype": 1,
          "fqualifier": 0,
          "name": "Espagnol",
          "loc": "es",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 2,
          "fkey": "12~es~0",
          "fkeyLayout": "12~es~0",
          "ftype": 12,
          "fqualifier": 0,
          "name": "Revisions - Espagnol",
          "loc": "es",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 3,
          "fkey": "9~en~0",
          "fkeyLayout": "9~en~0",
          "ftype": 9,
          "fqualifier": 0,
          "name": "Comments - Anglais",
          "loc": "en",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 4,
          "fkey": "9~es~0",
          "fkeyLayout": "9~es~0",
          "ftype": 9,
          "fqualifier": 0,
          "name": "Comments - Espagnol",
          "loc": "es",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        }
      ]
    },
    {
      "segments": 2,
      "words": 50,
      "src": "en",
      "trg": "fr",
      "tsk": "TR",
      "cid": 75,
      "uid": null,
      "dsid": 1849,
      "pid": 1678,
      "result": {
        "rows": [],
        "docs": {},
        "users": {}
      },
      "columns": [
        {
          "index": 0,
          "fkey": "1~en~0",
          "fkeyLayout": "1~en~0",
          "ftype": 1,
          "fqualifier": 0,
          "name": "Anglais",
          "loc": "en",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 1,
          "fkey": "1~fr~0",
          "fkeyLayout": "1~fr~0",
          "ftype": 1,
          "fqualifier": 0,
          "name": "Français",
          "loc": "fr",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 2,
          "fkey": "12~fr~0",
          "fkeyLayout": "12~fr~0",
          "ftype": 12,
          "fqualifier": 0,
          "name": "Revisions - Français",
          "loc": "fr",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 3,
          "fkey": "9~en~0",
          "fkeyLayout": "9~en~0",
          "ftype": 9,
          "fqualifier": 0,
          "name": "Comments - Anglais",
          "loc": "en",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        },
        {
          "index": 4,
          "fkey": "9~fr~0",
          "fkeyLayout": "9~fr~0",
          "ftype": 9,
          "fqualifier": 0,
          "name": "Comments - Français",
          "loc": "fr",
          "loc_rtl": false,
          "loc_cmplx": false,
          "loc_ea": false
        }
      ]
    }
  ]
}