Documentation Center

PslTransList.GetConcordances

Returns a list of concordances for one string. The function will search through all concordance providers as set up in the Passolo options. But, in contrast to the Passolo application this function only uses translation providers that are capable of return synchronous results.

The source and target language of this translation list are used for the search.

Syntax

Expression.TranslateText (Text as String, MinMatch as Variant, MaxCount as Variant) as PslTranslations

Expression Required. Object of type PslTransList

Text String, Required. Concordances of this string are searched.

MinMatch Variant, optional. Specifies the minimum match required. The default value is 100, so that the function searches for exact matches by default.

MaxCount Variant, optional. Specifies the maximum number of segments to be returned.

Example

Sub Main
    ' Clear the output window
    PSL.OutputWnd(pslOutputWndMessages).Clear

    Dim trnlist As PslTransList
    Set trnlist = PSL.ActiveTransList
    If trnlist Is Nothing Then
        PSL.Output("No (single) active trans list found")
    Exit Sub
    End If

    Dim ts As PslTranslations
    Dim t As PslTranslation

    ' Concordances
    PSL.Output("Concordances-------------------")
    Set ts = trnlist.GetConcordances("Open", 100)

    For Each t In ts
        PSL.Output t.TransString & " (" & t.Origin & ")"
    Next
End Sub