Class ChiSquaredTranslationModel
Inheritance
System.Object
ChiSquaredTranslationModel
Assembly: Sdl.Core.FineGrainedAlignment.dll
Syntax
public class ChiSquaredTranslationModel : TranslationModel
Constructors
ChiSquaredTranslationModel(IChiSquaredTranslationModelStoreReadOnly, String, TranslationModelId, List<AlignableCorpusId>, CultureCode, CultureCode, Nullable<DateTime>, Int32, Int32)
Declaration
public ChiSquaredTranslationModel(IChiSquaredTranslationModelStoreReadOnly store, string name, TranslationModelId id, List<AlignableCorpusId> corpusIds, CultureCode sourceCulture, CultureCode targetCulture, Nullable<DateTime> modelDate, int sampleCount, int version)
Parameters
Declaration
public ChiSquaredTranslationModel(IChiSquaredTranslationModelStoreReadOnly store, string name, TranslationModelId id, List<AlignableCorpusId> corpusIds, CultureCode sourceCulture, CultureCode targetCulture, Nullable<DateTime> modelDate, int sampleCount, int version, ICultureMetadataManager cultureMetadataManager)
Parameters
Type |
Name |
Description |
IChiSquaredTranslationModelStoreReadOnly |
store |
|
System.String |
name |
|
TranslationModelId |
id |
|
System.Collections.Generic.List<AlignableCorpusId> |
corpusIds |
|
Sdl.Core.Globalization.CultureCode |
sourceCulture |
|
Sdl.Core.Globalization.CultureCode |
targetCulture |
|
System.Nullable<System.DateTime> |
modelDate |
|
System.Int32 |
sampleCount |
|
System.Int32 |
version |
|
Sdl.Core.Globalization.CultureMetadataManager.ICultureMetadataManager |
cultureMetadataManager |
|
Fields
LatestModelVersion
Declaration
public const int LatestModelVersion = 2
Field Value
Type |
Description |
System.Int32 |
|
Properties
ModelType
Declaration
public override TranslationModelTypes ModelType { get; }
Property Value
Overrides
SampleCount
Declaration
public int SampleCount { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Store
Declaration
public IChiSquaredTranslationModelStoreReadOnly Store { get; }
Property Value
Version
Declaration
public int Version { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
BuildModelAsync(IAlignableCorpusManagerAsync)
Declaration
public override Task BuildModelAsync(IAlignableCorpusManagerAsync corpusManager)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
CanBuildModelAsync(IAlignableCorpusManagerAsync)
Declaration
public override Task<bool> CanBuildModelAsync(IAlignableCorpusManagerAsync corpusManager)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
Overrides
MeasureModelFitnessAsync(List<IAlignableContentPair>)
Declaration
public override Task<TranslationModelFitness> MeasureModelFitnessAsync(List<IAlignableContentPair> pairs)
Parameters
Returns
Overrides
Declaration
public Task<(Dictionary<string, int>, Dictionary<string, int>)> MeasureModelFitnessAsync(List<Token> tokens, bool target)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<Token> |
tokens |
|
System.Boolean |
target |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.ValueTuple<System.Collections.Generic.Dictionary<System.String, System.Int32>, System.Collections.Generic.Dictionary<System.String, System.Int32>>> |
|
SetLatestVersion()
Declaration
public void SetLatestVersion()
ShouldBuildModelAsync(IAlignableCorpusManagerAsync)
Declaration
public override Task<bool> ShouldBuildModelAsync(IAlignableCorpusManagerAsync corpusManager)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
Overrides