Segment Details (Object)

This page describes the JSON structure and properties of a segment in a search result.

See also the method to retrieve results: resources/segments/view/get

PROPERTIES

A segment has these properties:


Identifiers
sidThe unique segment identifier.
no

The sequential segment number. Used with documents and project memories only. Not assigned with translation memories and term bases.

It is composed of the sequential segment number and an optional sub segment number (in case the segment has been segmented).

Numbers for a segment split into three sub-segments: 100, 100-2, 100-3

int
tsLast date/time the segment was updated. The timestamp was introduced in the course of 2018 and therefore the field may be null for older segments.date?
bsidThe sequential segment number. Used with documents and project memories only. Value is 0 for other resource types.int
bssidThe sequential sub-segment number. Assigned if a segment (bsid) was segmented into smaller sub-segments. The number is always sequential starting at 0.int
didThe unique document identifier. A segment is always part of a document. With memories and term bases the document groups segments imported or consolidated together.int
dsidThe unique resource identifier. Each document and segment is part of a resource. Resources can be project memories, translation memories or term bases.int
cty

The resource type:

  • 1: Project memory
  • 2: Translation memory
  • 3: Terminology database
int
sdidThe sub document number. When translation certain file types such as Powerpoint, segments may be further grouped by "sub document". With Powerpoint files, each slide corresponds to a separate sub-document. Null if the segment is not part of any sub-document.int?

Segment level properties
tags

Information on markup in the segment if any. Markup information is encoded as a string using Unicode characters 0x1 and 0x2 as separation codes.


string?
tmx

Array of segment-level TMX or extended properties. Each element has these properties:

  • id: Numeric property id (int)
  • t: The value of the property (string)

The title, description and other details can be obtained here: <reference to be added>.


object[]
edit

Boolean indicating if row properties can be changed or not by the user.

This depends on the type of resource, the user profile, the scope and object we are looking at, business rules and more. For example, a regular user may not change a segment if the scope is for a job and the job has been completed.

bool



ctxThe segment context string. This typically provides contextual information such as "Heading 1", "Table cell" etc.string?
ctx_editIndicates if the context field can be edited by the user.bool
chminOptional minimum character length constraint.int?
chmaxOptional maximum character length constraint.int?
ch_editIndicates if chmin and chmax can be changed by the user.bool
lbls

An array of labels (tags) assigned to the segment. Each item has these properties:

  • id: The numeric identifier of the label
  • value: The numeric label value.
  • sav: A boolean. True if the label is "sticky". Sticky refers to labels that are attached to the segment by default.


The title, description and other details can be obtained here: <reference to be added>.

Note: Only those data are included to which the current user has access.

object[]
lbls_editIndicates if lbls can be changed by the user.bool
cfs

An array of custom fields assigned to the the segment.

Note: Only those data are included to which the current user has access.

object[]
cfs_editIndicates if cfs can be changed by the user.bool




Columns for source text, translations and other information



cols

An object that has one property per column. Columns may exist for source text, translation in one or more languages, text revisions, custom fields and many more columns. If you open the Wordbee translation editor you can define any number of columns and decide which column shall contain which information.

Columns are assigned a sequential number starting at 0 and as per layout. The first column is 0, the next 1 and so on. Column numbers are prefixed by an underscore.

An example of 2 columns:

"cols": {
    "_0": { "column": 0,  ***  },
    "_1": { "column": 1,  ***  },
    "_2": { "column": 2,  *** }
}

See table below for column properties.

object[]




Columns - cols array elements

The "cols" property is a dictionary of columns. Each column is of specific type as defined in the layout. The properties included with the results depend on the type.

Each element has these properties:

columnThe sequential column number starting at 0.int
*All properties are column dependent. A column containing a translation will have different properties than a column showing custom fields.


Source/Translation (column type 1)

A column of type source text or translation. See Spreadsheet Layout (Object). This column is associated to a language.

columnThe sequential column number starting at 0.int
txtAn object with all text propertiesstring?
txt.locThe locale of the text (i.e. the language code)string
txt.valThe text valuestring?
txt.stThe status gray (0), green (1) or red (2).int
txt.bkThe bookmark gray (0), blue (1) or red (2).int
txt.tskIf the text was set in the framework of a job then this field contains the task type (TR, RV, PROOF...)string?
txt.cmcThe number of comments attached to this segment.int
txt.edSpecifies who last changed the text. See Last Editor (Enumeration)int
txt.mtidIf a machine translation then this (may) contain the MT profile ID used.int?
txt.usidIf the last editor of the text is a human then this field stores the user's ID.int?
txt.usdtIf the last editor of the text is a human then this field stores the date of the last change.datetime?
txt.hhIndicates if there is a revision history.bool
txt.sim

A value is set by the word count operation if the value is a pre-translation.

The value is 0 by default. Depending on the word count setup, values may be 110, 100 or any value between 50 and 100 (fuzzy pre-translations).

int
txt.rsid

If the segment was pre-translated from a memory hit (typically during the word count) then this field contains the leveraged segment ID.

When the text is edited, the property is reset to null but rsid can be found back in the revision history.

int?
txt.errA QA error informationstring?
txt.lckIndicates if the text is locked for editing.bool
txt.lck_editIndicates if the current user can lock or unlock this text.bool
txt.cfs

An array of custom fields assigned to the this text.

Note: Only those data are included to which the current user has access.

