Function marian::bergamot::createQualityEstimator

Function Documentation

std::shared_ptr<QualityEstimator> marian::bergamot::createQualityEstimator(const AlignedMemory &qualityFileMemory)

createQualityEstimator model takes an AlignedMemory, which is the return from getQualityEstimatorModel.

getQualityEstimatorModel contains two different implementations, one when the quality argument has some value as a possible Options and where it does not.

If a non quality option is provided, then by default, it uses the UnsupervisedQualityEstimator implementation.

If a value is passed to the quality argument, the model file is read and converted into an AlignedMemory structure, which instantiates a QualityEstimator object.

Parameters
  • [in] qualityFileMemory: An AlignedMemory which is created by parsing a QE model binary file through getQualityEstimatorModel