Saturday, July 28, 2018

Anführungs­zeichen im Deutschen

Übersicht: Kodierung von Anführungszeichen
Typ Anführungszeichen Unicode Windows HTML LaTeX1 Keysym-Name2
deutsch doppelt 201E Alt + 0132 „ "` oder \glqq doublelowquotemark
201C Alt + 0147 “ "' oder \grqq leftdoublequotemark
einfach 201A Alt + 0130 ‚ \glq singlelowquotemark
2018 Alt + 0145 ‘ \grq leftsinglequotemark
englisch doppelt 201C Alt + 0147 “ `` oder \ldq leftdoublequotemark
201D Alt + 0148 ” '' oder \rdq rightdoublequotemark
einfach 2018 Alt + 0145 ‘ ` oder \lq leftsinglequotemark
2019 Alt + 0146 ’ ' oder \rq rightsinglequotemark
französisch doppelt « 00AB Alt + 0171 &laquo; "< oder \flqq guillemotleft
» 00BB Alt + 0187 &raquo; "> oder \frqq guillemotright
einfach 2039 Alt + 0139 &lsaquo; \flq U2039
203A Alt + 0155 &rsaquo; \frq U203A
1 Deutsche und französische Formen sind mit dem Paket babel und dessen Option (n)german verfügbar.
2 Mnemonische Namen der keysyms des X Window System zur Verwendung mit xmodmap


Anführungszeichen (doppelt öffnend)
U+201E
⌥ + ^
Alt + 0132

Anführungszeichen (einfach öffnend)
U+201A
⌥ + S
Alt + 0130

Anführungszeichen (einfach schließend)
U+2018
⌥ + #
Alt + 0145

Anführungszeichen (doppelt schließend)
U+201C
⌥ + 2
Alt + 0147
Anführungszeichen werden zum Zitieren von Textpassagen, zur Ironisierung und Distanzierung genutzt. Zur Verschachtelung gibt es einfache und doppelte Anführungszeichen.
»Eselsbrücke: 99 unten, 66 oben!«


— Christoph Koeberlin
Im Deutschen sitzt das öffnende Anführungszeichen unten, weshalb die Verwendung des doppelten Kodierungszeichens gleich doppelt falsch ist: Weder Position noch Form stimmen. Dabei ist die Regel eigentlich ganz einfach: 99 unten, 66 oben! Die Zeichen sind eben nur etwas versteckt


anfuehrungszeichen-02
Die oft verwendeten doppelten Kodierungszeichen haben sowohl die falsche Form als auch die falsche Position. Schrift: FF Bau Super
Robert Bringhurst empfiehlt, möglichst wenig Anführungszeichen zu verwenden und stattdessen – wo sinnvoll – kursiv zu setzen. Auch Jan Tschichold nennt das Anführungszeichen »deutlich wohl, aber nicht gerade satzverschönernd« (Schriften 1947–1974 Band 2, S. 185).

Warum nicht einfach "so"?

Es läge nahe – Jeder macht es, man hat sich schon fast daran gewöhnt und am schnellsten geht es auch noch, da die doppelten Kodierungszeichen – Schreibmaschine sei Dank – über Umschalt + 2 einfach zu erreichen ist. Fast alle Quellen heben nur den Zeigefinger und erklären, dass es falsch ist, aber warum es falsch ist, erklärt eigentlich nur Hans Peter Willberg (Typolemik, S. 127): Es führt schlicht und einfach zu Verwirrung; Man verliert den Überblick, wo gerade wörtliche Rede anfängt und wo sie aufhört. Und alles, was das störungsfreie Lesen behindert, widerspricht dem Sinn der Typografie: dem Leser dienen.
'
Einfaches Kodierungszeichen
U+0027
⇧ + #
⇧ + #
"
Doppeltes Kodierungszeichen
U+0022
⇧ + 2
⇧ + 2

Guillemets – Die elegante Variante

»
Guillemet (doppelt öffnend)
U+00BB
⌥ + ⇧ + Q
Alt + 0187

Guillemet (einfach öffnend)
U+203A
⇧ + ⌥ + N
Alt + 0155

Guillemet (einfach schließend)
U+2039
⇧ + ⌥ + B
Alt + 0139
«
Guillemet (doppelt schließend)
U+00AB
⌥ + Q
Alt + 0171
Die »französischen« Anführungszeichen werden nach ihrem wahrscheinlichen Erfinder Guillaume Le Bé auch Guillemets (»kleine Willis«) genannt. Im Deutschen werden sie im Gegensatz zum Französischen und Schweizerischen »nach innen zeigend« verwendet, obwohl grundsätzlich auch nichts gegen die umgekehrte Verwendung spricht.


anfuehrungszeichen-04
Im Deutschen werden die Guillemets – im Gegensatz zum Französischen – nach innen zeigend verwendet. Schrift: Ingeborg Fat Italic
Ihr großer Vorteil gegenüber den Gänsefüßchen liegt darin, dass sie durch ihre Form weniger Luft um sich herum haben und somit keine störenden Löcher in den Text reißen. Das kommt dem typografischen Grundsatz eines möglichst ruhigen Satzbildes entgegen, so dass sie z. B. in Büchern der Quasi-Standard sind.
Um die Störung zu minimieren, empfiehlt Jan Tschichold gar die Verwendung von einzelnen Guillemets als primäre Anführungszeichen nach dem Schema ‹–«–»–›. (Schriften 1947–1974 Band 2, S. 185)
Beim Satz mit gebrochener Schrift sollten keine Guillemets verwendet werden.

Verschachtelung

Soll beispielsweise wörtliche Rede innerhalb eines Zitats dargestellt werden, greift man auf die einfache Variante des Anführungszeichens zurück. Auch hier haben die »französischen« Anführungszeichen einen Vorteil, da hier keine Verwechselungsgefahr mit Komma oder Apostroph besteht.

Andere Länder, andere Zeichen


Englisch, öffnend
U+201C
⌥ + 2
Alt + 0147

Englisch, einfach öffnend
U+2018
⌥ + #
Alt + 0145

Englisch, einfach schließend
U+2019
⇧ + ⌥ + #
Alt + 0146

Englisch, schließend
U+201D
⇧ + ⌥ + 2
Alt + 0148
Jedes Land hat seine eigenen orthografischen Besonderheiten, und an Details wie den richtigen landesspezifischen Anführungszeichen erkennt man den sorgfältigen Typografen. Wikipedia bietet eine gute Übersicht.
»Eselsbrücke für englische Anführungszeichen: 66 oben, 99 oben!«


— Christoph Koeberlin
Gern werden im Deutschen die doppelten Kodierungszeichen (»Zollzeichen«) fälschlicherweise als englische Anführungszeichen angesehen und dementsprechend durchgehen gelassen. Aber auch wenn die Position (vorne und hinten oben) die gleiche ist, sind die Zeichen im englischsprachigen Raum ebenso falsch wie hier. Die Eselsbrücke für die englischen Anführungszeichen ist genau anders herum wie die deutsche – 66 oben, 99 oben: Der Engländer öffnet, womit der Deutsche schließt.


anfuehrungszeichen-06
Der Engländer öffnet, womit der Deutsche schließt. (Schrift: Studio Slant)

Fremdsprachliche Zitate in deutschem Text

Kurze fremdsprachliche Zitate sollten dieselben Anführungszeichen wie der umgebende Text erhalten, wohingegen man längere Passagen ruhig mit den landesspezifischen Anführungszeichen versehen kann.
˝
Doppelakut
U+02DD
⇧ + ⌥ + T
"
Doppeltes Kodierungszeichen
U+0022
⇧ + 2
⇧ + 2

Zoll-/ Sekundenzeichen
U+2033
>
Größer als
U+003E
⇧ + <
⇧ + <
Alle gezeigten Zeichen sind keine Anführungszeichen; Der Doppelakut ist ein ungarischer Akzent, das doppelte Kodierungszeichen ist ein Überbleibsel der Schreibmaschine und außerhalb von Programmcode allenfalls als Ersatz für das schwer erreichbare und selten vorhandene Zollzeichen zu gebrauchen. Auch ein beliebter Fehler: Kleiner-als und Größer-als zweimal hintereinander als Guillemets benutzen. Autsch.

Anführungszeichen und optische Achsen

Eine durchgehende linke Achse beruhigt das Satzbild und trägt somit zur besseren Lesbarkeit eines Textes bei. Deshalb sollten öffnende Anführungszeichen, die diese Achse stören, besser außerhalb plaziert werden.


anfuehrungszeichen-07
Nicht nur Robert Gernhardts Wal-Episode aus den Animalerotica macht sich wesentlich besser, wenn die linke Achse nicht gestört wird. (Schrift: Caecilia Light)

Anführungszeichen und Kerning

Gänsefüßchen sind durch ihre Form prädestiniert dazu, in Kombination mit anderen Buchstaben Löcher und Kollisionen zu verursachen. Deshalb sollte sichergestellt werden, dass der Font, den man verwenden möchte, sorgfältig gekernt ist; am besten mit dem Typefacts-Kerningtest.

PS: Vorne anführen, hinten abführen?

Statt »Abführungszeichen« sollte man laut Detailtypografie besser »Schlußzeichen« oder »Ausführungszeichen« sagen … Source: https://typefacts.com

Anführungszeichen sind Interpunktionszeichen; Satzausdruckzeichen. Im Volksmund auch »Gänsefüße« oder »Gänsefüßchen« genannt. Optische Auszeichnung 1 ) von wörtlich wiedergegebenen Äußerungen (direkter Rede) und Textstellen (Zitate) sowie zur Hervorhebung von Wortteilen, Wörtern oder Satzteilen (z.B. Buchtitel, Sprichwörter oder ironische Äußerungen).
Anführungszeichen stehen vor und nach dem ausgezeichneten Wort oder der ausgezeichneten Textpassage. Das eröffnende Anführungszeichen wird als »Anführung«, das schließende Anführungszeichen als »Abführung« bezeichnet. Wird in eine Anführung eine andere Anführung eingeschoben, so erhält diese ein halbes Anführungszeichen. 2 )


Das »Anführungzeichen« ist ein Interpunktionszeichen. Der Stand des orthographischen Satzzeichens ist – hier in der deutschen Variante (unten/oben) – anhand der vier Hauptschriftlinien und der hp-Vertikalhöhe skizziert, wobei es von Schrift zu Schrift zu Abweichungen kommt. Beispiel gesetzt in der »Microsoft Sans Serif«, einer Systemschrift von Microsoft®.
Das »Anführungzeichen« ist ein Interpunktionszeichen. Der Stand des orthographischen Satzzeichens ist – hier in der deutschen Variante (unten/oben) – anhand der vier Hauptschriftlinien und der hp-Vertikalhöhe skizziert, wobei es von Schrift zu Schrift zu Abweichungen kommt. Beispiel gesetzt in der »Microsoft Sans Serif«, einer Systemschrift von Microsoft®.
Die Verwendung von Anführungszeichen werden in Deutschland entsprechend den Empfehlungen des Rats für deutsche Rechtschreibung geregelt. 3 ) 4 )
Typografische Anführungszeichen stammen aus der Antiqua-Tradition der Spätrenaissance, welche sich vermutlich aus den Kolumnenkommentaren entwickelt haben. Typografische Anführungszeichen dienten ursprünglich dazu, in lateinisch oder altgriechisch abgefassten Texten Passagen aus anderen Sprachen sowie wörtliche und sinngemäße Zitate zu kennzeichnen. 5 )

Positionen (Stellungen) von Anführungszeichen

  • Deutsche Anführungszeichen (Umgangssprachlich auch Gänsefüßchen genannt)
    ‚‚hamburgerfontsitiv‘‘ (unten/oben) 6 )
  • Englische bzw. Angloamerikanische Anführungszeichen
    ″hamburgerfontsitiv″ (Oben/Oben, zwischen k-Linie und x-Linie, optisch ausgerichtet an der H-Linie)
  • Französische Anführungszeichen (Guillemets français)
    « hamburgerfontsitiv » (Mitte/Mitte, zwischen x-Linie und Grundlinie sowie je ein Leerzeichen bzw. 1/4 Geviert Zwischenraum nach dem Guillemet ouvrant (vor dem angeführten Wort) bzw. vor dem Guillemet fermant (nach dem angeführten Wort). 7 )
  • Umgekehrte französische Anführungszeichen (Deutschland und Österreich)
    »hamburgerfontsitiv« (Mitte/Mitte, Spitze nach innen, zwischen x-Linie und Grundlinie ohne Leerzeichen)
  • Umgekehrte französische Anführungszeichen (Deutschsprachige Schweiz)
    «hamburgerfontsitiv» (Mitte/Mitte, Spitze nach außen, zwischen x-Linie und Grundlinie ohne Leerzeichen)

Formen (Figuren) von Anführungszeichen

Eine verbindliche Richtlinie für die Zeichenform bzw. Figur des Interpunktionszeichens im deutschen Schriftsatz existiert nicht. 8 ) Nur die Position des Satzausdruckzeichens ist im typografischen Schriftsatz geregelt. Je nach Schriftgattung und Schriftstil sind somit unterschiedliche Figuren des Anführungszeichens möglich: Zwei gerade vertikale Striche oder abgeschrägte Striche mit oder ohne Auslaufpunkt oder Tropfen sowie runde Varianten.


Beispiele unterschiedlicher Formen von An- und Abführungen. Von oben: Celeste, Meta+, Thonburi, DIN Schrift, Matrix Script und Garamont Amsterdam. Infografik: www.typolexikon.de
Beispiele unterschiedlicher Formen von An- und Abführungen. Von oben: Celeste, Meta+, Thonburi, DIN Schrift, Matrix Script und Garamont Amsterdam.
Die englische bzw. angloamerikanische Form – nicht Position – der Satzausdruckzeichen, in Deutschland umgangssprachlich mit »99/66« skizziert, ist nur im englischsprachigen Schriftsatz üblich, um eine Verwechslung mit den dort gebräuchlichen Kürzeln für Zoll, Sekunden und Bogensekunden – ein und zwei vertikale Striche auf halber Höhe zwischen x- und H-Linie bzw. k-Linie (siehe Schriftlinien), teilweise nach unten verjüngt – zu vermeiden. Im frühen 18. Jahrhundert wurden aus diesem Grund die Anführungszeichen in England – und somit auch in Nordamerika – mit einem Tropfen versehen und der Fortlauf (Hybrid aus Punkt und Komma) abgeschrägt. 9 )
Im Zuge der digitalen Schriftübermittlung geht diese angloamerikanische Tradition zur Zeit verloren, da viele Screen Fonts, wie die von Matthew Carter für Microsoft® gestaltete »Verdana«, (z.B. in der Erstversion) keine englischen Antiqua-Anführungszeichen im Standardzeichenrepertoire (exklusive Glyphen) mehr führen. 10 ) Insbesondere serifenlose Screen Fonts führen mehrheitlich nur noch ein »gerades Anführungszeichen«, das dem englischen Zollzeichen gleicht.


Tipp: Bei freigestellten Zitaten wird die Anführung – egal ob es sich um Deutsche, Englische oder Französische Anführungszeichen handelt, immer zugunsten des Optischen Randausgleichs über die linke Satzkante gestellt.
Tipp: Bei freigestellten Zitaten wird die Anführung – egal ob es sich um Deutsche, Englische oder Französische Anführungszeichen handelt, immer zugunsten des Optischen Randausgleichs über die linke Satzkante gestellt.
In der Buchtypografie gelten Französischen Anführungszeichen als die schönste und best lesbare Formvariante aller An- und Abführungszeichen, da sie keine Lücken im Schriftsatz verursacht oder Verwechslungen mit anderen Schriftzeichen, beispielsweise einem Zollzeichen, ausschließt. 11 )

PC-Tastaturbelegung

Anführungszeichen sind über eine PC-Standardtastatur, z.B. nach DIN 2137-T2, singulär oder mit einer Tastenkombination eintippbar. Für die Zeichencodierung existieren unterschiedliche ISO-Normen. 12 )
Satzzeichen #WindowsmacOSLinux
Anführung unten öff. (99)[alt]+[0132][alt]+[^][alt gr] +[v]
Abführung oben geschl. (66)[alt]+[0147][alt]+[2][alt gr]+[b]
Engl. Abführung oben öff. (66)[alt]+[0147][alt]+[2][alt gr]+[b]
Engl. Abführung oben geschl. (99)[alt]+[0148]shift+[alt]+[2][alt gr]+[n]
Hb. Anführung unten öff.[alt]+[0130][alt]+[s][alt gr]+[shift+[v]
Hb. Abführung oben geschl.[alt]+[0145][alt]+[#][alt gr]+[shift+[b]
Deutsches Guillemet öff.»[alt]+[0187][shift+[alt]+[q][alt gr]+[y]
Deutsches Guillemet geschl.«[alt]+[0171][alt]+[q][alt gr]+[x]
Hb. dt. Guillemet öff.[alt]+[0155][shift+[alt]+[n][alt gr]+[shift+[y]
Hb. dt. Guillemet geschl.[alt]+[0139][shift+[alt]+[b][alt gr]+[shift]+[x]
Source: https://www.typolexikon.de

Anführungszeichen in verschiedenen Sprachen
Sprache Standard Alternative Abstand zum Text
primär sekundär2 primär sekundär2
Afrikaans “…” ‘…’    
Albanisch «…» ‹…› “…„ ‘…‚  
Arabisch «…» ‹…› “…” ‘…’  
Armenisch «…» „…“ "…" “…”  
Baskisch «…» ‹…›    
Brasilianisch “…” ‘…’    
Bulgarisch „…“ ‚…‘    
Chinesisch (China) “…” ‘…’6    
Chinesisch (Taiwan)8 「…」 『…』6    
Dänisch „…“ ‚…‘ »…« ›…‹  
Deutsch3 „…“ ‚…‘ »…« ›…‹  
Englisch (UK)* ‘…’ “…” “…” ‘…’ 1–2 pt
Englisch (USA)* “…”1 ‘…’ ‘…’ “…” 1–2 pt
Estnisch „…” „…”
 
Finnisch ”…” ’…’ »…» ’…’  
Französisch3 « … » ‹ … ›1 “ … ” ‘ … ’ ¼ em (PC: geschütztes Leerzeichen)
Georgisch „…“ «…»  
Griechisch7 «…» “…”[19][20]
1 pt
Grönländisch

Hebräisch “…” «…» “…„
Indonesisch ”…” ’…’    
Irisch “…” ‘…’   1–2 pt
Isländisch „…“ ‚…‘    
Italienisch3 «…»   “…” ‘…’ 1–2 pt
Japanisch8 「…」 『…』    
Katalanisch «…» “…” “…” ‘…’  
Koreanisch “…” ‘…’    
Kroatisch „…”   »…« ›…‹  
Lettisch „…“ ‚…‘ "…" '…'  
Litauisch „…“ ‚…‘ "…" '…'  
Niederländisch4 “…” ‘…’ „…” ‚…’  
Norwegisch «…» ‘…’ „…“ ,…‘  
Polnisch „…” «…» »…«5    
Portugiesisch «…» “…” “…” ‘…’ 0–1 pt
Rumänisch „…” «…»    
Russisch «…» „…“ “…” “…”  
Schwedisch ”…” ’…’ »…» ›…›  
Schweiz3 «…» ‹…› „…“ oder “…” ‚…‘ oder ‘…’  
Serbisch „…” ‚…’ »…« ›…‹  
Slowakisch „…“ ‚…‘ »…« ›…‹  
Slowenisch „…“ ‚…‘ »…« ›…‹  
Sorbisch „…“ ‚…‘    
Spanisch «…» ‹…›1 “…” ‘…’ 0–1 pt
Thailändisch “…” ‘…’
 
Tschechisch „…“ ‚…‘ »…« ›…‹  
Türkisch “…” ‘…’ "…" '…'  
Ukrainisch «…» „…“ „…“ 1 pt
Ungarisch „…”   »…«    
Weißrussisch «…» „…“ „…“ 1 pt


Anführungszeichen

ZeichenNamemacOSWindowsLinux
Anführungszeichen (doppelt öffnend)⌥ + ^Alt + 0132Alt Gr + V
Anführungszeichen (doppelt schließend)⌥ + 2Alt + 0147Alt Gr + B
Anführungszeichen (einfach öffnend)⌥ + SAlt + 0130Alt Gr + ⇧ + V
Anführungszeichen (einfach schließend)⌥ + #Alt + 0145Alt Gr + ⇧ + B
»Guillemet (doppelt öffnend)⌥ + ⇧ + QAlt + 0187Alt Gr + Y
«Guillemet (doppelt schließend)⌥ + QAlt + 0171Alt Gr + X
Guillemet (einfach öffnend)⇧ + ⌥ + NAlt + 0155Alt Gr + ⇧ + Y
Guillemet (einfach schließend)⇧ + ⌥ + BAlt + 0139Alt Gr + ⇧ + X
Anführungszeichen (englisch schließend)⇧ + ⌥ + 2Alt + 0148Alt Gr + N
Apostroph⇧ + ⌥ + #Alt + 0146Alt Gr + #

Interpunktion / Satzzeichen

ZeichenNamemacOSWindowsLinux
-Ascii-Bindestrich (Viertelgeviertstrich)---
Gedankenstrich (Halbgeviertstrich)⌥ + -Alt + 0150Alt Gr + -
Spiegelstrich (Geviertstrich)⇧ + ⌥ + -Alt + 0151Alt Gr + ⇧ + -
Ellipse⌥ + -Alt + 0133Alt Gr + .
Apostroph⇧ + ⌥ + #Alt + 0146Alt Gr + #
·Zentrierter Punkt⇧ + ⌥ + 9Alt + 0183Alt Gr + ,
Fetter zentrierter Punkt (Bullet)⌥ + 8Alt + 0149Strg + ⇧ + U + 2022
¡Spanisches öffnendes Ausrufezeichen⌥ + 1Alt + 0161Alt Gr + ⇧ + 1
!Ausrufezeichen⇧ + 1⇧ + 1⇧ + 1
¿Spanisches öffnendes Fragezeichen⇧ + ⌥ + /Alt + 0191Alt Gr + ⇧ + ß
?Fragezeichen⇧ + ß⇧ + ß⇧ + ß
(Öffnende runde Klammer⇧ + 8⇧ + 8⇧ + 8
)Schließende runde Klammer⇧ + 9⇧ + 9⇧ + 9
[Öffnende eckige Klammer⌥ + 5Alt Gr + 8Alt Gr + 8
]Schließende eckige Klammer⌥ + 6Alt Gr + 9Alt Gr + 9
{Öffnende geschweifte Klammer⇧ + 8Alt Gr + 7Alt Gr + 7
}Schließende geschweifte Klammer⌥ + 9Alt Gr + 0Alt Gr + 0
/Schrägstrich⇧ + 7⇧ + 7⇧ + 7
\Umgekehrter Schrägstrich (Backslash)⇧ + ⌥ + 7Alt Gr + ßAlt Gr + ß
|Senkrechter Strich⌥ + 7Alt Gr + <Alt Gr + <

Währungszeichen

ZeichenNamemacOSWindowsLinux
Euro⌥ + EAlt + 0128Alt Gr + E
$Dollar⇧ + 4⇧ + 4⇧ + 4
¥Yen⌥ + YAlt + 0165Alt Gr + ⇧ + Z
£Pfund⌥ + 3Alt + 0163Alt Gr + ⇧ + 3
¢Cent⌥ + 4Alt + 0162Alt Gr + C
ƒFlorin⌥ + FAlt + 0131Strg + ⇧ + U + 192
¤Platzhalter für WährungszeichenAlt + 0164Alt Gr + ⇧ + 4

Sonstige Sonderzeichen

ZeichenNamemacOSWindowsLinux
@at-Zeichen⌥ + LAlt Gr + QAlt Gr + Q
&Ampersand (Et-Zeichen)⇧ + 6⇧ + 6⇧ + 6
fi-Ligatur⇧ + ⌥ + 5Strg + ⇧ + U + fb01
fl-Ligatur⇧ + ⌥ + 6Strg + ⇧ + U + fb02
§Paragraphzeichen⇧ + 3⇧ + 3⇧ + 3
%Prozentzeichen⇧ + 5⇧ + 5⇧ + 5
Promillezeichen⇧ + ⌥ + RAlt + 0137Strg + ⇧ + U + 2030
Absatzzeichen (Pilcrow, Alinea)⌥ + 7Alt + 0182Alt Gr + R
Trademark⇧ + ⌥ + DAlt + 0153Alt Gr + ⇧ + 8
©Copyright⌥ + GAlt + 0169Alt Gr + ⇧ + C
®Registered Trademark⌥ + RAlt + 0174Alt Gr + ⇧ + R
*Sternchen (Asterisk)⇧ + +⇧ + +⇧ + +
Kreuz⌥ + TAlt + 0134Strg + ⇧ + U + 2020
Lothringer Kreuz⇧ + ⌥ + YAlt + 0135Strg + ⇧ + U + 2021
°Gradzeichen⇧ + ^⇧ + ^⇧ + ^
'Einfaches Kodierungszeichen⇧ + #⇧ + #⇧ + #
"Doppeltes Kodierungszeichen⇧ + 2⇧ + 2⇧ + 2
ªOrdinalzeichen (feminin)⌥ + HAlt + 0170Alt Gr + ⇧ + F
ºOrdinalzeichen (maskulin)⌥ + JAlt + 0186Alt Gr + ⇧ + M

Add tags in Trados with a single keystroke

This AHK script allows you to insert tags sequentially by pressing a single key while ignoring placeables. This script uses the Left Windows key. The script assumes that the default Ctrl+Enter shortcut is used to confirm segments. If a different shortcut is used, it needs to be replaced accordingly on the last line of the script.

;Add tags with LWin key
n:=1
return
Lwin::
if (n = 1)
Send, ^!{Right}{Esc}{Right}
else
{
Send, {Ctrl Down}{Alt Down}{Right %n%}
Sleep 200
Send, {Ctrl Up}{Alt Up}{Esc}{Right}
}
n++ ; increment n
return
~^Enter::n := 1 ;script is reset with Confirm and Move to Next Segment shortcut, tilde is needed to pass through the original action for Ctrl+Enter
Source: https://community.sdl.com

ModernMT Enterprise Edition API Documentation

ModernMT Enterprise Edition is available through publicly available REST API that allows you to request translations, manage your memories and check your billing profile.

Api key

In order to use ModernMT Enterprise edition you need an api key. If you do not have an api key yet, you can get one here: https://www.modernmt.eu/license/buy.
For every API request you have to include an HTTP Header with name MMT-ApiKey and your api key as value.
MMT-ApiKey: 01234567-8901-2345-6789-012345678901

Client Identity

Clients for ModernMT Enterprise Edition should also specify a few more details when sending requests to ModernMT APIs. These data mainly concern the client identity, and they can be extremely valuable in our support activities to our clients, allowing us to track the traffic from and to a specific client, and letting us immediately intervene in case of necessity. These client identity data should be set as HTTP Headers in the client requests:
  • MMT-Platform: the name of the software that is using ModernMT Enterprise edition (example: “MyWonderfulCATTool”).
  • MMT-PlatformVersion: the version of the software that is using ModernMT Enterprise edition (example: “2.1.3”).
  • MMT-PluginVersion: the version of the plugin that is being used to call the ModernMT Enterprise edition APIs (example: “1.1”).
The ideal requests, therefore, looks like this (using curl for simplicity):
curl -H "MMT-ApiKey:<my_api_key>" \
-H "MMT-PluginVersion:<my_plugin_version>" \
-H "MMT-Platform:<my_platform_name>" \
-H "MMT-PlatformVersion:<my_platform_version>" \
http://api.modernmt.eu/... 

Endpoints

A REST endpoint consists of an HTTP method and a path to the resource. Usually the HTTP method describes the action, while the path identifies the resource or the service you are interacting with.
There can be cases in which the caller is limited in the use of HTTP methods for tecnical reasons or by HTTP protocol limitations (i.e. max allowed GET request length). For this reason ModernMT allows you to use any actual HTTP method, while separately declare the REST API method through the X-HTTP-Method-Override header.
For example, it is allowed to request a translation with an HTTP POST request like this:
curl -X POST \
   -H 'X-HTTP-Method-Override: GET' \
   -H 'MMT-ApiKey: <your_api_key>' \
  'http://api.modernmt.eu/translate?source=en&target=it&q=Hello'

Translation

Memory

User and Billing

General aspects

All APIs responses have a common structure that allows the user to quickly understand if the request returned a valid output or if an error occurred. This is the positive response wireframe:
{
    "data": "...request specific data..." ,
    "status": 200
}
In case of error, the API will send back a response like the following:
{
    "error": {
        "message": "Missing parameter text",
        "type": "ParameterParsingException"
    },
    "status": 400
}

Error Codes

In an error response you can always find error.message that contains a text that explains the error and error.type that is the id of the error.
The ModernMT API uses the HTTP status codes to identify which type of error has occurred. The status field in the response is always the same as the HTTP status code, it is reported twice just for convenience.
  • Status 2xx: OK - The API returned successfully.
  • Status 4xx: CLIENT ERROR - The API has detected a problem with the request made by the caller (a missing parameter or a nonexistent API).
  • Status 5xx: SERVER ERROR - The API has failed unexpectedly for an internal server error.

Input format

MMT support XML input type for translations. XML tags are extracted from the source text, and re-inserted in the translation in the right position, based on the translation alignments.
During the pre-processing:
  • XML Tags are identified and extracted from the text.
  • Pure text is then de-escaped: XML entities are replaced with the actual literal (e.g. &lt; is replaced with char <).
The text is then translated by the decoder. During the post-processing step:
  • Text is then escaped following the XML conventions. Characters <, > and & are escaped in &lt;, &gt; and &amp;.
  • XML Tags are positioned in the translation based on the alignments. Tag’s attributes are kept untouched.
See the following example:
  • Input: You&apos;ll see the <div id="example-div">example</div>!
  • Preprocessed: You 'll see the example !
  • Translation: Vedrai l' esempio !
  • Postprocessed: Vedrai l'<div id="example-div">esempio</div>!

Quick Example

curl -X GET \
   -H 'MMT-ApiKey: <your_api_key>' \
  'http://api.modernmt.eu/translate?source=en&target=it&q=Hello=&context=Mr%20President' \
   | python -mjson.tool

{
    "data": {
        "contextVector": {
            "entries": [
                {"memory": {"id": 1, "name": "europarl"}, "score": 0.20658109},
                {"memory": {"id": 2, "name": "ibm"}, "score": 0.0017772929}
            ]
        },
        "translation": "Ciao"
    },
    "status": 200
}

Description

This method returns the translation of the provided text. The text is XML encoded and can contain XML Tags. Since one ModernMT Engine may supports multiple language pairs and directions, you need to specify the source and target languages.

Resource URL

http://api.modernmt.eu/translate

Parameters

source The language tag of the source language.

Example: en
target The language tag of the target language.

Example: it
q The text to translate in XML format (XML tags accepted, text must be XML-encoded).

Example: This is an example
context_vector
optional
The context vector to use in the translation, as a series of comma-separated key-value pairs `id1:score1,id2:score2,...`.

Example: Example: 1:0.34,3:0.045
hints
optional
A list containing the Memories to use for this translation.

Example: 10
type
optional
The type of translation request. It can be either interactive or batch. Default value is interactive.

Result

translation The translation of the input sentence.
contextVector The Context Vector object calculated by analyzing the context text provided. For more details on the object format, please have a look at <a href=/apis/api-get-context-vector.md>API Get Context Vector.

API Get Context Vector

Quick example

curl -X GET \
     -H "MMT-ApiKey: <your_api_key>" \
     "http://api.modernmt.eu/context-vector?source=en&targets=it&text=Hello" \
     | python -mjson.tool

{
    "status": 200,
    "data": {
        "source": "en",
        "vectors": {
            "it": "4:1,5:0.042476345"
        }
    }
}

Description

This method returns the Context Vector containing the best-matching domains and their scores for the provided content. The score is the cosine similarity between the given context, and that domain.

Resource URL

http://api.modernmt.eu/context-vector

Parameters

source The language tag of the source language

Example: en
targets The target languages, as a series of comma-separated language tags

Example: it,es
text
optional
The context text to be analyzed.

Example: Mr President
content
optional
This parameter can be used to upload and calculate the Context Vector of a large file. In order to do that, Content-Type: multipart/form-data` and X-HTTP-Method-Override: GET headers must be specified and a POST request must be used instead of GET.
compression
optional
While using the "content" parameter, if the content file is compressed you need to specify the compression type. So far only GZIP compression is supported.

