Fix typos
I think I may pass out from the sheer ugliness Change-Id: I1e709f03ef47ec713552d41fd9e37e01b810ae88
This commit is contained in:
parent
cc81a93b01
commit
3e954347e3
6 changed files with 19 additions and 19 deletions
|
@ -271,7 +271,7 @@ class DicNode {
|
|||
return isTerminalNodes && currentNodeDepth > 0 && currentNodeDepth == terminalNodeDepth;
|
||||
}
|
||||
|
||||
bool shouldBeFilterdBySafetyNetForBigram() const {
|
||||
bool shouldBeFilteredBySafetyNetForBigram() const {
|
||||
const uint16_t currentDepth = getNodeCodePointCount();
|
||||
const int prevWordLen = mDicNodeState.mDicNodeStatePrevWord.getPrevWordLength()
|
||||
- mDicNodeState.mDicNodeStatePrevWord.getPrevWordStart() - 1;
|
||||
|
|
|
@ -69,13 +69,13 @@ const float ProximityInfoParams::STRAIGHT_ANGLE_THRESHOLD = M_PI_F * 15.0f / 180
|
|||
const float ProximityInfoParams::SKIP_CORNER_PROBABILITY = 0.4f;
|
||||
const float ProximityInfoParams::SPEED_MARGIN = 0.1f;
|
||||
const float ProximityInfoParams::CENTER_VALUE_OF_NORMALIZED_DISTRIBUTION = 0.0f;
|
||||
// TODO: The variance is critical for accuracy; thus, adjusting these parameter by machine
|
||||
// TODO: The variance is critical for accuracy; thus, adjusting these parameters by machine
|
||||
// learning or something would be efficient.
|
||||
const float ProximityInfoParams::SPEEDxANGLE_WEIGHT_FOR_STANDARD_DIVIATION = 0.3f;
|
||||
const float ProximityInfoParams::MAX_SPEEDxANGLE_RATE_FOR_STANDERD_DIVIATION = 0.25f;
|
||||
const float ProximityInfoParams::SPEEDxNEAREST_WEIGHT_FOR_STANDARD_DIVIATION = 0.5f;
|
||||
const float ProximityInfoParams::MAX_SPEEDxNEAREST_RATE_FOR_STANDERD_DIVIATION = 0.15f;
|
||||
const float ProximityInfoParams::MIN_STANDERD_DIVIATION = 0.37f;
|
||||
const float ProximityInfoParams::SPEEDxANGLE_WEIGHT_FOR_STANDARD_DEVIATION = 0.3f;
|
||||
const float ProximityInfoParams::MAX_SPEEDxANGLE_RATE_FOR_STANDARD_DEVIATION = 0.25f;
|
||||
const float ProximityInfoParams::SPEEDxNEAREST_WEIGHT_FOR_STANDARD_DEVIATION = 0.5f;
|
||||
const float ProximityInfoParams::MAX_SPEEDxNEAREST_RATE_FOR_STANDARD_DEVIATION = 0.15f;
|
||||
const float ProximityInfoParams::MIN_STANDARD_DEVIATION = 0.37f;
|
||||
const float ProximityInfoParams::PREV_DISTANCE_WEIGHT = 0.5f;
|
||||
const float ProximityInfoParams::NEXT_DISTANCE_WEIGHT = 0.6f;
|
||||
|
||||
|
|
|
@ -73,11 +73,11 @@ class ProximityInfoParams {
|
|||
static const float SKIP_CORNER_PROBABILITY;
|
||||
static const float SPEED_MARGIN;
|
||||
static const float CENTER_VALUE_OF_NORMALIZED_DISTRIBUTION;
|
||||
static const float SPEEDxANGLE_WEIGHT_FOR_STANDARD_DIVIATION;
|
||||
static const float MAX_SPEEDxANGLE_RATE_FOR_STANDERD_DIVIATION;
|
||||
static const float SPEEDxNEAREST_WEIGHT_FOR_STANDARD_DIVIATION;
|
||||
static const float MAX_SPEEDxNEAREST_RATE_FOR_STANDERD_DIVIATION;
|
||||
static const float MIN_STANDERD_DIVIATION;
|
||||
static const float SPEEDxANGLE_WEIGHT_FOR_STANDARD_DEVIATION;
|
||||
static const float MAX_SPEEDxANGLE_RATE_FOR_STANDARD_DEVIATION;
|
||||
static const float SPEEDxNEAREST_WEIGHT_FOR_STANDARD_DEVIATION;
|
||||
static const float MAX_SPEEDxNEAREST_RATE_FOR_STANDARD_DEVIATION;
|
||||
static const float MIN_STANDARD_DEVIATION;
|
||||
static const float PREV_DISTANCE_WEIGHT;
|
||||
static const float NEXT_DISTANCE_WEIGHT;
|
||||
|
||||
|
|
|
@ -708,13 +708,13 @@ namespace latinime {
|
|||
const float inputCharProbability = 1.0f - skipProbability;
|
||||
|
||||
const float speedxAngleRate = min(speedRate * currentAngle / M_PI_F
|
||||
* ProximityInfoParams::SPEEDxANGLE_WEIGHT_FOR_STANDARD_DIVIATION,
|
||||
ProximityInfoParams::MAX_SPEEDxANGLE_RATE_FOR_STANDERD_DIVIATION);
|
||||
* ProximityInfoParams::SPEEDxANGLE_WEIGHT_FOR_STANDARD_DEVIATION,
|
||||
ProximityInfoParams::MAX_SPEEDxANGLE_RATE_FOR_STANDARD_DEVIATION);
|
||||
const float speedxNearestKeyDistanceRate = min(speedRate * nearestKeyDistance
|
||||
* ProximityInfoParams::SPEEDxNEAREST_WEIGHT_FOR_STANDARD_DIVIATION,
|
||||
ProximityInfoParams::MAX_SPEEDxNEAREST_RATE_FOR_STANDERD_DIVIATION);
|
||||
* ProximityInfoParams::SPEEDxNEAREST_WEIGHT_FOR_STANDARD_DEVIATION,
|
||||
ProximityInfoParams::MAX_SPEEDxNEAREST_RATE_FOR_STANDARD_DEVIATION);
|
||||
const float sigma = speedxAngleRate + speedxNearestKeyDistanceRate
|
||||
+ ProximityInfoParams::MIN_STANDERD_DIVIATION;
|
||||
+ ProximityInfoParams::MIN_STANDARD_DEVIATION;
|
||||
|
||||
ProximityInfoUtils::NormalDistribution
|
||||
distribution(ProximityInfoParams::CENTER_VALUE_OF_NORMALIZED_DISTRIBUTION, sigma);
|
||||
|
|
|
@ -395,7 +395,7 @@ void Suggest::processTerminalDicNode(
|
|||
if (!dicNode->isTerminalWordNode()) {
|
||||
return;
|
||||
}
|
||||
if (dicNode->shouldBeFilterdBySafetyNetForBigram()) {
|
||||
if (dicNode->shouldBeFilteredBySafetyNetForBigram()) {
|
||||
return;
|
||||
}
|
||||
// Create a non-cached node here.
|
||||
|
|
|
@ -101,7 +101,7 @@ class TypingTraversal : public Traversal {
|
|||
}
|
||||
const int16_t pointIndex = dicNode->getInputIndex(0);
|
||||
return pointIndex <= inputSize && !dicNode->isTotalInputSizeExceedingLimit()
|
||||
&& !dicNode->shouldBeFilterdBySafetyNetForBigram();
|
||||
&& !dicNode->shouldBeFilteredBySafetyNetForBigram();
|
||||
}
|
||||
|
||||
AK_FORCE_INLINE bool shouldDepthLevelCache(
|
||||
|
|
Loading…
Reference in a new issue