Skip to content

Commit afca20f

Browse files
update lt-proc wrapper call for multi-argument typemap
1 parent d49cc0a commit afca20f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apertium/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,12 @@ def execute_pipeline(inp: str, commands: List[List[str]]) -> str:
7474
input_file.close()
7575

7676
if 'lt-proc' == command[0]:
77-
dictionary_path = command[-1]
77+
lt_proc_command, dictionary_path = command[:-1], command[-1]
7878
lttoolbox.LtLocale.tryToSetLocale()
7979
fst = lttoolbox.FST(dictionary_path)
8080
if not fst.valid():
8181
raise ValueError('FST Invalid')
82-
lt_proc_command = command[:-1]
83-
fst.lt_proc(len(lt_proc_command), lt_proc_command, input_file.name, output_file.name)
82+
fst.lt_proc(lt_proc_command, input_file.name, output_file.name)
8483
elif 'lrx-proc' == command[0]:
8584
dictionary_path = command[-1]
8685
lextools.LtLocale.tryToSetLocale()

0 commit comments

Comments
 (0)