This is a simple beam search implementation for generative language model with predict function.
This implementation is tested for Keras models with predict method and batch inputs. However, it is called simple because it is designed for single input and generation of k-best results. The derivations of this work can be adjusted for batch sentence generation. The input can be a source sentece or any type of input required for generating a sentence in the model.