Imported from https://github.com/floydhub/word-language-model