https://bugs.kde.org/show_bug.cgi?id=176537
Waqar Ahmed <waqar....@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |waqar....@gmail.com --- Comment #12 from Waqar Ahmed <waqar....@gmail.com> --- > https://cgit.kde.org/sonnet.git/tree/src/core/guesslanguage.cpp > It's worth nothing that trigram-based detection is a fallback codepath. We'd > first need to determine why the script-based detection here fails: As far as I can understand trigram based detection isn't a fallback. It is the first source, and if that fails Sonnet bruteforces the dictionaries for a guess. The script detection is working fine, but if the detected scripted doesn't have any trigrams, no candidate languages are returned and if no candidate languages are returned, sonnet goes ahead and checks the sample text with the 'default language' and fails. The solution that can fix this particular issue is quite simple. We just check the script of the text, then we count the number of languages a particular script has. If it has only one, like in this case, we just return that language. The language can be more than one for latin script languages though. -- You are receiving this mail because: You are watching all bug changes.