Merge "Use isFirstCharUppercase instead of get first code point."
commit
89dbd056d1
|
@ -218,7 +218,7 @@ class DicNode {
|
|||
}
|
||||
|
||||
bool isFirstCharUppercase() const {
|
||||
const int c = getOutputWordBuf()[0];
|
||||
const int c = mDicNodeState.mDicNodeStateOutput.getCodePointAt(0);
|
||||
return CharUtils::isAsciiUpper(c);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ class DicNodeStateOutput {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Remove
|
||||
int getCodePointAt(const int index) const {
|
||||
return mCodePointsBuf[index];
|
||||
}
|
||||
|
|
|
@ -162,9 +162,8 @@ class TypingTraversal : public Traversal {
|
|||
if (probability < ScoringParams::THRESHOLD_NEXT_WORD_PROBABILITY) {
|
||||
return false;
|
||||
}
|
||||
const int c = dicNode->getOutputWordBuf()[0];
|
||||
const bool shortCappedWord = dicNode->getNodeCodePointCount()
|
||||
< ScoringParams::THRESHOLD_SHORT_WORD_LENGTH && CharUtils::isAsciiUpper(c);
|
||||
< ScoringParams::THRESHOLD_SHORT_WORD_LENGTH && dicNode->isFirstCharUppercase();
|
||||
return !shortCappedWord
|
||||
|| probability >= ScoringParams::THRESHOLD_NEXT_WORD_PROBABILITY_FOR_CAPPED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue