corticph / prefix-beam-search

Code for prefix beam search tutorial by @labodk
https://medium.com/corti-ai/ctc-networks-and-language-models-prefix-beam-search-explained-c11d1ee23306
184 stars 37 forks source link

Fixed off-by-one error in greedy decoder #5

Open tscheepers opened 3 years ago

tscheepers commented 3 years ago

Before this change, the EOS was filtered out using np.where(collapsed < (alphabet_size - 1)). This resulted in the line return full_decode[:full_decode.find('>')] not being able to find the end of sentence token.