From 835fa69db29bf7b73075e096c600549f24ebbbb1 Mon Sep 17 00:00:00 2001 From: Max Hawkins Date: Thu, 26 Nov 2015 23:57:04 +0100 Subject: [PATCH] rename get_language_model -> make_bigram_language_model --- gentle/language_model.py | 4 ++-- gentle/language_model_transcribe.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gentle/language_model.py b/gentle/language_model.py index fecdb6f6..f393abb9 100644 --- a/gentle/language_model.py +++ b/gentle/language_model.py @@ -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. @@ -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()) diff --git a/gentle/language_model_transcribe.py b/gentle/language_model_transcribe.py index 82f4c293..a842bc14 100644 --- a/gentle/language_model_transcribe.py +++ b/gentle/language_model_transcribe.py @@ -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)