CAT Server API

Workbench.CATServerAPI History

Hide minor edits - Show changes to output

June 14, 2013, at 03:28 PM by Philipp Koehn -
Changed line 85 from:
** @@elapsedTime: INT@@ ms Time to process each resuls
to:
Added lines 95-108:

!!!getTokens
Request parameters
* @@source: STRING@@ source sentence
* @@target: STRING@@ current translation in text box
Response parameters
* @@source: STRING@@ source sentence
* @@sourceSegmentation: SEGMENTATION@@ source segmentation
* @@target: STRING@@ current translation in text box
* @@targetSegmentation: SEGMENTATION@@ source segmentation
* @@elapsedTime: INT@@ time to process (in ms)

Retrieves tokenization results for the current segment.

June 14, 2013, at 02:23 PM by Philipp Koehn -
Added lines 91-94:

!!!rejectSuffix

!!!endSession
June 14, 2013, at 02:22 PM by Philipp Koehn -
Added lines 73-90:
!!!setPrefix
Request parameters
* @@target: STRING@@ current translation in text box
* @@caretPos: INT@@ index position of caret cursor
* @@numResults: INT@@ how many results should be retrieved (default: 1)
Response parameters
* @@source: STRING@@ Verified source
* @@sourceSegmentation: SEGMENTATION@@ Verified source segmentation
* @@elapsedTime: INT@@ ms
* @@nbest@@ array of:
** @@target: STRING@@ n-best list of translations
** @@targetSegmentation: SEGMENTATION@@ word to character alignment
** @@elapsedTime: INT@@ ms Time to process each resuls
** @@author: STRING@@ system or person that generated the target result
** @@alignments: ARRAY@@ dimensions: source * target
** @@confidences: [ FLOAT ]@@ word-confidence scores
** @@quality: INT@@ quality (0-100) measure of overall hypothesis
** @@priorities: [ INT ]@@
June 14, 2013, at 02:13 PM by Philipp Koehn -
Changed lines 50-51 from:
* @@source@@ STRING
to:
* @@source STRING@@ input sentence
* @@numResults INT@@ how many results should be retrieved
Changed lines 54-55 from:
* @@nbest [ target: STRING ]@@ n-best list of translations
to:
* @@nbest@@ array of:
** @@target: STRING@@ n-best list of translations
** @@targetSegmentation: SEGMENTATION@@ word to character alignment
** @@elapsedTime: INT@@
** @@author: STRING@@ system or person that generated the target result
** @@alignments: ARRAY@@ dimensions: source * target
** @@confidences: [ FLOAT ]@@ word-confidence scores
** @@quality: INT@@ quality (0-100) measure of overall hypothesis   

Changed lines 65-71 from:
to:
!!!startSession
Request parameters
* @@source STRING@@ input sentence
Response parameters
** @@elapsedTime: INT@@ timestamp (in milliseconds)

Starts interactive prediction session.
June 14, 2013, at 01:46 PM by Philipp Koehn -
Added lines 4-15:

!! Protocol

The interaction between client and server starts with the client opening the connection. It then makes the following requests:
* @@ping@@ to check if there is a successful connection
* @@getServerConfig@@ to obtain information about the server
* @@configure@@ to pass on client side configuration information

Interactive translation prediction starts its dialogue with
* @@decode@@ to obtain the machine translation of the source sentence (and initialize the CAT server for interaction)
* @@startSession@@

June 14, 2013, at 12:19 PM by Philipp Koehn -
Changed lines 40-41 from:
* ???
to:
* @@source@@ echo of request
* @@nbest [ target: STRING ]@@ n-best list of translations
June 13, 2013, at 09:07 PM by Philipp Koehn -
Changed line 7 from:
!!!@@ping@@
to:
!!!ping
Changed line 15 from:
!!!@@configure@@
to:
!!!configure
Changed line 36 from:
!!!@@decode@@
to:
!!!decode
June 13, 2013, at 09:07 PM by Philipp Koehn -
Added lines 1-45:
The CAT server is connected with the user interface via a web socket. In the specification below, the user interface is called the '''client'''. Currently, in CASMACAT, its only manifestation is implemented in JavaScript running in the Internet browser.

A requests from the client will trigger computation on the CAT server, whose result is communicated back asynchronously with a response code that is the request name with an added @@Result@@. For instance, the @@ping@@ request triggers a @@pingResult@@ response.

!! Requests

!!!@@ping@@
Request parameters
* @@ms INT@@: timestamp (in milliseconds)
Response parameters
* @@ms INT@@: echo of received time stamp

Simple check if server is alive and responsive.

!!!@@configure@@
Request parameters
* @@prioritizer "confidence"@@
* @@useAlignments BOOL@@
* @@highlightPrefix BOOL@@
* @@limitSuffixLength BOOL@@
* @@useConfidences BOOL@@
* @@displayMouseAlign BOOL@@
* @@displayCaretAlign BOOL@@
* @@highlightValidated BOOL@@
* @@priorityLength INT@@
* @@highlightLastValidated BOOL@@
* @@mode "ITP"@@
* @@useSuggestions BOOL@@
* @@confidenceThresholds { bad: FLOAT, doubt: FLOAT }@@
* @@displayConfidences BOOL@@'
Response parameters
* ???

Sets configuration how this sentence will be handled.

!!!@@decode@@
Request parameters
* @@source@@ STRING
Response parameters
* ???

Initiates the translation of the sentence. The server will call the MT server to translate the sentence, keep intermediate data structures (such as the search graph) in state, and respond .... somehow.