Skip to content

Commit

Permalink
Fixed nits
Browse files Browse the repository at this point in the history
  • Loading branch information
dabinat committed May 21, 2019
1 parent 969d71a commit 5aaf75d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion native_client/ctcdecode/ctc_beam_search_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void decoder_next(const double *probs,
std::vector<std::pair<size_t, float>> 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;

Expand Down
7 changes: 3 additions & 4 deletions native_client/ctcdecode/ctc_beam_search_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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<Output> decoder_decode(DecoderState *state,
const Alphabet &alphabet,
Expand Down

0 comments on commit 5aaf75d

Please sign in to comment.