Class SearchSettings
Represents a set of settings relevant for search opeartions.
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public class SearchSettings
Constructors
SearchSettings()
Initializes a new instance with default values. The default values are:
Declaration
public SearchSettings()
Fields
MinscoreLowerbound
The lower bound of the minimum match score supported by translation memories.
Declaration
public static readonly int MinscoreLowerbound
Field Value
Type | Description |
---|---|
Int32 |
Properties
AdaptiveMachineTranslationLookupMode
Specifies how to use adaptive machine translation.
Declaration
public AdaptiveMachineTranslationLookupMode AdaptiveMachineTranslationLookupMode { get; set; }
Property Value
Type | Description |
---|---|
Adaptive |
AdvancedTokenizationLegacyScoring
Gets or sets whether legacy scores should be calculated for languages that were formerly handled as character sequences rather than parsed into multiple-character tokens. The default is false.
Declaration
public bool AdvancedTokenizationLegacyScoring { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
AutoLocalizationSettings
Gets or sets the translation settings, which contains information about
auto-localizations and other settings specific to the translation process. The
value is only relevant if Compute
Declaration
public AutoLocalizationSettings AutoLocalizationSettings { get; set; }
Property Value
Type | Description |
---|---|
Auto |
CheckMatchingSublanguages
Gets or sets whether the TM should apply strict language direction validation of the search segment or TU. The default is false.
Declaration
public bool CheckMatchingSublanguages { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ComputeTranslationProposal
If true, compute a translation proposal with the match TU and include it in the result. If false, no proposal will be computed or included in the result.
Declaration
public bool ComputeTranslationProposal { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ContextConfirmationLevels
Similarly to Confirmation
Declaration
public ConfirmationLevel[] ContextConfirmationLevels { get; set; }
Property Value
Type | Description |
---|---|
Confirmation |
CurrentStructureContext
Gets or sets the current structure context which is used for the search. May be null.
Declaration
public string CurrentStructureContext { get; set; }
Property Value
Type | Description |
---|---|
String |
Filters
Gets or sets the filters.
Declaration
public List<Filter> Filters { get; set; }
Property Value
Type | Description |
---|---|
List<Filter> |
HardFilter
Gets or sets the hard filter. The hard filter is not evaluated on the storage level yet.
Declaration
public FilterExpression HardFilter { get; set; }
Property Value
Type | Description |
---|---|
Filter |
IsConcordanceSearch
Gets a value indicating whether this instance is used for a concordance search.
Declaration
public bool IsConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsDocumentSearch
Gets or sets whether contextual information should be used during the search.
Declaration
public bool IsDocumentSearch { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
MachineTranslationLookup
Specifies when to use machine translation.
Declaration
public MachineTranslationLookupMode MachineTranslationLookup { get; set; }
Property Value
Type | Description |
---|---|
Machine |
MaxResults
Gets or sets the maximum number of results to be retrieved by the search.
The minimum accepted value for MaxResults is 1.
Declaration
public int MaxResults { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
MinScore
Gets or sets the minimum score for retrieving the results.
Any candidates with a score lower than MinScore are not returned by the search.
The minimum accepted value for MinScore is Minscore
Declaration
public int MinScore { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Mode
Gets or sets the search mode.
Declaration
public SearchMode Mode { get; set; }
Property Value
Type | Description |
---|---|
Search |
Penalties
Gets or sets the penalties.
Declaration
public List<Penalty> Penalties { get; set; }
Property Value
Type | Description |
---|---|
List<Penalty> |
QuickInsertIds
Lists of quick insert TagIDs that are present in the document that holds the search segments key is FileId, value is list of quickInsertIds for that document/file
Declaration
public IDictionary<string, IList<string>> QuickInsertIds { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<String, IList<String>> |
SortSpecification
Gets or sets the sort specification.
Declaration
public SortSpecification SortSpecification { get; set; }
Property Value
Type | Description |
---|---|
Sort |
Methods
AddFilter(Filter)
Adds the supplied filter to the list of filters.
Declaration
public void AddFilter(Filter filter)
Parameters
Type | Name | Description |
---|---|---|
Filter | filter | A Filter |
AddPenalty(PenaltyType, Int32)
Adds the specified penalty to the list of penalties, unless already present (in which case nothing happens).
Declaration
public void AddPenalty(PenaltyType pt, int malus)
Parameters
Type | Name | Description |
---|---|---|
Penalty |
pt | The penalty type |
Int32 | malus | The malus (> 0) |
FindFilter(String)
Attempts to find the filter with the specified name.
Declaration
public Filter FindFilter(string filterName)
Parameters
Type | Name | Description |
---|---|---|
String | filterName | The name fo the filter to be found. |
Returns
Type | Description |
---|---|
Filter | The filter object with that name; or null if none was found. |
FindPenalty(PenaltyType)
Retrieves a penalty of a specified type.
Declaration
public Penalty FindPenalty(PenaltyType pt)
Parameters
Type | Name | Description |
---|---|---|
Penalty |
pt | The penalty type. |
Returns
Type | Description |
---|---|
Penalty | The penalty object, if exists, otherwise null. |
RemoveFilter(String)
Attempts to remove the filter with the specified name.
Declaration
public bool RemoveFilter(string filterName)
Parameters
Type | Name | Description |
---|---|---|
String | filterName | The name of the filter to be removed. |
Returns
Type | Description |
---|---|
Boolean | true if the filter has been found and removed; false otherwise. |
RemovePenalty(PenaltyType)
Removes the specified penalty from the list of penalties, if present (otherwise nothing happens).
Declaration
public void RemovePenalty(PenaltyType pt)
Parameters
Type | Name | Description |
---|---|---|
Penalty |
pt | The penalty type |