Interface ISubsegmentTranslationMemoryLanguageDirection
Exposes translation provider subsegment functionality for a specific language direction.
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public interface ISubsegmentTranslationMemoryLanguageDirection
Methods
SearchSegment(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, Segment)
Performs a segment-level search, and optionally a subsegment search
Declaration
SegmentAndSubsegmentSearchResults SearchSegment(SearchSettings settings, SubsegmentSearchSettings subsegmentSettings, SubsegmentSearchCondition condition, Segment segment)
Parameters
Type | Name | Description |
---|---|---|
SearchSettings | settings | The settings that define the segment-level search parameters. |
SubsegmentSearchSettings | subsegmentSettings | The settings that define the subsegment search parameters, or null if a subsegment search should not be performed. |
SubsegmentSearchCondition | condition | If |
Segment | segment | The segment to search for. |
Returns
Type | Description |
---|---|
SegmentAndSubsegmentSearchResults | A SearchResults object containing the results or an empty object if no results were found. |
SearchSegments(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, Segment[])
Performs a segment-level search, and optionally a subsegment search, for an array of segments.
Declaration
SegmentAndSubsegmentSearchResults[] SearchSegments(SearchSettings settings, SubsegmentSearchSettings subsegmentSettings, SubsegmentSearchCondition condition, Segment[] segments)
Parameters
Type | Name | Description |
---|---|---|
SearchSettings | settings | The settings that define the segment-level search parameters. |
SubsegmentSearchSettings | subsegmentSettings | The settings that define the subsegment search parameters, or null if a subsegment search should not be performed. |
SubsegmentSearchCondition | condition | If |
Segment[] | segments | The array containing the segments to search for. |
Returns
Type | Description |
---|---|
SegmentAndSubsegmentSearchResults[] | An array of SearchResults objects, which mirrors the segments array. It has the exact same size and contains the search results for each segment with the same index within the segments array. |
SearchSegmentsMasked(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, Segment[], Boolean[])
Performs a segment-level search, and optionally a subsegment search, for an array of segments, specifying a mask which specifies which segments should actually be
searched (only those for which the corresponding mask bit is true
are searched). If the mask is null
, the method
behaves identically to SearchSegments(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, Segment[]). Passing a mask only makes sense in document search contexts (IsDocumentSearch
set to true
).
Declaration
SegmentAndSubsegmentSearchResults[] SearchSegmentsMasked(SearchSettings settings, SubsegmentSearchSettings subsegmentSettings, SubsegmentSearchCondition condition, Segment[] segments, bool[] mask)
Parameters
Type | Name | Description |
---|---|---|
SearchSettings | settings | The settings that define the segment-level search parameters. |
SubsegmentSearchSettings | subsegmentSettings | The settings that define the subsegment search parameters, or null if a subsegment search should not be performed. |
SubsegmentSearchCondition | condition | If |
Segment[] | segments | The array containing the segments to search for. |
System.Boolean[] | mask | The array containing the segments to search for. |
Returns
Type | Description |
---|---|
SegmentAndSubsegmentSearchResults[] | An array of SearchResults objects, which mirrors the segments array. It has the exact same size and contains the search results for each segment with the same index within the segments array. |
SearchTranslationUnit(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, TranslationUnit)
Performs a translation unit search, and optionally a subsegment search on the source segment
Declaration
SegmentAndSubsegmentSearchResults SearchTranslationUnit(SearchSettings settings, SubsegmentSearchSettings subsegmentSettings, SubsegmentSearchCondition condition, TranslationUnit translationUnit)
Parameters
Type | Name | Description |
---|---|---|
SearchSettings | settings | The settings that define the segment-level search parameters. |
SubsegmentSearchSettings | subsegmentSettings | The settings that define the subsegment search parameters, or null if a subsegment search should not be performed. |
SubsegmentSearchCondition | condition | If |
TranslationUnit | translationUnit | The translation unit to search for. |
Returns
Type | Description |
---|---|
SegmentAndSubsegmentSearchResults | An object containing the results or an empty object if no results were found. |
SearchTranslationUnits(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, TranslationUnit[])
Performs a translation unit search, and optionally a subsegment search on the source segment, for an array of translation units.
Declaration
SegmentAndSubsegmentSearchResults[] SearchTranslationUnits(SearchSettings settings, SubsegmentSearchSettings subsegmentSettings, SubsegmentSearchCondition condition, TranslationUnit[] translationUnits)
Parameters
Type | Name | Description |
---|---|---|
SearchSettings | settings | The settings that define the segment-level search parameters. |
SubsegmentSearchSettings | subsegmentSettings | The settings that define the subsegment search parameters, or null if a subsegment search should not be performed. |
SubsegmentSearchCondition | condition | If |
TranslationUnit[] | translationUnits | The array containing the translation units to search for. |
Returns
Type | Description |
---|---|
SegmentAndSubsegmentSearchResults[] | An array of objects, which mirrors the translation unit array. It has the exact same size and contains the search results for each translation unit with the same index within the translation unit array. |
SearchTranslationUnitsMasked(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, TranslationUnit[], Boolean[])
Similar to SearchTranslationUnits(SearchSettings, SubsegmentSearchSettings, SubsegmentSearchCondition, TranslationUnit[]), but allows passing a mask which specifies which TUs are actually searched. This is useful in document search contexts where some TUs are passed which should be used to establish a (text) context, but which should not be processed.
Declaration
SegmentAndSubsegmentSearchResults[] SearchTranslationUnitsMasked(SearchSettings settings, SubsegmentSearchSettings subsegmentSettings, SubsegmentSearchCondition condition, TranslationUnit[] translationUnits, bool[] mask)
Parameters
Type | Name | Description |
---|---|---|
SearchSettings | settings | The settings that define the segment-level search parameters. |
SubsegmentSearchSettings | subsegmentSettings | The settings that define the subsegment search parameters, or null if a subsegment search should not be performed. |
SubsegmentSearchCondition | condition | If |
TranslationUnit[] | translationUnits | The array containing the translation units to search for. |
System.Boolean[] | mask | A |
Returns
Type | Description |
---|---|
SegmentAndSubsegmentSearchResults[] | An array of objects, which mirrors the translation unit array. It has the exact same size and contains the search results for each translation unit with the same index within the translation unit array. |
SubsegmentSearchSegment(SubsegmentSearchSettings, Segment)
Searches the TM for subsegment matches for a given segment
Declaration
SubsegmentSearchResultsCollection SubsegmentSearchSegment(SubsegmentSearchSettings settings, Segment segment)
Parameters
Type | Name | Description |
---|---|---|
SubsegmentSearchSettings | settings | The settings that define the search parameters. |
Segment | segment | The segment for which subsegment matches should be sought, aka 'query segment' |
Returns
Type | Description |
---|---|
SubsegmentSearchResultsCollection | A SubsegmentSearchResultsCollection object containing any subsegment matches found. |
Remarks
See SubsegmentSearchSettings remarks for further information.
SubsegmentSearchSegments(SubsegmentSearchSettings, Segment[])
Searches the TM for subsegment matches for an array of segments.
Declaration
SubsegmentSearchResultsCollection[] SubsegmentSearchSegments(SubsegmentSearchSettings settings, Segment[] segments)
Parameters
Type | Name | Description |
---|---|---|
SubsegmentSearchSettings | settings | The settings that define the search parameters. |
Segment[] | segments | The array containing the segments for which subsegment matches should be sought |
Returns
Type | Description |
---|---|
SubsegmentSearchResultsCollection[] | A SubsegmentSearchResultsCollection object containing any subsegment matches found. |
Remarks
See SubsegmentSearchSettings remarks for further information.
SupportedSubsegmentMatchTypes()
Reports the subsegment match types supported by this TM.
Declaration
List<SubsegmentMatchType> SupportedSubsegmentMatchTypes()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<SubsegmentMatchType> |