Sonnet
guesslanguage.cpp
79 const auto matchingLocales = QLocale::matchingLocales(QLocale::AnyLanguage, script, QLocale::AnyCountry);
536 if (std::find(s_scriptLanguages.cbegin(), s_scriptLanguages.cend(), languageName) == s_scriptLanguages.cend()) {
537 qCWarning(SONNET_LOG_CORE) << "Unable to handle language from dictionary" << dictName << languageName;
645 qCWarning(SONNET_LOG_CORE) << iterator.key() << "is has only" << iterator.value().count() << "trigrams, expected" << MAXGRAMS;
702QStringList GuessLanguagePrivate::identify(const QString &sample, const QList<QChar::Script> &scripts)
716QStringList GuessLanguagePrivate::guessFromTrigrams(const QString &sample, const QStringList &languages)
788 std::sort(trigramFrequencyList.begin(), trigramFrequencyList.end(), [](const QPair<int, QString> &a, const QPair<int, QString> &b) {
801int GuessLanguagePrivate::distance(const QList<QString> &model, const QHash<QString, int> &knownModel)
822QString GuessLanguagePrivate::guessFromDictionaries(const QString &sentence, const QStringList &candidates)
863 for (QMap<QString, int>::const_iterator itr = correctHits.constBegin(); itr != correctHits.constEnd(); ++itr) {
QString identify(const QString &text, const QStringList &suggestions=QStringList()) const
Returns the 2 digit ISO 639-1 code for the language of the currently set text and.
Definition guesslanguage.cpp:550
void setLimits(int maxItems, double minConfidence)
Sets limits to number of languages returned by identify().
Definition guesslanguage.cpp:618
ScriptCount
bool isSpace(char32_t ucs4)
const_iterator cbegin() const const
const_iterator cend() const const
const_iterator constBegin() const const
const_iterator constEnd() const const
void reserve(qsizetype size)
qsizetype size() const const
T value(const Key &key) const const
ReadOnly
void append(QList< T > &&value)
iterator begin()
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
iterator end()
T & first()
bool isEmpty() const const
void reserve(qsizetype size)
qsizetype size() const const
AnyCountry
AnyLanguage
Script
QList< QLocale > matchingLocales(QLocale::Language language, QLocale::Script script, QLocale::Territory territory)
QString name() const const
const_iterator constBegin() const const
const_iterator constEnd() const const
bool isEmpty() const const
const_iterator constBegin() const const
const_iterator constEnd() const const
QList< T > values() const const
const Key & firstKey() const const
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
bool contains(const QSet< T > &other) const const
iterator insert(const T &value)
QSet< T > & unite(const QSet< T > &other)
QString & insert(qsizetype position, QChar ch)
bool isEmpty() const const
QString mid(qsizetype position, qsizetype n) const const
qsizetype size() const const
QString toLower() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
qsizetype removeDuplicates()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:25 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:10:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.