I'm using the Trados Studio SDK to automate the creation of projects, and part of this involves running the analysis.
What's confusing me is when the AnalysisTaskSettings
class can be used, and how it gets its values.
The When question:
While creating the project I specify a list of tasks, one of which is Sdl.ProjectApi.AutomaticTasks.Analysis
. But I can't see how this would accept an argument of type AnalysisTaskSettings
. As far as I can tell it has to be run with the default or template's settings.
Later on, once the project has been created, I can request the analysis results, and at this point I can specify an AnalysisTaskSettings
object. Does it matter that the analysis has already been run?
The How question:
Here's how I'm getting the analysis settings...
var analysisSettings = settings.GetSettingsGroup<AnalysisTaskSettings>();
I've found that if I step through the code and check the value of analysisSettings.ReportCrossFileRepetitions
then it's set to TRUE. But hang on... I've already that to FALSE in the template...
And here it is in the XML of the template...
And yet when I break in the code I can see...
...not only is it set to TRUE, it also shows me the XML element and it value, contradicting what I see in the XML. The same is true of the fuzzy match leverage...
Trados also has its own copy of these settings (File > Options > Language Pairs) but these are also set to FALSE.
So where is the value of TRUE coming from if not the template or Trados?
To summarise: It looks to me like the cross-file repetitions are always being counted, even if I set Trados, the template and the AnalysisTaskSettings
object to not count these - same for the fuzzy match leverage. How can I tell Trados not to count these?
Generated Image Alt-Text
[edited by: Trados AI at 1:20 PM (GMT 0) on 5 Mar 2024]