View on GitHub

ModernMT Enterprise Edition

Neural Adaptive Machine Translation for professional translators

← Back to Home

API Add Content To Multiple Memories

Quick Example


curl -X POST \
     -H "MMT-ApiKey: <your_api_key>" \
     -d "memories=1,4,5" \
     -d "source=en" \
     -d "target=it" \
     -d "sentence=Hello Mike!" \
     -d "translation=Ciao Mike!" \
     https://api.modernmt.eu/memories/content \
     | python -mjson.tool

{
    "data": [
        {
            "begin": 16,
            "dataChannel": 1,
            "end": 16,
            "id": "80000001-0000-0000-0000-000000000010",
            "memory": 0,
            "progress": 0,
            "size": 1
        },
        {
            "begin": 17,
            "dataChannel": 1,
            "end": 17,
            "id": "80000001-0000-0000-0000-000000000011",
            "memory": 0,
            "progress": 0,
            "size": 1
        },
        {
            "begin": 18,
            "dataChannel": 1,
            "end": 18,
            "id": "80000001-0000-0000-0000-000000000012",
            "memory": 0,
            "progress": 0,
            "size": 1
        }
    ],
    "status": 200
}

Description

This method adds a single contribution to multiple MMT Mmories.

Adding more data to a memory can improve the quality of the translation of MMT; appending post-edited segments for example is the best way to let MMT learn from corrections made by professional translators and be also able to adapt translation output to the translator’s taste.

The User can be either linked or not linked to the target memories (it must have a valid MMT-ApiKey anyway).
If no target memory is passed, this API will append the contribution to the User’s default memory.

Resource URL

https://api.modernmt.eu/memories/content

Parameters

memories
A list containing the identifiers of the target memories in the format of a comma-separated string.
A Memory identifier can be either the MMT Memory ID, or the MMT Memory Key.
If no target memories are passed, the contribution will be added to the User's default Memory.

Example: 1,3,5
source
The source language of the contribution to add, in the form of a language tag.

Example: en
target
The target language of the contribution to add, in the form of a language tag.

Example: it
sentence The source content of the contribution to add.

Example: Hello Mike!
translation The target content of the contribution to add.

Example: Ciao Mike!

Response Fields

The response object is an array of ImportJobs, for more details please have a look at the API Get Import Job documentation.


← Back to Home