D26346: Sonnet: Fix returning from GuessLanguagePrivate::guessFromTrigrams

Waqar Ahmed noreply at phabricator.kde.org
Sun Jan 26 16:24:27 GMT 2020


waqar added inline comments.

INLINE COMMENTS

> guesslanguage.cpp:745
>  
> -    while (it.hasNext() && counter < m_maxItems && confidence < m_minConfidence) {
> +    while (it.hasNext() && counter < m_maxItems && (m_minConfidence == 0.0 || confidence < m_minConfidence)) {
>          it.next();

I wasn't able to see its usefulness directly, I had to change  `MIN_RELIABILITY` to `0.0` (in LanguageFilter) to see its effects.

But how about just doing `confidence <= m_minConfidence`?

REPOSITORY
  R246 Sonnet

REVISION DETAIL
  https://phabricator.kde.org/D26346

To: mludwig, #frameworks
Cc: waqar, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200126/67f38568/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list