You are currently working on UAT 

Why translation memory provider didn't support highlight function?

Hi,

We all know that SDL local file TM support hightlight the differences between the input text and the returned source text, just like this:

Screenshot of Trados Studio showing highlighted differences between input text and returned source text in a translation memory comparison.

Howerver, Our plugin which implements translation provider function can't display the difference, the result is:

Screenshot of Trados Studio with a plugin translation provider function that fails to display differences, showing identical source and target text without highlights.

Is there any method to achieve this function?

I have tried to implement the  EditDistance function like this.

private EditDistance getEditDistance(CultureInfo cultureInfo, String text, String source)

{

TokenizerSetup setup = new TokenizerSetup();

setup.Culture = cultureInfo;

TokenizerParameters parameters = new TokenizerParameters(setup, null);

Tokenizer tokenizer = new Tokenizer(parameters);

List<Token> textTokenList = tokenizer.Tokenize(text);

List<Token> sourceTokenList = tokenizer.Tokenize(source);

EditDistanceComputer<Token> editDistanceComputer = new EditDistanceComputer<Token>(null);

return editDistanceComputer.ComputeEditDistance(sourceTokenList, textTokenList);

}

ComputeEditDistance=> Exception: The object reference was not set to an instance of the object.

searchResult.ScoringResult.EditDistance

Can you give me a detailed explanation:

    searchResult.ScoringResult.EditDistance
How is EditDistance calculated?



Generated Image Alt-Text
[edited by: Trados AI at 5:11 PM (GMT 0) on 28 Feb 2024]
emoji
Parents Reply Children
No Data