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