Sonnet: Fix returning from GuessLanguagePrivate::guessFromTrigrams
Needs ReviewPublic

Authored by mludwig on Jan 1 2020, 5:46 PM.

Details

Reviewers
None
Group Reviewers
Frameworks
Summary

The documentation states that "Default is returning best guess without caring about confidence - exactly as after call to setLimits(1,0)."

However, for the default value m_minConfidence = 0, GuessLanguagePrivate::guessFromTrigrams always returns an empty list.

This patch is an attempt at fixing that.

Diff Detail

Repository
R246 Sonnet
Lint
Lint Skipped
Unit
Unit Tests Skipped
mludwig created this revision.Jan 1 2020, 5:46 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 1 2020, 5:46 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mludwig requested review of this revision.Jan 1 2020, 5:46 PM
mludwig updated this revision to Diff 72552.Jan 1 2020, 5:49 PM

Small fix to the documentation.

waqar added a subscriber: waqar.Jan 26 2020, 4:24 PM
waqar added inline comments.
src/core/guesslanguage.cpp
745

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?