Skip to content

Commit

Permalink
rename get_language_model -> make_bigram_language_model
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhawkins committed Nov 26, 2015
1 parent 71be2db commit 835fa69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gentle/language_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_node_id(word):

return output

def get_language_model(kaldi_seq, proto_langdir='PROTO_LANGDIR'):
def make_bigram_language_model(kaldi_seq, proto_langdir='PROTO_LANGDIR'):
"""Generates a language model to fit the text.
Returns the filename of the generated language model FST.
Expand Down Expand Up @@ -83,4 +83,4 @@ def get_language_model(kaldi_seq, proto_langdir='PROTO_LANGDIR'):

if __name__=='__main__':
import sys
get_language_model(open(sys.argv[1]).read())
make_bigram_language_model(open(sys.argv[1]).read())
2 changes: 1 addition & 1 deletion gentle/language_model_transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def lm_transcribe(audio_f, transcript, proto_langdir, nnet_dir,

ks = ms.get_kaldi_sequence()

gen_hclg_filename = language_model.get_language_model(ks, proto_langdir)
gen_hclg_filename = language_model.make_bigram_language_model(ks, proto_langdir)
try:
k = standard_kaldi.Kaldi(nnet_dir, gen_hclg_filename, proto_langdir)

Expand Down

0 comments on commit 835fa69

Please sign in to comment.