src/ccmain/ltrresultiterator.cpp
float ChoiceIterator::Confidence() const {
  float confidence;
  if (oemLSTM_ && LSTM_choices_ != nullptr && !LSTM_choices_->empty()) {
    std::pair<const char *, float> choice = *LSTM_choice_it_;
    confidence = 100 - rating_coefficient_ * choice.second;
  } else {
    if (choice_it_ == nullptr) {
      return 0.0f;
    }
    confidence = 100 + 5 * choice_it_->data()->certainty();
  }
  return ClipToRange(confidence, 0.0f, 100.0f);
}
// Returns the confidence of the current choice depending on the used language
// data. If only LSTM traineddata is used the value range is 0.0f - 1.0f. All
// choices for one symbol should roughly add up to 1.0f.
// If only traineddata of the legacy engine is used, the number should be
// interpreted as a percent probability. (0.0f-100.0f) In this case
// probabilities won't add up to 100. Each one stands on its own.
Returns the confidence of the current choice depending on the used language
data. If only LSTM traineddata is used the value range is 0.0f - 1.0f. All
choices for one symbol should roughly add up to 1.0f.
If only traineddata of the legacy engine is used, the number should be
interpreted as a percent probability. (0.0f-100.0f) In this case
probabilities won't add up to 100. Each one stands on its own.
Returns the confidence of the current choice depending on the used language data . If only LSTM traineddata is used the value range is 0 . 0f - 1 . 0f . All choices for one symbol should roughly add up to 1 . 0f . If only traineddata of the legacy engine is used the number should be interpreted as a percent probability . ( 0 . 0f - 100 . 0f ) In this case probabilities won ' t add up to 100 . Each one stands on its own .
float ChoiceIterator::Confidence() const {
  float confidence;
  if (oemLSTM_ && LSTM_choices_ != nullptr && !LSTM_choices_->empty()) {
    std::pair<const char *, float> choice = *LSTM_choice_it_;
    confidence = 100 - rating_coefficient_ * choice.second;
  } else {
    if (choice_it_ == nullptr) {
      return 0.0f;
    }
    confidence = 100 + 5 * choice_it_->data()->certainty();
  }
  return ClipToRange(confidence, 0.0f, 100.0f);
}
float ChoiceIterator :: Confidence ( ) const { float confidence ; if ( oemLSTM_ && LSTM_choices_ != nullptr && ! LSTM_choices_ -> empty ( ) ) { std :: pair < const char * , float > choice = * LSTM_choice_it_ ; confidence = 100 - rating_coefficient_ * choice . second ; } else { if ( choice_it_ == nullptr ) { return 0.0f ; } confidence = 100 + 5 * choice_it_ -> data ( ) -> certainty ( ) ; } return ClipToRange ( confidence , 0.0f , 100.0f ) ; }
Returns the confidence of the current choice depending on the used language
data.
Returns the confidence of the current choice depending on the used language data .