TM Filters and Sort (Object)
Not yet released
This JSON object customizes how top hits are selected and further permits to apply filters on various properties such as status, bookmarks, context, change date and so on.
The object is generally accessible as the tmhits property in API methods:
- Searching translation memory hits: resources/segments/finder/memories/search
- Batch pre-translate from memories: Memory Translate Action
- Export segments to Excel, Word and Xliff (to include memory hits)
Important notice:
The tmhits filter and sort options are only available if the tmhitsEnabled property is true in the rights properties. Until end of 2018, this will be the case for all customers.
Default values:
All properties below are optional.
Presets can be specified in word count profiles in Wordbee Translator (and thus be linked to projects and jobs).
The preset values are available when getting the access rights details: Rights (Object)
PROPERTIES
The properties are:
ctxboost | Optional. Specifies to what extent a matching context promotes a hit in the search results.
With this setting you can give additional boost to hits that have the same context value as the segment being searched. The context of a segment typically contains formatting information such as "Heading 1", "Hyperlink" etc. or, when localizing software, string IDs or keys. Specifically with software localization this setting should be increased.
CODE
| int? Optional |
filters | Optional array of filters on various properties such as status, bookmarks, context, change date and so on. Example:
CODE
See below. | object[]? Optional |
Filters
Each array element of filters has a field property which defines the field in a segment or language to be filtered.
The
Field property | Description of filter |
st | To filter by status of the source text or translation. The mandatory values property is an array of statuses:
The optional language property can have these values:
Example:
CODE
|
bk | To filter by bookmark of the source text or translation. The mandatory values property is an array of bookmarks:
The optional language property can have these values:
CODE
|
ctx | To filter by the context of a segment. The mandatory values property is a list of strings to match. The filter is case sensitive. The optional mode property permits values infix and prefix. By default prefix is used. Example for matching hits with context containing either "alpha" or "beta".
CODE
The optional not filter permits to find all segments that do not have any of the specified contexts:
CODE
|
lbls | NOT IMPLEMENTED Optional list of labels to match. The id is the label's unique ID. The values property contains zero, one or more label values. If the values array is empty then the search returns hits without any label value set only. The optional language property can have these values:
CODE
|
usdt | To filter by last change date of source text or translation. The optional gte (edit at or after date) and lt (edit before date) permit to delimit the wanted date of change. Dates must be ISO formatted:
CODE
The optional language property can have these values:
|
ed | To filter by the last editor of the source text or translation: Human edit, Pre-translation, Machine translation etc. The mandatory values property is a list of last editor values. See Last Editor (Enumeration)
CODE
The optional language property can have these values:
|
EXAMPLES
Retains translations without error and blue bookmark:
"filter": [
{ "field": "st", "values": [ 0, 1 ], "language": "trg" },
{ "field": "bk", "values": [ 1 ], "language": "trg" }
]