Hello,
I am using Trados Studio 2024 (not SR1) and I have another question.
After getting the search with the TerminologyProviderManager Singleton to work (see the answers in this question) I noticed some strange behavior.
My goal is to get the scores for terms like they are displayed in the "Term Recognition" view in the Editor UI. Ideally I want to put the whole segment string in and get the scores.
When I search via ITerminologyProivder.Search() the scores never line up. Even if I put in only a single term it only lines up when there is a 100% match.
When I put in a longer sentence the score for the best fitting term decreases with the length of the sentence.
For example see this code from the other question:
var sourceLanguage = new CultureInfo("en-US"); var targetLanguage = new CultureInfo("de-DE"); string segmentText = "..."; int maxResultsCount = 10; bool targetRequired = true; var searchResults = terminologyProvider.Search( segmentText, sourceLanguage, targetLanguage, maxResultsCount, SearchMode.Fuzzy, targetRequired );
If I have a Termbase with the word "Gefahrstoff" in it and when I set the segmentText to "Gefahrstoff" the top searchResult has a score of 100.
If i set the segmentText to "Gefahrstoffen" it has a score of 90. In the Term Recognition view in the Editor UI, "Gefahrstoff" has a Score of 87. The sentence in the Editor is "Die Nutzung von Gefahrstoffen ist gefährlich".
When I set the segmentText to "Die Nutzung von Gefahrstoffen ist gefährlich" the term "Gefahrstoff" has only a score of 63.
Do i really need to parse the thext and search for each token? I would like to avoid doing that. And even if i did that the scores do not line up.
Is there any method for getting the same scores?
Best,
Lukas