KTextAddons
bergamotmarianinterface.cpp
18std::shared_ptr<marian::Options> makeOptions(const std::string &path_to_model_dir, const BergamotEngineUtils::SettingsInfo &settings)
20 std::shared_ptr<marian::Options> options(slimt::parseOptionsFromFilePath(path_to_model_dir + "/config.intgemm8bitalpha.yml"));
21 options->set("cpu-threads", settings.numberOfThread, "workspace", settings.memoryByThread, "mini-batch-words", 1000, "alignment", "soft", "quiet", true);
132 model = std::make_shared<slimt::TranslationModel>(modelConfig, modelChange->settings.numberOfThread);
137 input->text); // @TODO we're doing an "unnecessary" string copy here (necessary because we std::move input into service->translate)
211 std::unique_ptr<TranslationInput> input(new TranslationInput{str.toStdString(), slimt::ResponseOptions{}});
226void BergamotMarianInterface::setModel(const QString &pathModelDir, const BergamotEngineUtils::SettingsInfo &settings)
238 std::unique_ptr<ModelDescription> model(new ModelDescription{mModelString.toStdString(), settings});
Wrapper around a translation response from the bergamot service.
Definition translation.h:27
QString i18n(const char *text, const TYPE &arg...)
Q_EMITQ_EMIT
QString fromStdString(const std::string &str)
bool isEmpty() const const
std::string toStdString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.