Back to API Reference Home

POST v1/tms/{tmGuid}/concordance

Performs a concordance search in the translation memory specified by a Guid.

Request information

Uri parameters

NameTypeDescriptionAdditional information
tmGuidGuidThe Guid of the translation memory

Request body type

NameTypeDescription
OptionsConcordanceOptions
AbsScoreLimitInt32Optional, default value: 0; Absolute score limit.
AscendingBooleanOptional, default value: False; Defines whether the sorting order is ascending.
CaseSensitiveBooleanOptional, default value: False; Defines whether the search is case sensitive.
ColumnColumn (enum)Optional, default value: 0; Possible enum values: 0:Prefix; 1:Middle; 2:Suffix; 3:Source; 4:Target; 5:Meta; 6:None; Defines the primary sort info, namely the column by which items are sorted.
FirstLastFirstLast (enum)Optional, default value: 0; Possible enum values: 0:First; 1:Last; Defines the secondary sort info, when items are sorted by Prefix or Suffix.
IgnorePunctuationBooleanOptional, default value: False; Defines whether the search ignores punctuation.
MetaMeta (enum)Optional, default value: 0; Possible enum values: 0:User; 1:ModifTime; Defines the secondary sort info, when items are sorted by MetaField.
NumericEquivalenceBooleanOptional, default value: False; Defines whether the numbers are equivalent.
RelScroreLimitInt32Optional, default value: 0; Relative score limit.
ResultsLimitInt32Optional, default value: 64; Limit of the results.
ReverseLookupBooleanOptional, default value: False; Defines whether the search should be executed on the target side instead of the source side.
TargetFilterStringsString[]Optional, default value: null; An array of strings to filter target.
TopScoreCountInt32Optional, default value: 0; Top score count.
SearchExpressionString[]Obligatory; An array of the expressions to search.

Request body formats

application/json

Sample:
{
  "SearchExpression": [
    "sample string 1",
    "sample string 2"
  ],
  "Options": {
    "AbsScoreLimit": 0,
    "Ascending": true,
    "CaseSensitive": true,
    "Column": 3,
    "FirstLast": 1,
    "IgnorePunctuation": true,
    "Meta": 1,
    "NumericEquivalence": true,
    "RelScroreLimit": 0,
    "ResultsLimit": 100,
    "ReverseLookup": true,
    "TargetFilterStrings": [
      "sample string 1",
      "sample string 2"
    ],
    "TopScoreCount": 1000
  }
}

Response information

Response return type

NameTypeDescription
ConcResultConcordanceItem[]The sorted, limited array of results
ConcordanceTextRangesRangeInfo[]Optional, default value: null; The ranges of the concordance item.
LengthInt32The length of the range.
StartInt32The starting position of the range.
ConcordanceTranslationRangesTranslationRangeInfo[]Optional, default value: null; The translation ranges of the concordance item.
LengthInt32The length of the translation range.
ScoreDoubleThe score of the translation range.
StartInt32The starting position of the translation range.
LengthInt32Optional, default value: null; The length of the concordance item.
StartPosInt32Optional, default value: null; The starting position of the concordance item.
TMEntryTMConcordanceEntryModel
DocumentNameStringThe name of the document where the entry came from.
EntryIdInt32The id of the TM entry the concordance hit comming form or -1 if it comes from a LiveDocs corpora.
LastModifiedDateTimeThe date when the entry was last modified.
ModifierStringThe name of the user the entry was last modified by.
SourceSegmentStringThe source segment.
TargetSegmentStringThe target segment.
ConcTransResultConcTransItem[]The sorted, limited array of scores.
ExpressionStringThe expression.
ScoreDoubleThe score.
ErrorsConcordanceError[]The errors returned by the concordance.
ErrorTypeErrorTypes (enum)Possible enum values: 0:TooManySimilarWords; 1:TooManySegments; 2:Unknown; The type of the concordance error.
QueryPartStringThe query part of the concordance error.
TotalConcResultInt32The total number of results.

Response body formats

application/json

Sample:
{
  "ConcResult": [
    {
      "ConcordanceTextRanges": [
        {
          "Length": 10,
          "Start": 2
        },
        {
          "Length": 10,
          "Start": 2
        },
        {
          "Length": 10,
          "Start": 2
        }
      ],
      "ConcordanceTranslationRanges": [
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        },
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        },
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        }
      ],
      "Length": 1,
      "StartPos": 2,
      "TMEntry": {
        "SourceSegment": "<seg>Sample segment content1.</seg>",
        "TargetSegment": "<seg>Sample segment content2.</seg>",
        "EntryId": 12,
        "LastModified": "2015-08-28T14:02:31.22Z",
        "Modifier": "John Doe",
        "DocumentName": "sample.docx"
      }
    },
    {
      "ConcordanceTextRanges": [
        {
          "Length": 10,
          "Start": 2
        },
        {
          "Length": 10,
          "Start": 2
        },
        {
          "Length": 10,
          "Start": 2
        }
      ],
      "ConcordanceTranslationRanges": [
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        },
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        },
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        }
      ],
      "Length": 1,
      "StartPos": 2,
      "TMEntry": {
        "SourceSegment": "<seg>Sample segment content1.</seg>",
        "TargetSegment": "<seg>Sample segment content2.</seg>",
        "EntryId": 12,
        "LastModified": "2015-08-28T14:02:31.22Z",
        "Modifier": "John Doe",
        "DocumentName": "sample.docx"
      }
    },
    {
      "ConcordanceTextRanges": [
        {
          "Length": 10,
          "Start": 2
        },
        {
          "Length": 10,
          "Start": 2
        },
        {
          "Length": 10,
          "Start": 2
        }
      ],
      "ConcordanceTranslationRanges": [
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        },
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        },
        {
          "Length": 10,
          "Score": 95.0,
          "Start": 0
        }
      ],
      "Length": 1,
      "StartPos": 2,
      "TMEntry": {
        "SourceSegment": "<seg>Sample segment content1.</seg>",
        "TargetSegment": "<seg>Sample segment content2.</seg>",
        "EntryId": 12,
        "LastModified": "2015-08-28T14:02:31.22Z",
        "Modifier": "John Doe",
        "DocumentName": "sample.docx"
      }
    }
  ],
  "ConcTransResult": [
    {
      "Expression": "sample string",
      "Score": 95.0
    },
    {
      "Expression": "sample string",
      "Score": 95.0
    },
    {
      "Expression": "sample string",
      "Score": 95.0
    }
  ],
  "Errors": [
    {
      "ErrorType": 1,
      "QueryPart": ""
    },
    {
      "ErrorType": 1,
      "QueryPart": ""
    },
    {
      "ErrorType": 1,
      "QueryPart": ""
    }
  ],
  "TotalConcResult": 10
}