Setting threashold for fuzzy search results over MultiTerm Termbases

Hi,

I am trying to give my language provider plugin access to the termbases. 

The only way I found to access the entries of termabes is via search in a Sdl.MultiTerm.TMO.Interop.Termbase.

After loading the termbase I am initializing a search with

TermbaseSearch search = termbase.Search;
search.MaximumHits = 10;
search.FuzzySearch = true;
search.SourceIndex = someSourceLanguage;

And then I search via

HitTerms oHits = search.Execute();

But I did not find a way to set the threashold for the fuzzy search.
My goal is to find terms that are similar e.g. plural form of a term. But i do not want to get terms that are really different from my search term. At the moment this is the case. I have an entry in a termbase for the german word "Leiden" but it also finds this term when I search for "denn" or "denen". 
Is there an easy way to set the threshold? 

If not, could you recommend something to achieve my goal? I am not set on using the termbase search i can use something else.

Best,

Lukas

Parents
  • Hello,

    it comes from project settings (Project settings -> Language pairs -> (All languages pairs) -> Termbases -> Search settings -> Minimum match value). Users have to configure it manually or it could be possible to change the project settings by API (not for one search but overall).

    You can also develop custom search (load terms from termbase and execute your own search).

    Helena

  • Hello Helena, 

    thank you for the reply!
    I tried to set the minimum match value in the settings like you described but the behavior still did not change for the fuzzy search. I set it to 100% but it still finds other terms.
    Could you tell me how I can access the project settings from my plugin? I could not find a controller class or something similar for it.
    If I can not set the fuzzy search threshold I will probably develop a custom search.

    Lukas

  • Hello,

    I'm not sure why it doesn't work for you — 100% should be an exact match of the strings (it works for me).

    I access the project settings like this:

    public ProviderSettings ProviderSettings { get; set; }
    private ProjectsController _projectsController = null;
    private ProjectsController ProjectsController => _projectsController ?? (_projectsController = SdlTradosStudio.Application.GetController<ProjectsController>());
    private FileBasedProject GetProject() => ProjectsController.CurrentProject;

    ...
    var currentProject = GetProject();
    var projectInfo = currentProject.GetProjectInfo();

    termbase settings:

    TermbaseService.GetTermbaseConfiguration()


    Helena



Reply
  • Hello,

    I'm not sure why it doesn't work for you — 100% should be an exact match of the strings (it works for me).

    I access the project settings like this:

    public ProviderSettings ProviderSettings { get; set; }
    private ProjectsController _projectsController = null;
    private ProjectsController ProjectsController => _projectsController ?? (_projectsController = SdlTradosStudio.Application.GetController<ProjectsController>());
    private FileBasedProject GetProject() => ProjectsController.CurrentProject;

    ...
    var currentProject = GetProject();
    var projectInfo = currentProject.GetProjectInfo();

    termbase settings:

    TermbaseService.GetTermbaseConfiguration()


    Helena



Children
No Data