Class SearchResult
Encapsulates the result of a search operation, a memory translation unit, possiby annotated with score, placeables and context information.
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public class SearchResult
Constructors
SearchResult(TranslationUnit)
Initializes a new instance of the SearchResult class.
Declaration
public SearchResult(TranslationUnit tmTu)
Parameters
Type | Name | Description |
---|---|---|
TranslationUnit | tmTu | The translation unit found by the search operation. |
Properties
CascadeEntryIndex
Gets or sets the cascade entry index.
Declaration
public int CascadeEntryIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The cascade entry index corresponds to a position in the cascade's cascade entries list (Cascade.CascadeEntries). If the cascade entry index is -1 then the search result was not created in a cascade.
ContextData
Gets or sets the context information for this translation unit.
Declaration
public TuContext ContextData { get; set; }
Property Value
Type | Description |
---|---|
TuContext |
MatchingPlaceholderTokens
Gets or sets the matching tokens. MatchingPlaceholderTokens attribute counts the number of placeholders that match by value. Upon comparing two segments, if the placeholders value is different, the Scorer will still give 100% match, even if the placeholders value is different for example:
- first segment: {Birth}{' '}{year}{' '}{is}{' '}{NumberToken(1980)}
- second segment: {Birth}{' '}{year}{' '}{is}{' '}{NumberToken(1985)} The above segments will be considerred equal, even if they are not. This info is used upon ordering of TM entries so that on the first position to appear the segment that match by token value too
Declaration
public int MatchingPlaceholderTokens { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
This field is used internally upon ordering of TM entries so that on the first position to appear the segment that match by token value too.
MemoryPlaceables
Gets or sets the list of placeables which are found in the memory segment.
Declaration
public List<Placeable> MemoryPlaceables { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Placeable> |
MemoryTranslationUnit
The translation unit found by the search, used to compute the translation proposal.
Declaration
public TranslationUnit MemoryTranslationUnit { get; set; }
Property Value
Type | Description |
---|---|
TranslationUnit |
MetaData
Used in various flows to hold data related to SearchResult
Declaration
public Dictionary<string, object> MetaData { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
PlaceableAssociations
Gets or sets the list of placeables which are found in the memory segment.
Declaration
public List<PlaceableAssociation> PlaceableAssociations { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PlaceableAssociation> |
ScoringResult
Gets or sets the scoring for this result.
Declaration
public ScoringResult ScoringResult { get; set; }
Property Value
Type | Description |
---|---|
ScoringResult |
TranslationProposal
Gets or sets the translation proposal TU, which is a copy of the memory translation unit in which all placeables have been resolved.
Declaration
public TranslationUnit TranslationProposal { get; set; }
Property Value
Type | Description |
---|---|
TranslationUnit |