resources/segments/actions/fixmarkup
Provides a method to fix the markup of a segment.
The algorithm takes into account the segment's text and those of its siblings. These are all segments that share the same "bee segment id".
Therefore you may receive fixes for multiple segments in the results. If you are only interested in the fixes for the requested "sid" then simply disregard any results for other "sid" values.
URL
(POST) /resources/segments/actions/fixmarkup
PARAMETERS
The parameters are a JSON object included in the request body:
scope | The scope object. | Mandatory |
sid | The segment id. | Mandatory |
locale | The language. Note that you cannot have the markup of the source language text. Passing the source language will return an error. | Mandatory |
allowDuplicateTags | Default is false. If true then we allow the very same markup elements to appear multiple times in the translation. | Optional |
Â
RESULTS
A JSON with these properties:
corrections | An array of corrections. If there are no fixes required, the array is empty. | object[] |
Â
The elements in "corrections" have this structure:
current | True if this is the correction for the segment passed to the method (that is method parameter "sid" is equal to property "sid" below) | object[] |
sid | The segment id. | int |
bsid | The "bee segment id". This is always 0 for memories and termbases. All segments in the list of corrections share the exact same value. | int |
bssid | The "bee subsegment id". This is always 0 for memories and termbases. | int |
txtt | The translated text prior to correction | string |
txttfixed | The translated text after correction | string |
Â
Â
EXAMPLE
-
Â
Â
Â
Â
Copyright Wordbee - Buzzin' Outside the Box since 2008