2021-10-17 02:12:59 +00:00
|
|
|
diff --git a/kaldi_active_grammar/utils.py b/kaldi_active_grammar/utils.py
|
2022-03-05 16:20:37 +00:00
|
|
|
index 823f997..3850336 100644
|
2021-10-17 02:12:59 +00:00
|
|
|
--- a/kaldi_active_grammar/utils.py
|
|
|
|
+++ b/kaldi_active_grammar/utils.py
|
|
|
|
@@ -79,7 +79,7 @@ elif sys.platform.startswith('linux'): platform = 'linux'
|
|
|
|
elif sys.platform.startswith('darwin'): platform = 'macos'
|
|
|
|
else: raise KaldiError("unknown sys.platform")
|
|
|
|
|
|
|
|
-exec_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'exec', platform)
|
|
|
|
+exec_dir = '/'
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
import ush
|
|
|
|
|
|
|
|
@@ -87,13 +87,13 @@ class ExternalProcess(object):
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
shell = ush.Shell(raise_on_error=True)
|
|
|
|
|
|
|
|
- fstcompile = shell(os.path.join(exec_dir, 'fstcompile'))
|
|
|
|
- fstarcsort = shell(os.path.join(exec_dir, 'fstarcsort'))
|
|
|
|
- fstaddselfloops = shell(os.path.join(exec_dir, 'fstaddselfloops'))
|
|
|
|
- fstinfo = shell(os.path.join(exec_dir, 'fstinfo'))
|
|
|
|
- # compile_graph = shell(os.path.join(exec_dir, 'compile-graph'))
|
|
|
|
- compile_graph_agf = shell(os.path.join(exec_dir, 'compile-graph-agf'))
|
|
|
|
- # compile_graph_agf_debug = shell(os.path.join(exec_dir, 'compile-graph-agf-debug'))
|
|
|
|
+ fstcompile = shell('fstcompile')
|
|
|
|
+ fstarcsort = shell('fstarcsort')
|
|
|
|
+ fstaddselfloops = shell('fstaddselfloops')
|
|
|
|
+ fstinfo = shell('fstinfo')
|
|
|
|
+ # compile_graph = shell('compile-graph')
|
|
|
|
+ compile_graph_agf = shell('compile-graph-agf')
|
|
|
|
+ # compile_graph_agf_debug = shell('compile-graph-agf-debug')
|
|
|
|
|
|
|
|
make_lexicon_fst = shell([sys.executable, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kaldi', 'make_lexicon_fst%s.py' % ('_py2' if PY2 else ''))])
|
|
|
|
|