Skip to content

Commit

Permalink
Support for choosing fsg/lm
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuashort committed Nov 20, 2016
1 parent b00688b commit 9fc5478
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/language/__init__.py
Expand Up @@ -96,7 +96,8 @@ def update_language(self):
lm_url = path + '/' + number + '.lm'
dic_url = path + '/' + number + '.dic'

self._download_file(lm_url, self.config.lang_file)
if self.config.lang_file is not None:
self._download_file(lm_url, self.config.lang_file)
self._download_file(dic_url, self.config.dic_file)

# def save_language_hash(self):
Expand Down
5 changes: 3 additions & 2 deletions run.py
Expand Up @@ -160,9 +160,10 @@ def process_command(self, command):
# Configure Language
logger.debug("Configuring Module: Language")
conf.strings_file = os.path.join(conf.cache_dir, "sentences.corpus")
conf.lang_file = os.path.join(conf.cache_dir, 'lm')
conf.dic_file = os.path.join(conf.cache_dir, 'dic')
conf.fsg_file = None#os.path.join(conf.cache_dir, 'fsg')
conf.lang_file = os.path.join(conf.cache_dir, 'lm')
conf.fsg_file = None #os.path.join(conf.cache_dir, 'fsg')
# sphinx_jsgf2fsg < conf.jsgf_file > conf.fsg_file
l = LanguageUpdater(conf)
l.update_language()

Expand Down

0 comments on commit 9fc5478

Please sign in to comment.