textsplit: create isNGRAMMED() method to replace isCJK() and let the latter actually return what it says

This commit is contained in:
Jean-Francois Dockes
2020-04-14 09:27:26 +02:00
parent 5dd8774b3c
commit 9565663f09
4 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -478,7 +478,7 @@ void Query::Native::abstractCreateSnippetsVector(
}
Utf8Iter uit(ent.second);
bool newcjk = false;
if (TextSplit::isCJK(*uit))
if (TextSplit::isNGRAMMED(*uit))
newcjk = true;
if (!incjk || (incjk && !newcjk))
chunk += " ";
+2 -3
View File
@@ -202,9 +202,8 @@ public:
Utf8Iter u8i(term);
if (with_aspell) {
// If spelling with aspell, neither katakana nor other cjk
// scripts are candidates
if (TextSplit::isCJK(*u8i) || TextSplit::isKATAKANA(*u8i))
// If spelling with aspell, CJK scripts are not candidates
if (TextSplit::isCJK(*u8i))
return false;
} else {
#ifdef TESTING_XAPIAN_SPELL