object[]
txt.cfs_editIndicates if cfs can be changed by the user.bool
txt.usfidThe user who last changed either status, bookmark or lock.int?
txt.usfdtThe date when a user last changed either status, bookmark or lock.datetime?

Available with segments from terminology databases only:
txt.var

Optional code for the term variant. In term bases, each text may have multiple variants: plural, singular, synonym... The variant code is optional and user defined.

Context: With term bases a user can add multiple texts (the present record) to each language. NOTE: This feature is available from Q4/2018.

string?
txt.defOptional definition of the term.string?
txt.speechOptional part of speech information for the term.string?
txt.alts

List of alternative terms. This property exists with term base segments only.

Each element is a txt element itself.


txt.sentOptional sentiment analysis score between -10 (negative) and 10 (positive). This value is set manually or using a sentiment analysis system (to be enabled under "Settings" > "Sentiment Analysis". Null means that no score was set.int?
txt.sentdtIf txt.sent is set then this is the date when the score was calculated. If this date is anterior to txt.usdt then the text was changed any (potentially) may require recalculating the score. datetime?


Segment context (column type 2)

The segment context string. This typically provides contextual information such as "Heading 1", "Table cell" etc. This column is associated to the segment and language idenpendent.

columnThe sequential column number starting at 0.int
ctxThe context as a stringstring?
ctx_editIndicates if the user can edit the column.bool



Status (column type 3)

The source text or translation status. This column is associated to a language.

columnThe sequential column number starting at 0.int
st

The status or the source text or translation.

Values are: gray (0), green (1) or red (2).

int
st_editIndicates if the user can edit the column.bool


Last editor (column type 4)

Specifies who last changed the source text or translation. This column is associated to a language.

columnThe sequential column number starting at 0.int
edSpecifies who last changed the text. See Last Editor (Enumeration)int
ed_editIndicates if the user can edit the column.bool


Lock status (column type 5)

Shows if the source text or translation is locked for editing. This column is associated to a language.

columnThe sequential column number starting at 0.int
lckBoolean indicating if text is locked for editing (true).bool
lck_editIndicates if the user can edit the column.bool


Bookmark (column type 6)

The source text or translation bookmark. This column is associated to a language.

columnThe sequential column number starting at 0.int
bkThe bookmark gray (0), blue (1) or red (2).string?
bk_editIndicates if the user can edit the column.bool


Custom field (column type 7)

A segment level or language level custom field value. This column shows the value of one specific custom field (as per layout definition).

columnThe sequential column number starting at 0.int
cfThe context as a string. Null if not set.string?
cf_editIndicates if the user can edit the column.bool


Label (column type 8)

A segment level or language level label with label ID and its numeric value. This column shows the value of one specific label for the segment or a specific language (as per layout definition).

columnThe sequential column number starting at 0.int
lbl

An object with these properties:

  • id: The label's unique ID.
  • value: The label's numeric value.
object
lbl_editIndicates if the user can edit the column.bool


Comments (column type 9)

The comments for a specific language (source text or translation).

columnThe sequential column number starting at 0.int
cms

An array of comments attached to the source text or translation.

See Comment (Object) for properties.

object[]
cms_editIndicates if the user can edit the column.bool


Memory hits (column type 10)

Translation memory hits for the source text or a specific translation.

columnThe sequential column number starting at 0.int
hitsNOT IMPLEMENTED-
hits_editIndicates if the user can edit the column. Always false as memory hits cannot be edited.bool


New comment (column type 11)

A "placeholder" column. In the translation editor we show an editable field to add a new comment to a language upon save.

columnThe sequential column number starting at 0.int
cmnew

Always null.

This column type is for saving new comments to a language. It does not return any information.

string?
cmnew_editTrue if the user can submit a new comment for this segment.bool


Revisions (column type 12)

The revisions in a specific language.

columnThe sequential column number starting at 0.int
revs

An array with the revision history.

See Segment Change (Object) for properties.

object[]
revs_editAlways false.bool


QA errors (column type 13)

A string with QA errors in a specific language.

columnThe sequential column number starting at 0.int
errA string with all QA errors.string?
err_editIndicates if the user can edit the column.bool


TMX/Extended properties (column type 14)

Any additional TMX or extended properties attached to either the segment or a specific language.

columnThe sequential column number starting at 0.int
tmx

Array of segment-level TMX or extended properties. Each element has these properties:

  • id: Numeric property id (int)
  • t: The value of the property (string)

The title, description and other details can be obtained here: <reference to be added>.

string?
tmx_editIndicates if the user can edit the column and add, remove or change properties.bool






EXAMPLES


{
	"ty": "text",
	"current": true,
	"val": "Corrected translation",
	"tsk": null,
	"ed": 1,
	"dt": "2017-04-07T07:39:11.2253404Z",
	"uid": null,
	"loc": "en"
},
{
	"ty": "text",
	"current": false,
	"val": "Corrected translation",
	"tsk": null,
	"ed": 1,
	"dt": "2017-04-07T07:39:11.2253404Z",
	"uid": null,
	"loc": "en"
},
{
	"ty": "flags",
	"current": true,
	"tsk": null,
	"dt": "2017-02-14T09:42:50.0220044Z",
	"uid": 7,
	"loc": "en",
	"st": 1,
	"bk": 0
}

   
 

Copyright Wordbee - Buzzin' Outside the Box since 2008