Example: gzip
hints
optional
A list containing the Memories to force the use of in this translation.

Example: 1,4

Response Fields

source The source language
vectors An object containing, for each supported target language, the corresponding Context Vector

API Get Memories

Quick example


curl -H "MMT-ApiKey:<my_api_key>" http://api.modernmt.eu/memories | python -mjson.tool

{
    "status": 200,
    "data": [
        {
            "id": 5,
            "key": "mk_f4932hg205vh7h20h05g72",
            "name": "BeautifulMemory",
            "description": "My most precious memories",
            "externalId": null,
            "creationDate": "2017-10-13T13:32:34+00:00"
        },
        {
            "id": 9,
            "key": "mk_890qjf8hf0qhf04hf7403f",
            "name": "EvenMoreBeautifulMemory",
            "description": "My even more precious memories",
            "externalId": null,
            "creationDate": "2017-11-13T13:33:01+00:00"
        }
    ]
}

Description

This method retrieves all the memories associated to the owner of the MMT-ApiKey header used in the HTTP Request.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}

Resource URL

http://api.modernmt.eu/memories

Request Fields

None.

Response Fields

This API returns an array containing multiple Memory objects. Each Memory object contains the following fields:
id The ModernMT Memory id for this Memory.

Example: 5
key The ServiceApi Memory key for this Memory.

