mmehdig / lm_beam_search

This is a simple beam search implementation for generative language model (tested in Keras).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Beam Search for Generative Language Model

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.

About

This is a simple beam search implementation for generative language model (tested in Keras).

License:MIT License


Languages

Language:Python 100.0%