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
sidThe 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[]
sidThe segment id.int
bsidThe "bee segment id". This is always 0 for memories and termbases. All segments in the list of corrections share the exact same value.int
bssidThe "bee subsegment id". This is always 0 for memories and termbases.int
txttThe translated text prior to correctionstring
txttfixedThe translated text after correctionstring

 

 

EXAMPLE

-

 

 

 

 

Copyright Wordbee - Buzzin' Outside the Box since 2008