Example: mk_f4932hg205vh7h20h05g72
externalId Private parameter for internal use only
name The name with which this user was linked to the memory.

Example: BeautifulMemory
description The description with which this user was linked to the memory.

Example: My most precious memories
creationDate A timestamp marking the instant that the Memory was created.
It refers to the creation of the actual Memory, and not to the moment when the User connected to it.

Example: 2017-10-13T13:32:34+00:00

API Get Memory

Quick example


curl -X GET -H "MMT-ApiKey:<my_api_key>" http://api.modernmt.eu/memories/5 | python -mjson.tool

{
    "status": 200,
    "data": {
        "id": 5,
        "key": "mk_f4932hg205vh7h20h05g72",
        "name": "BeautifulMemory",
        "description": "My most precious memories",
        "externalId": null,
        "creationDate": "2017-10-13T13:32:34+00:00"
    }
}

Description

This method retrieves a specific memory associated to the owner of the MMT-ApiKey header used in the HTTP Request.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}
If passed ID does not correspond to any Memory that the User is connected to, this API returns an HTTP ERROR 404:
{
    "error": {
        "message": "Requested resource not found",
        "type": "NotFoundException"
    },
    "status": 404
}

Resource URL

http://api.modernmt.eu/memories/:id

Request Fields

None. The memory identifier is specified directly in the URL. Note: the identifier can be:
  • the id of the MMT Memory that this ServiceApi Memory refers to (example: 5);
  • the ServiceApi Memory Key (example: mk_f4932hg205vh7h20h05g72);

