Fix: PtNodeParams.representsNonWordInfo()

Change-Id: I7ab4fb280e8ac89f81d0b32b0663a86c9b69aa5d
This commit is contained in:
Keisuke Kuroyanagi 2014-05-23 13:49:18 +09:00
parent d6f1c5c7fb
commit 6600340af5
2 changed files with 2 additions and 2 deletions

View File

@ -160,7 +160,7 @@ class PtNodeParams {
}
AK_FORCE_INLINE bool representsNonWordInfo() const {
return getCodePointCount() > 0 && CharUtils::isInUnicodeSpace(getCodePoints()[0])
return getCodePointCount() > 0 && !CharUtils::isInUnicodeSpace(getCodePoints()[0])
&& isNotAWord();
}

View File

@ -61,7 +61,7 @@ void Ver4PatriciaTriePolicy::createAndGetAllChildDicNodes(const DicNode *const d
isTerminal = ptNodeParams.getProbability() != NOT_A_PROBABILITY;
}
readingHelper.readNextSiblingNode(ptNodeParams);
if (!ptNodeParams.representsNonWordInfo()) {
if (ptNodeParams.representsNonWordInfo()) {
// Skip PtNodes that represent non-word information.
continue;
}