src/classify/float2int.cpp
void Classify::ComputeIntCharNormArray(const FEATURE_STRUCT &norm_feature,
                                       uint8_t *char_norm_array) {
  for (unsigned i = 0; i < unicharset.size(); i++) {
    if (i < PreTrainedTemplates->NumClasses) {
      int norm_adjust =
          static_cast<int>(INT_CHAR_NORM_RANGE * ComputeNormMatch(i, norm_feature, false));
      char_norm_array[i] = ClipToRange(norm_adjust, 0, MAX_INT_CHAR_NORM);
    } else {
      // Classes with no templates (eg. ambigs & ligatures) default
      // to worst match.
      char_norm_array[i] = MAX_INT_CHAR_NORM;
    }
  }
}
/*---------------------------------------------------------------------------*/
/**
 * For each class in unicharset, computes the match between
 * norm_feature and the normalization protos for that class.
 * Converts this number to the range from 0 - 255 and stores it
 * into char_norm_array.  CharNormArray is indexed by unichar_id.
 *
 * Globals:
 * - PreTrainedTemplates current set of built-in templates
 *
 * @param norm_feature character normalization feature
 * @param[out] char_norm_array place to put results of size unicharset.size()
 */
For each class in unicharset, computes the match between
norm_feature and the normalization protos for that class.
Converts this number to the range from 0 - 255 and stores it
into char_norm_array.

- PreTrainedTemplates current set of built-in templates

@param norm_feature character normalization feature
@param[out] char_norm_array place to put results of size unicharset.size()
For each class in unicharset computes the match between norm_feature and the normalization protos for that class . Converts this number to the range from 0 - 255 and stores it into char_norm_array . - PreTrainedTemplates current set of built - in templates @param norm_feature character normalization feature @param [ out ] char_norm_array place to put results of size unicharset . size ()
void Classify::ComputeIntCharNormArray(const FEATURE_STRUCT &norm_feature,
                                       uint8_t *char_norm_array) {
  for (unsigned i = 0; i < unicharset.size(); i++) {
    if (i < PreTrainedTemplates->NumClasses) {
      int norm_adjust =
          static_cast<int>(INT_CHAR_NORM_RANGE * ComputeNormMatch(i, norm_feature, false));
      char_norm_array[i] = ClipToRange(norm_adjust, 0, MAX_INT_CHAR_NORM);
    } else {
      char_norm_array[i] = MAX_INT_CHAR_NORM;
    }
  }
}
void Classify :: ComputeIntCharNormArray ( const FEATURE_STRUCT & norm_feature , uint8_t * char_norm_array ) { for ( unsigned i = 0 ; i < unicharset . size ( ) ; i ++ ) { if ( i < PreTrainedTemplates -> NumClasses ) { int norm_adjust = static_cast < int > ( INT_CHAR_NORM_RANGE * ComputeNormMatch ( i , norm_feature , false ) ) ; char_norm_array [ i ] = ClipToRange ( norm_adjust , 0 , MAX_INT_CHAR_NORM ) ; } else { char_norm_array [ i ] = MAX_INT_CHAR_NORM ; } } }
For each class in unicharset, computes the match between
 norm_feature and the normalization protos for that class.
For each class in unicharset computes the match between norm_feature and the normalization protos for that class .
// Classes with no templates (eg. ambigs & ligatures) default // to worst match.