Response Fields

id The ModernMT Memory id for this Memory.

Example: 5
key The ServiceApi Memory key for this Memory.

Example: mk_f4932hg205vh7h20h05g72
externalId Private parameter for internal use only
name The name with which this user was linked to the memory.

Example: BeautifulMemory
description The description with which this user was linked to the memory.

Example: My most precious memories
creationDate A timestamp marking the instant that the Memory was created. It refers to the Memory, and not to the link between User and Memory.

Example: 2017-10-13T13:32:34+00:00

API Create Memory

Quick Example


curl -X POST \
     -H "MMT-ApiKey:<your_api_key>" \
     -d "name=newMemory" \
     -d "description=newDescription" \
     http://api.modernmt.eu/memories \
     | python -mjson.tool

{
    "status": 200,
    "data": [
        {
            "id": 5,
            "key": "mk_4890fj840qjf4gggfga55",
            "name": "newMemory",
            "description": "newDescription",
            "externalId": null,
            "creationDate": "2017-10-13T13:32:34+00:00"
        }
    ]
}

Description

This method creates a new ModernMT Memory and links it to the current User.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}

Resource URL

http://api.modernmt.eu/memories

Parameters

name The name with which the new Memory must be associated to the current User

Example: newMemory
description
optional
The description that the new Memory must use for the current User

