Class SortDisambiguator
Disambiguator to identify the sort order, by comparing two search results.
Ambiguation occurs when the match results are qualified as being identical, which would require
further elaboration to establish which result is more significant, taking into consideration
the presedence of the translation providers, from where the results are derived.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public class SortDisambiguator
Constructors
SortDisambiguator(SortSpecification, SortDisambiguator.Disambiguator)
Disambiguator to identify the sort order, by comparing two search results.
Declaration
public SortDisambiguator(SortSpecification sortCriterium, SortDisambiguator.Disambiguator disambiguator)
Parameters
Type | Name | Description |
---|---|---|
SortSpecification | sortCriterium | criteria used for sorting translation units. |
SortDisambiguator.Disambiguator | disambiguator | a disambiguator which is called if the sort criteria does not sufficiently define the sort order between two search result objects. |
Methods
Disambiguate(Int32, SearchResult, SearchResult)
Identifies the sort order, by comparing a
against b
Declaration
public int Disambiguate(int comparisonResult, SearchResult a, SearchResult b)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | comparisonResult | The initial comparison result recovered from the Sorter. |
SearchResult | a | The first SearchResult to compare. |
SearchResult | b | The second SearchResult to compare. |
Returns
Type | Description |
---|---|
System.Int32 | Less than zero if x is less than y, zero if x equals y, greater than zero if x is greater than y. |