diff --git a/native_client/ctcdecode/ctc_beam_search_decoder.cpp b/native_client/ctcdecode/ctc_beam_search_decoder.cpp index a904fc1f1f..37cb507ba4 100644 --- a/native_client/ctcdecode/ctc_beam_search_decoder.cpp +++ b/native_client/ctcdecode/ctc_beam_search_decoder.cpp @@ -75,7 +75,7 @@ void decoder_next(const double *probs, std::vector> log_prob_idx = get_pruned_log_probs(prob, class_dim, cutoff_prob, cutoff_top_n); // loop over chars - for (size_t index = 0; index < log_prob_idx.size(); index++) { + for (size_t index = 0; index < log_prob_idx.size(); index++) { auto c = log_prob_idx[index].first; auto log_prob_c = log_prob_idx[index].second; diff --git a/native_client/ctcdecode/ctc_beam_search_decoder.h b/native_client/ctcdecode/ctc_beam_search_decoder.h index 12a2b380ac..7e83720c16 100644 --- a/native_client/ctcdecode/ctc_beam_search_decoder.h +++ b/native_client/ctcdecode/ctc_beam_search_decoder.h @@ -18,7 +18,7 @@ * n-gram language model scoring and word insertion term. * Default null, decoding the input sample without scorer. * Return: - * A struct containing word prefixes and state variables. + * A struct containing prefixes and state variables. */ DecoderState* decoder_init(const Alphabet &alphabet, int class_dim, @@ -39,8 +39,6 @@ DecoderState* decoder_init(const Alphabet &alphabet, * ext_scorer: External scorer to evaluate a prefix, which consists of * n-gram language model scoring and word insertion term. * Default null, decoding the input sample without scorer. - * Return: - * A struct containing word prefixes and state variables. */ void decoder_next(const double *probs, const Alphabet &alphabet, @@ -62,7 +60,8 @@ void decoder_next(const double *probs, * n-gram language model scoring and word insertion term. * Default null, decoding the input sample without scorer. * Return: - * A struct containing word prefixes and state variables. + * A vector where each element is a pair of score and decoding result, + * in descending order. */ std::vector decoder_decode(DecoderState *state, const Alphabet &alphabet,