resources/segments/finder/memories/search
Returns the translation finder details for a scope. The scope defines which resources are accessible and can be searched.
URL
(POST) /resources/segments/finder/memories/search
PARAMETERS
The message body contains a JSON object:
scope | The scope object. It delimits the total range of segments and related resources that can be operated on. | Mandatory object |
txt | The text to search. | Mandatory string |
sid | Optional segment for which we search. If set then the system excludes the segment itself from the search results. Recommended. | Optional int |
src | The source language code. | Mandatory string |
trg | The target language code. | Mandatory string |
hprev | Optional. The hash code of the previous segment if available (can be null). If specified then the finder is capable of telling if a hit is an in-context match (110% hit). Note: Only use the hash codes if the resource is a "Document". With memories or termbases, the segments have no logical order. | Optional int? |
hnext | Optional. The hash code of the next segment if available (can be null). If specified then the finder is capable of telling if a hit is an in-context match (110% hit). | Optional int? |
ctx | Optional context of the segment. In combination with tmhits.ctxboost, setting the context permits to promote hits that match the context of the searched segment. | Optional string? |
sim | Optional. Similarity threshold between 40 and 110. If not specified, the threshold is set to 80. | Optional int? |
tmhits | Optional. Specifies how top hits are selected and further permits to apply filters on various properties such as status, bookmarks, context, change date and so on. "tmhits": { "filter": [ { "field": "st", "values": [ 1 ] }, { "field": "bk", "values": [ 1, 2 ] } ], "ctxboost": null } Read details here: | Optional, object? |
token | The finder token. The first time you call a finder method you do not yet have a token. It is included with each call and you can then reuse it for subsequent calls. Doing so substantially optimizes performance of all finder methods. | Optional, string |
RESULTS
The properties are:
results | An array with the found hits. See below. | object[] |
Each hit in results has these properties:
scr | An internal score for the hit. This score takes into account the similarity of the text and, if enabled, the similarity of the segment context/key. For internal use. | decimal |
sim | The text similarity of the hit in percent. A value either 0 (not a context match) or 100 (is a context match) | int |
simctx | The context/key similarity. A percentage between 0 or 100 | int |
hty | The type of hit:
| int |
isr | The reliability of the hit's translation:
| int |
pen | Any penalties applied to the similarity (sim). Value of 5 means we deduced 5% points from original similarity. Penalties are configured in a resource's Search Settings page. | int |
dbl | Number of doubles. If the exact same hit was found multiple times it is returned only once. This number indicates the total amount of doubles. | int |
nol | Non overlapping term hit (hty = 2). For a given segment the system may find a large number of terms. The system then identifies those terms that do not overlap, for example if the hits's words are colored in the original text. | bool |
mks | Array of regions in the original text that differ from the hit's source text. Used to color highlight text differences. Optional array:
| object[] |
regp regl | The character start position and length in the original text that entirely spans the hit source text. Only populated with term hits. | int? int? |
seg | An object with hit segment level properties:
| object |
src | An object with the hit's source text details:
| object |
trg | An object with the hit's translation details:
| object |
EXAMPLES
N/A
Copyright Wordbee - Buzzin' Outside the Box since 2008