Merge "Fix typos"

main
Jean Chalard 2013-10-01 12:10:37 +00:00 committed by Android (Google) Code Review
commit ff9476f10a
6 changed files with 19 additions and 19 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -395,7 +395,7 @@ void Suggest::processTerminalDicNode(
if (!dicNode->isTerminalWordNode()) {
return;
}
if (dicNode->shouldBeFilterdBySafetyNetForBigram()) {
if (dicNode->shouldBeFilteredBySafetyNetForBigram()) {
return;
}
// Create a non-cached node here.

View File

@ -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(