Example: new description for the new memory
external_id
optional
The id of the TM stored in an external provider, and that should be imported in the new MMT Memory.
The external id must be in format x_providerTag-idString

Example: x_mm-fh548297h54f0281hf47

Response Fields

id The MMT Memory id for the newly created Memory.

Example: 5
key The MMT Memory key for the newly created Memory.

Example: mk_f4932hg205vh7h20h05g72
externalId This is a private parameter only for internal use
name The Memory name with which this User was linked to the newly created Memory.

Example: BeautifulMemory
description The Memory description with which this user was linked to the newly created memory.

Example: My most precious memories
creationDate A timestamp marking the instant that the Memory was created.
It refers to the creation of the actual Memory, and not to the moment when the User has connected to the Memory.

Example: 2017-10-13T13:32:34+00:00

API Delete Memory

Quick example


curl -X DELETE -H "MMT-ApiKey:<my_api_key>" http://api.modernmt.eu/memories/5 | python -mjson.tool

{
    "status": 200,
    "data": {
        "id": 5,
        "key": "mk_f4932hg205vh7h20h05g72",
        "name": "memoryName",
        "description": "memoryDescription",
        "externalId": null,
        "creationDate": "2017-10-13T13:32:34+00:00"
    }
}

Description

This method removes the connection between the current User and the specified Memory, and returns the Memory object. It does not remove the actual Memory from ModernMT. If the current User was not linked to the passsed Memory, this API returns an HTTP ERROR 404:
{
    "error": {
        "message": "Requested resource not found",
        "type": "NotFoundException"
    },
    "status": 404
}
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}

