def _gen_wordnet(self, wdnet):
if self._languageModel is True:
new_hmmlist = append_to_file(self._viseme_list, ('!ENTER', '!EXIT'))
self._viseme_dict = append_to_file(self._viseme_dict, ('!ENTER []', '!EXIT []'))
cmd = ['HLStats -b ./run/bigrams -o ' + self._viseme_list + ' ' + self._labels]
print(list2cmdline(cmd))
run(cmd, check=True, shell=True)
cmd = ['HBuild -n ./run/bigrams ' + new_hmmlist + ' ' + wdnet]
print(list2cmdline(cmd))
run(cmd, check=True, shell=True)
self._word_net = wdnet
else:
cmd = ['HParse', self._grammar, wdnet]
print(list2cmdline(cmd))
run(cmd, check=True)
self._word_net = wdnet
评论列表
文章目录