Interface IFileBasedTranslationMemory
Represents an file based Translation Memory
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public interface IFileBasedTranslationMemory : ITranslationMemory2015, ITranslationMemory, ITranslationProvider, ISupportPlaceables, IAdvancedContextTranslationMemory
Properties
AlignedPredatedTranslationUnitCount
Gets the number of TUs that are postdated (added after creation of the model they were aligned with) and are now predated (a model exists created after they were added)
Declaration
int AlignedPredatedTranslationUnitCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
AlignerDefinition
Gets the AlignerDefinition that has been set for this TM, or null if there is none
Declaration
AlignerDefinition AlignerDefinition { get; }
Property Value
| Type | Description |
|---|---|
| AlignerDefinition |
CanBuildModel
Returns true if the TM has enough data for the translation model associated with it to be built
Declaration
bool CanBuildModel { get; }
Property Value
| Type | Description |
|---|---|
| bool |
CanReportReindexRequired
Returns true for file-based TMs capable of reporting whether TUs require reindexing, or false for legacy TMs that do not support this capability.
Declaration
bool CanReportReindexRequired { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
FGASupport
Returns the status of fine-grained-alignment support for the TM
Declaration
FGASupport FGASupport { get; set; }
Property Value
| Type | Description |
|---|---|
| FGASupport |
LanguageDirection
Gets the one language direction contained in this translation memory.
Declaration
ITranslationMemoryLanguageDirection LanguageDirection { get; }
Property Value
| Type | Description |
|---|---|
| ITranslationMemoryLanguageDirection |
ModelDetails
Provides details of the translation model associated with this file-based TM
Declaration
TranslationModelDetails ModelDetails { get; }
Property Value
| Type | Description |
|---|---|
| TranslationModelDetails |
ReindexRequired
Returns true if any TUs require reindexing, based on the value of their tokenization_signature_hash column, false otherwise, or null if the TM is a legacy file-based TM that does not have this column.
Declaration
bool? ReindexRequired { get; }
Property Value
| Type | Description |
|---|---|
| bool? |
ShouldAlign
Indicates whether 'quick' alignment (i.e. alignment of any unaligned TUs, plus postdated TUs for which a newer model is now available) is recommended
Declaration
bool ShouldAlign { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ShouldBuildModel
Indicates whether a build (or rebuild) of the translation model is recommended
Declaration
bool ShouldBuildModel { get; }
Property Value
| Type | Description |
|---|---|
| bool |
TuCountForReindex
Returns the number of TUs that require reindexing, based on the value of their tokenization_signature_hash column, or -1 if the TM is a legacy file-based TM that does not have this column.
Declaration
int TuCountForReindex { get; }
Property Value
| Type | Description |
|---|---|
| int |
UnalignedTranslationUnitCount
Gets the number of TUs that do not have fine-grained alignment information.
Declaration
int UnalignedTranslationUnitCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
AlignTranslationUnits(TranslationUnit[])
Attempt to performs fine-grained alignment on a list of translation units as if they were part of the translation memory.
Declaration
AlignResult[] AlignTranslationUnits(TranslationUnit[] tus)
Parameters
| Type | Name | Description |
|---|---|---|
| TranslationUnit[] | tus | Array of Translation Units |
Returns
| Type | Description |
|---|---|
| AlignResult[] | Array of AlignResult enums reflecting the result of each alignment attempt. |
AlignTranslationUnits(bool, bool, CancellationToken, IProgress<int>)
Performs bulk fine-grained alignment on translation units in a TM
Declaration
void AlignTranslationUnits(bool unalignedOnly, bool unalignedOrPostdatedOnly, CancellationToken token, IProgress<int> progress)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | unalignedOnly | |
| bool | unalignedOrPostdatedOnly | |
| CancellationToken | token | |
| IProgress<int> | progress |
BuildModel()
Builds the translation model associated with this file-based TM
Declaration
void BuildModel()
Save(IProgress<TranslationMemoryProgress>, CancellationToken)
Performs a save operation
Declaration
void Save(IProgress<TranslationMemoryProgress> progress, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IProgress<TranslationMemoryProgress> | progress | |
| CancellationToken | cancellationToken |
SelectiveReindexTranslationUnits(CancellationToken, IProgress<int>)
Provides similar functionality to ReindexTranslationUnits, except that only TUs that require reindexing are reindexed, based on the value of their tokenization_signature_hash column, or no TUs if the TM is a legacy file-based TM that does not have this column.
Declaration
void SelectiveReindexTranslationUnits(CancellationToken token, IProgress<int> progress)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | token | |
| IProgress<int> | progress |
Events
TranslationModelProgress
Reports the progress of building a translation model
Declaration
event EventHandler<TranslationModelProgressEventArgs> TranslationModelProgress
Event Type
| Type | Description |
|---|---|
| EventHandler<TranslationModelProgressEventArgs> |