Resource URL

http://api.modernmt.eu/memories/:id

Request Fields

None. The memory identifier is specified directly in the URL. Note: the identifier can be:
  • the id of the MMT Memory that this ServiceApi Memory refers to (example: 5);
  • the MMT Memory Key (example: mk_f4932hg205vh7h20h05g72);

Response Fields

id The ModernMT Memory id for this Memory.

Example: 5
key The MMT Memory key for this Memory.

Example: mk_f4932hg205vh7h20h05g72
externalId Private parameter for internal use only
name The name with which the user is linked to the memory.

Example: BeautifulMemory
description The description with which the user is linked to the memory.

Example: My most precious memories
creationDate A timestamp marking the instant that the Memory was created. It refers to the creation of the Memory, and not to the moment when the User was linked to it.

Example: 2017-10-13T13:32:34+00:00

API Update Memory

Quick example


curl -X PUT -H "MMT-ApiKey:<my_api_key>" http://api.modernmt.eu/memories/5 \
   -d "name=newName" \
   -d "description=newDescription" \
   | python -mjson.tool

{
    "status": 200,
    "data": {
        "id": 5,
        "key": "mk_f4932hg205vh7h20h05g72",
        "name": "newName",
        "description": "newDescription",
        "externalId": null,
        "creationDate": "2017-10-13T13:32:34+00:00"
    }
}

