Search Results for

    Show / Hide Table of Contents

    Class SearchSettings

    Represents a set of settings relevant for search opeartions.

    Inheritance
    object
    SearchSettings
    SubsegmentSearchSettings
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    [DataContract]
    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
    int

    Properties

    AdaptiveMachineTranslationLookupMode

    Specifies how to use adaptive machine translation.

    Declaration
    [DataMember]
    public AdaptiveMachineTranslationLookupMode AdaptiveMachineTranslationLookupMode { get; set; }
    Property Value
    Type Description
    AdaptiveMachineTranslationLookupMode

    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
    [DataMember]
    public bool AdvancedTokenizationLegacyScoring { get; set; }
    Property Value
    Type Description
    bool

    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 ComputeTranslationProposal is true, and never relevant for concordance searches. NOTE that this object is not created by default by the constructor of the class.

    Declaration
    [DataMember]
    public AutoLocalizationSettings AutoLocalizationSettings { get; set; }
    Property Value
    Type Description
    AutoLocalizationSettings

    CheckMatchingSublanguages

    Gets or sets whether the TM should apply strict language direction validation of the search segment or TU. The default is false.

    Declaration
    [DataMember]
    public bool CheckMatchingSublanguages { get; set; }
    Property Value
    Type Description
    bool

    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
    [DataMember]
    public bool ComputeTranslationProposal { get; set; }
    Property Value
    Type Description
    bool

    ContextConfirmationLevels

    Similarly to ConfirmationLevels, when searching with TUs, those whose ConfirmationLevel does not match an element in this array do not generate context for their neighbour(s) when the TM context type is PrecedingSourceAndTarget. No effect when empty/null.

    Declaration
    [DataMember]
    public ConfirmationLevel[] ContextConfirmationLevels { get; set; }
    Property Value
    Type Description
    ConfirmationLevel[]

    CurrentStructureContext

    Gets or sets the current structure context which is used for the search. May be null.

    Declaration
    [DataMember]
    public string CurrentStructureContext { get; set; }
    Property Value
    Type Description
    string

    Filters

    Gets or sets the filters.

    Declaration
    [DataMember]
    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
    [DataMember]
    public FilterExpression HardFilter { get; set; }
    Property Value
    Type Description
    FilterExpression

    IsConcordanceSearch

    Gets a value indicating whether this instance is used for a concordance search.

    Declaration
    public bool IsConcordanceSearch { get; }
    Property Value
    Type Description
    bool

    IsDocumentSearch

    Gets or sets whether contextual information should be used during the search.

    Declaration
    [DataMember]
    public bool IsDocumentSearch { get; set; }
    Property Value
    Type Description
    bool

    MachineTranslationLookup

    Specifies when to use machine translation.

    Declaration
    [DataMember]
    public MachineTranslationLookupMode MachineTranslationLookup { get; set; }
    Property Value
    Type Description
    MachineTranslationLookupMode

    MaxResults

    Gets or sets the maximum number of results to be retrieved by the search.

    The minimum accepted value for MaxResults is 1.

    Declaration
    [DataMember]
    public int MaxResults { get; set; }
    Property Value
    Type Description
    int

    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 MinscoreLowerbound.

    Declaration
    [DataMember]
    public int MinScore { get; set; }
    Property Value
    Type Description
    int

    Mode

    Gets or sets the search mode.

    Declaration
    [DataMember]
    public SearchMode Mode { get; set; }
    Property Value
    Type Description
    SearchMode

    Penalties

    Gets or sets the penalties.

    Declaration
    [DataMember]
    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
    [DataMember]
    public IDictionary<string, IList<string>> QuickInsertIds { get; set; }
    Property Value
    Type Description
    IDictionary<string, IList<string>>

    SortSpecification

    Gets or sets the sort specification.

    Declaration
    [DataMember]
    public SortSpecification SortSpecification { get; set; }
    Property Value
    Type Description
    SortSpecification

    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, int)

    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
    PenaltyType pt

    The penalty type

    int 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
    PenaltyType 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
    bool

    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
    PenaltyType pt

    The penalty type

    In this article
    • Constructors
      • SearchSettings()
    • Fields
      • MinscoreLowerbound
    • Properties
      • AdaptiveMachineTranslationLookupMode
      • AdvancedTokenizationLegacyScoring
      • AutoLocalizationSettings
      • CheckMatchingSublanguages
      • ComputeTranslationProposal
      • ContextConfirmationLevels
      • CurrentStructureContext
      • Filters
      • HardFilter
      • IsConcordanceSearch
      • IsDocumentSearch
      • MachineTranslationLookup
      • MaxResults
      • MinScore
      • Mode
      • Penalties
      • QuickInsertIds
      • SortSpecification
    • Methods
      • AddFilter(Filter)
      • AddPenalty(PenaltyType, int)
      • FindFilter(string)
      • FindPenalty(PenaltyType)
      • RemoveFilter(string)
      • RemovePenalty(PenaltyType)
    Back to top Generated by DocFX