Use isFirstCharUppercase instead of get first code point.
Change-Id: I0a28305397bfc1e7218e16df00839781a74f5599main
parent
0a5efa31de
commit
b43ea5c335
|
@ -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