title: Beam Search in Python
body: <p>I am implementing a Seq2Seq model in Keras. However, they have not provided the beam search option in the decoder. Hence, I considered pynlpl's BeamSearch but their documentation on search found <a href="http://pynlpl.readthedocs.io/en/latest/search.html" rel="nofollow noreferrer">here</a> doesn't have any information about how to implement it. Could you please give an example of how beam search can be implemented? </p>
  
  <p>There is a similar answer here: <a href="https://stackoverflow.com/questions/41992190/how-to-implement-a-custom-beam-search-in-tensorflow">How to implement a custom beam search in TensorFlow?</a>
  but, its not clear.</p>