SegmentEditDistanceComputer: diagonalOnly == true but sourceTokens.Count != targetTokens.Count

Good afternoon,

after last sw update, when I confirm a segment the following message error appears:

SegmentEditDistanceComputer: diagonalOnly == true but sourceTokens.Count != targetTokens.Count

What does it mean?

 

Thank you in advance and regards,

Giada

Parents
  • Hello  ,

    Despite the error message, are you still able to confirm the segment and is this being added to the TM?

    Could you post the full error stack please- this may help find the issue-

    Error dialog box with red cross icon, 'Click here' button highlighted in Trados Studio, and 'Advanced Editing Options' in red outline.

    Also it might help, if you could let us know where you are saving to- a local TM or server.

    Oana Nagy | QA Engineer | RWS Group

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 8:53 PM (GMT 0) on 28 Feb 2024]
  • Hi Steve
    I have just seen it for the first time: it comes up after merging segments across a hard return. The source file is Word and the offending text is in text boxes. The merged segment appears to confirm OK and be saved to the TM.
    Error stack:
    <?xml version="1.0"?>

    -<SDLErrorDetails time="22/10/2018 15:11:43">

    <ErrorMessage>SegmentEditDistanceComputer: diagonalOnly == true but sourceTokens.Count != targetTokens.Count</ErrorMessage>


    -<Exception>

    <Type>System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>

    <HelpLink/>

    <Source>Sdl.LanguagePlatform.Lingua</Source>

    <HResult>-2146233088</HResult>


    -<StackTrace>

    -<![CDATA[ at Sdl.LanguagePlatform.Lingua.SegmentEditDistanceComputer.ComputeEditDistanceImpl_Original(IList`1 sourceTokens, IList`1 targetTokens, Boolean computeDiagonalOnly, BuiltinRecognizers disabledAutoSubstitutions, TagAssociations& alignedTags, Boolean diagonalOnly)
    at Sdl.LanguagePlatform.TranslationMemoryImpl.AbstractScorer.ComputeScores(SearchResult searchResult, IAnnotatedSegment docSrcSegment, IAnnotatedSegment docTrgSegment, List`1 documentPlaceables, TuContextData TuContextData, Boolean isDuplicateSearch, FuzzyIndexes usedIndex, Boolean scoreDiagonalOnly)
    at Sdl.LanguagePlatform.TranslationMemoryImpl.Translator.CreateTranslationProposal(TranslationUnit translatedSegment, Segment docSourceSegment, LanguageTools sourceLanguageTools, LanguageTools targetLanguageTools)
    at Sdl.LanguagePlatform.TranslationMemoryTools.TUOperations.CreateTranslationProposal(TranslationUnit translatedSegment, Segment docSourceSegment, LanguageTools sourceLanguageTools, LanguageTools targetLanguageTools, SearchSettings searchSettings)
    at Sdl.TranslationStudio.Editor.Autopropagate.RepetitionTableAutopropagationProvider.GetAutopropagatedMatchResult(ISegmentContainerNode segmentNode, List`1 contextSegmentNodes)
    at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.AutopropagateSegment(ISegmentContainerNode segment)
    at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.CheckConditionsAndAutopropagateSegment()
    at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.ConfirmSegment(Nullable`1 segmentNavigationFilter)
    at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.AbstractConfirmSegmentAction.ExecuteActiveSegment()
    at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.AbstractConfirmSegmentAction.Execute()
    at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.<>c__DisplayClass30_0.<ExecuteAction>b__0()
    at Sdl.Desktop.Platform.Implementation.Services.Log.Resources(Object message, Action action)
    at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteAction(IAction action, ActionOrigin origin, Boolean allowToggle)
    at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteActionForShortcut(Keys shortcut)
    at Sdl.Desktop.Platform.WinForms.StudioWindowForm.OnKeyDown(KeyEventArgs e)
    at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
    at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
    at System.Windows.Forms.Control.WmKeyChar(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]>
    </StackTrace>

    </Exception>


    -<Environment>

    <ProductName>SDL Trados Studio</ProductName>

    <ProductVersion>15.0.0.0</ProductVersion>

    <EntryAssemblyFileVersion>15.0.1.36320</EntryAssemblyFileVersion>

    <OperatingSystem>Microsoft Windows 10 Pro</OperatingSystem>

    <ServicePack>NULL</ServicePack>

    <OperatingSystemLanguage>1033</OperatingSystemLanguage>

    <CodePage>1252</CodePage>

    <LoggedOnUser>MDF-LENOVO\MDF</LoggedOnUser>

    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>

    <ComputerName>MDF-LENOVO</ComputerName>

    <ConnectedToNetwork>True</ConnectedToNetwork>

    <PhysicalMemory>12493796 MB</PhysicalMemory>

    </Environment>

    </SDLErrorDetails>

    ****
    All the best
Reply
  • Hi Steve
    I have just seen it for the first time: it comes up after merging segments across a hard return. The source file is Word and the offending text is in text boxes. The merged segment appears to confirm OK and be saved to the TM.
    Error stack:
    <?xml version="1.0"?>

    -<SDLErrorDetails time="22/10/2018 15:11:43">

    <ErrorMessage>SegmentEditDistanceComputer: diagonalOnly == true but sourceTokens.Count != targetTokens.Count</ErrorMessage>


    -<Exception>

    <Type>System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>

    <HelpLink/>

    <Source>Sdl.LanguagePlatform.Lingua</Source>

    <HResult>-2146233088</HResult>


    -<StackTrace>

    -<![CDATA[ at Sdl.LanguagePlatform.Lingua.SegmentEditDistanceComputer.ComputeEditDistanceImpl_Original(IList`1 sourceTokens, IList`1 targetTokens, Boolean computeDiagonalOnly, BuiltinRecognizers disabledAutoSubstitutions, TagAssociations& alignedTags, Boolean diagonalOnly)
    at Sdl.LanguagePlatform.TranslationMemoryImpl.AbstractScorer.ComputeScores(SearchResult searchResult, IAnnotatedSegment docSrcSegment, IAnnotatedSegment docTrgSegment, List`1 documentPlaceables, TuContextData TuContextData, Boolean isDuplicateSearch, FuzzyIndexes usedIndex, Boolean scoreDiagonalOnly)
    at Sdl.LanguagePlatform.TranslationMemoryImpl.Translator.CreateTranslationProposal(TranslationUnit translatedSegment, Segment docSourceSegment, LanguageTools sourceLanguageTools, LanguageTools targetLanguageTools)
    at Sdl.LanguagePlatform.TranslationMemoryTools.TUOperations.CreateTranslationProposal(TranslationUnit translatedSegment, Segment docSourceSegment, LanguageTools sourceLanguageTools, LanguageTools targetLanguageTools, SearchSettings searchSettings)
    at Sdl.TranslationStudio.Editor.Autopropagate.RepetitionTableAutopropagationProvider.GetAutopropagatedMatchResult(ISegmentContainerNode segmentNode, List`1 contextSegmentNodes)
    at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.AutopropagateSegment(ISegmentContainerNode segment)
    at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.CheckConditionsAndAutopropagateSegment()
    at Sdl.TranslationStudio.Editor.TranslationEditor.SideBySideDocumentEditingView.ConfirmSegment(Nullable`1 segmentNavigationFilter)
    at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.AbstractConfirmSegmentAction.ExecuteActiveSegment()
    at Sdl.TranslationStudio.Editor.TranslationEditor.Actions.AbstractConfirmSegmentAction.Execute()
    at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.<>c__DisplayClass30_0.<ExecuteAction>b__0()
    at Sdl.Desktop.Platform.Implementation.Services.Log.Resources(Object message, Action action)
    at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteAction(IAction action, ActionOrigin origin, Boolean allowToggle)
    at Sdl.Desktop.Platform.Implementation.CommandBars.ActionService.ExecuteActionForShortcut(Keys shortcut)
    at Sdl.Desktop.Platform.WinForms.StudioWindowForm.OnKeyDown(KeyEventArgs e)
    at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
    at System.Windows.Forms.Form.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyPreview(Message& m)
    at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
    at System.Windows.Forms.Control.WmKeyChar(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)]]>
    </StackTrace>

    </Exception>


    -<Environment>

    <ProductName>SDL Trados Studio</ProductName>

    <ProductVersion>15.0.0.0</ProductVersion>

    <EntryAssemblyFileVersion>15.0.1.36320</EntryAssemblyFileVersion>

    <OperatingSystem>Microsoft Windows 10 Pro</OperatingSystem>

    <ServicePack>NULL</ServicePack>

    <OperatingSystemLanguage>1033</OperatingSystemLanguage>

    <CodePage>1252</CodePage>

    <LoggedOnUser>MDF-LENOVO\MDF</LoggedOnUser>

    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>

    <ComputerName>MDF-LENOVO</ComputerName>

    <ConnectedToNetwork>True</ConnectedToNetwork>

    <PhysicalMemory>12493796 MB</PhysicalMemory>

    </Environment>

    </SDLErrorDetails>

    ****
    All the best
Children
No Data