Class PlaceableComputer
Provides methods to compute placeables and their alignments from two segments, or from a translation unit.
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public static class PlaceableComputer
Methods
ComputePlaceables(Segment, Segment)
Declaration
[Obsolete("Use ComputePlaceablesAsync")]
public static List<Placeable> ComputePlaceables(Segment srcSegment, Segment trgSegment)
Parameters
Type | Name | Description |
---|---|---|
Segment | srcSegment | |
Segment | trgSegment |
Returns
Type | Description |
---|---|
ListPlaceable |
ComputePlaceables(TranslationUnit)
Computes the list of placeables and their alignment, given the provided translation unit.
Declaration
[Obsolete("Use ComputePlaceablesAsync")]
public static List<Placeable> ComputePlaceables(TranslationUnit tu)
Parameters
Type | Name | Description |
---|---|---|
TranslationUnit | tu | The translation unit to compute the placeables for |
Returns
Type | Description |
---|---|
ListPlaceable | A list of placeables |
ComputePlaceablesAsync(Segment, Segment)
Computes the list of placeables and their alignment, given the provided segments.
Declaration
public static Task<List<Placeable>> ComputePlaceablesAsync(Segment srcSegment, Segment trgSegment)
Parameters
Type | Name | Description |
---|---|---|
Segment | srcSegment | The source segment |
Segment | trgSegment | The target segment |
Returns
Type | Description |
---|---|
TaskListPlaceable | A list of placeables |
ComputePlaceablesAsync(TranslationUnit)
Computes the list of placeables and their alignment, given the provided segments.
Declaration
public static Task<List<Placeable>> ComputePlaceablesAsync(TranslationUnit tu)
Parameters
Type | Name | Description |
---|---|---|
TranslationUnit | tu |
Returns
Type | Description |
---|---|
TaskListPlaceable |
ConvertPlaceablesToAlignments(List<Placeable>, LiftAlignedSpanPairSet, List<Token>, List<Token>)
Uses placeable information, computed for a given source and target segment, to add alignment entries to alignment data
Declaration
public static void ConvertPlaceablesToAlignments(List<Placeable> placeables, LiftAlignedSpanPairSet alignmentData, List<Token> sourceTokens, List<Token> targetTokens)
Parameters
Type | Name | Description |
---|---|---|
ListPlaceable | placeables | Previously-computed placeables |
Sdl.Core.FineGrainedAlignment.Core.LiftAlignedSpanPairSet | alignmentData | Object in which to store the alignments |
ListToken | sourceTokens | List of tokens in the source segment |
ListToken | targetTokens | List of tokens in the target segment |