Description

This method updates the name and description of a specific Memory that is already connected to the owner of the MMT-ApiKey header used in the HTTP Request.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}
If the Memory was not already connected to the User, this API returns an HTTP ERROR 404:
{
    "error": {
        "message": "Requested resource not found",
        "type": "NotFoundException"
    },
    "status": 404
}

Resource URL

http://api.modernmt.eu/memories/:id

Request Fields

name The new name to use in the connection between this Memory and this User.

Example: newName
key The new description to use in the connection between this Memory and this User.

Example: newDescription
Note: The Memory identifier must be specified in the URL. It can be:
  • the id of the MMT Memory that this ServiceApi Memory refers to (example: 5);
  • the MMT Memory Key (example: mk_f4932hg205vh7h20h05g72);

Response Fields

id The MMT Memory id for the newly created Memory.

Example: 5
key The MMT Memory key for this Memory.

Example: mk_f4932hg205vh7h20h05g72
externalId Private parameter for internal use only
name The new name with which the User is linked to the Memory.

Example: BeautifulMemory
description The new description with which the User is linked to the Memory.

Example: My most precious memories
creationDate A timestamp marking the instant that the Memory was created. It refers to the creation of the actual Memory, and not to the moment when the User was connected to the Memory.

Example: 2017-10-13T13:32:34+00:00

API Delete Memory Content

Quick example


curl -X DELETE -H "MMT-ApiKey:<my_api_key>" http://api.modernmt.eu/memories/5/content | python -mjson.tool

{
    "status": 200,
    "data": {
        "id": 5,
        "key": "mk_f4932hg205vh7h20h05g72",
        "name": "memoryName",
        "description": "memoryDescription",
        "externalId": null,
        "creationDate": "2017-10-13T13:32:34+00:00"
    }
}

Description

This method removes from the models in the ModernMT server all the contents for the specified Memory. The specified Memory must be associated to the owner of the MMT-ApiKey header used in the HTTP Request.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}
If the Memory is not connected to the current User, this API returns an HTTP ERROR 404:
{
    "error": {
        "message": "Requested resource not found",
        "type": "NotFoundException"
    },
    "status": 404
}

Resource URL

http://api.modernmt.eu/memories/:id/content

Request Fields

None. The memory identifier is specified directly in the URL. Note: the identifier can be:
  • the id of the MMT Memory that this ServiceApi Memory refers to (example: 5);
  • the ServiceApi Memory Key (example: mk_f4932hg205vh7h20h05g72);

Response Fields

id The MMT Memory id for the newly created Memory.

Example: 5
key The ServiceApi Memory key for this Memory.

Example: mk_f4932hg205vh7h20h05g72
externalId Internal parameter for private use only
name The name with which the user is linked to the memory.

Example: BeautifulMemory
description The description with which the user is linked to the memory.

Example: My most precious memories
creationDate A timestamp marking the instant that the Memory was created. It refers to the creation of the actual Memory, and not to the moment when it was connected to the current User.

Example: 2017-10-13T13:32:34+00:00

API Add Memory Content

Quick Example

Adding a TMX file to an already existing memory

curl -X POST \
     -H "Content-Type: multipart/form-data" \
     -H "MMT-ApiKey: <your_api_key>" \
     -F "tmx=@<absolute_path_to_your_tmx>" \
     http://api.modernmt.eu/memories/5/content \
     | python -mjson.tool

{
    "data": {
        "begin": 76692,
        "dataChannel": 0,
        "end": 76699,
        "id": "00000000-0000-0000-0000-000000000004",
        "memory": 5,
        "progress": 0,
        "size": 8
    },
    "status": 200
}

Adding a single contribution to an already existing memory


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

{
    "data": {
        "begin": 16,
        "dataChannel": 1,
        "end": 16,
        "id": "80000001-0000-0000-0000-000000000010",
        "memory": 0,
        "progress": 0,
        "size": 1
    },
    "status": 200
}

Description

This method appends parallel text to the content of a Memory.
It is possible to append either a single translation unit (source/translation pair), or an entire TMX file.
Adding more data to a Memory can improve the quality of the translation of ModernMT; 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.
To add a TMX to a Memory, the user must be linked to that Memory. To add a single contribution to a Memory, the user can be either linked or not linked to it (it must have a valid MMT-apiKey anyway).

Resource URL

http://api.modernmt.eu/memories/:id/content

Parameters

</tr>
source
oprional
The source language of the content to add, in the form of a language tag. Mandatory if the content to add is a single contribution.

Example: en
target
optional
The target language of the content to add, in the form of a language tag. Mandatory if the content to add is a single contribution.

Example: it
sentence
optional
The source part of a translation unit. Mandatory if the content to add is a single contribution.

Example: Hello Mike!
translation
optional
The target part of a translation unit. Mandatory if the content to add is a single contribution.

Example: Ciao Mike!
tmx
optional
This parameter represents a TMX file to import into a memory. To import a tmx, the Content-Type: multipart/form-data` header must be specified.
compression
optional
If you are sending a compressed TMX file, you also need to specify the compression type.
NOTE: at the moment the only supported compression type is GZIP.

Example: gzip
Note: The Memory identifier must be specified in the URL. It can be:
  • the id of the MMT Memory that this ServiceApi Memory refers to (example: 5);
  • the MMT Memory Key (example: mk_f4932hg205vh7h20h05g72);

Response Fields

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

API Update Memory Content

Quick Example

curl -X PUT \
     -H "MMT-ApiKey: <your_api_key>" \
     -d "source=en" \
     -d "target=it" \
     -d "sentence=Hi Mike!" \
     -d "translation=Ciao Mike!" \
     -d "old_sentence=Hello Mike!" \
     -d "old_translation=Salve Michele!" \
     http://api.modernmt.eu/memories/5/content \
     | python -mjson.tool

{
    "data": {
        "begin": 16,
        "dataChannel": 1,
        "end": 16,
        "id": "80000001-0000-0000-0000-000000000010",
        "memory": 0,
        "progress": 0,
        "size": 1
    },
    "status": 200
}

Description

This method updates a past contribution in a Memory. The target Memory does not have to be linked to the current User.
If the same contribution was added multiple times, all of its instances in the Memory will be updated.

Resource URL

http://api.modernmt.eu/memories/:id/content

Parameters

</tr>
source The source language of the contribution to update, in the form of a language tag.

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

Example: it
sentence The source part of the contribution to write over the old contribution.

Example: Hello Mike!
translation The target part of the contribution to write over the old contribution

Example: Ciao Mike!
old_sentence The source part of the old contribution to update.

Example: Hello Mike!
old_translation The target part of the old contribution to update.

Example: Salve Michele!

Response Fields

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

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!" \
     http://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

http://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.

API Update Content in 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!" \
     -d "old_sentence=Hello Mike!" \
     -d "old_translation=Salve Michele!" \

     http://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 updates a past contribution in multiple MMT Memories.
The User can be either connected or not connected to the target memories to update; she must have a valid MMT-apiKey anyway.
If no target memory is passed, this API will update the contribution in the User’s default memory.
If the same contribution was added multiple times, all of its instances in the target Memories will be updated.

Resource URL

http://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 ModernMT Memory ID, or the ServiceApi Memory Key, or the corresponding External Id (if there is one).
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 update, in the form of a language tag.

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

Example: it
sentence The source content of the contribution to write over the old contribution.

Example: Hello Mike!
translation The target content of the contribution to write over the old contribution

Example: Ciao Mike!
old_sentence The source content of the old contribution to update.

Example: Hello Mike!
old_translation The target content of the old contribution to update.

Example: Salve Michele!

Response Fields

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

API Get Import Job

Quick example

curl -X GET -H "MMT-ApiKey:<my_api_key>" http://api.modernmt.eu/import-jobs/00000000-0000-0000-0000-000000000001 | python -mjson.tool

{
    "data": {
        "begin": 0,
        "dataChannel": 0,
        "end": 50487,
        "id": "00000000-0000-0000-0000-000000000001",
        "memory": 7,
        "progress": 0.43
        "size": 50488
    },
    "status": 200
}

Description

This method returns an Import Job status.

Resource URL

http://api.modernmt.eu/memories/import-jobs

Parameters

None. The id of the import job is specified directly in the URL.

Response Fields

id The id of the import job. The id is a UUID (128-bit number).
memory The id of the memory that is receiving the updates.
dataChannel The id of the data channel where this contribution was written by MMT
begin The start position of this contribution in the data channel.
end The end position of this contribution in the data channel.
size The number of translation units in this import job.
progress This value indicates the percentage of progress of the import job. A value of 1 (corresponding to 100%) indicates that the job is completed.


API Get User

Quick example


curl -H "MMT-ApiKey:<my_api_key>" "http://api.modernmt.eu/users/me" | python -mjson.tool

{
    "data": {
        "billingPeriod": {
            "amount": 0,
            "begin": "2017-10-01T00:00:00+00:00",
            "currency": "EUR",
            "currencySymbol": "\u20ac",
            "end": "2017-11-01T00:00:00+00:00",
            "words": 0
        },
        "email": "andrea@translated.net",
        "id": 1,
        "name": "Andrea Rossi"
    },
    "status": 200
}

Description

This method retrieves the user associated to the MMT-ApiKey header sent in the HTTP Request.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
    "status":401,
    "error": {
        "type":"AuthException",
        "message":"Missing or invalid authentication header"
    }
}

Resource URL

http://api.modernmt.eu/users/me

Request Fields

None.

Response Fields

name The user name.

Example: Andrea Rossi
id The user id.

Example: 1
email The user email. Two users can never share the same email address.

Example: andrea@ŧranslated.net
billingPeriod The user's current billing period for this month. If there is no billing period for this month, this field will return a new billing period for this month. </table </tr>
currency The currency used for this user, in ISO 4217 standard

Example: EUR
currencySymbol The currency symbol, as a Unicode character code

Example: \u20ac
begin A timestamp marking the beginning of this billing period. If always corresponds to the first day of a month.

Example: 2017-10-01T00:00:00+00:00
end A timestamp marking the end of this billing period. If always corresponds to the first day of a month.

Example: 2017-11-01T00:00:00+00:00
amount The amount of money billed in the billing period

Example: 254.5498
words The amount of billed words in the billing period

Example: 18967