commit afca20fad2c27cc4a0313ffb55db3b5fdca1049d Author: vaydheesh Date: Tue Aug 20 10:21:37 2019 +0530 update lt-proc wrapper call for multi-argument typemap diff --git a/apertium/utils.py b/apertium/utils.py index 4ab4c79..c8bb86d 100644 --- a/apertium/utils.py +++ b/apertium/utils.py @@ -74,13 +74,12 @@ def execute_pipeline(inp: str, commands: List[List[str]]) -> str: input_file.close() if 'lt-proc' == command[0]: - dictionary_path = command[-1] + lt_proc_command, dictionary_path = command[:-1], command[-1] lttoolbox.LtLocale.tryToSetLocale() fst = lttoolbox.FST(dictionary_path) if not fst.valid(): raise ValueError('FST Invalid') - lt_proc_command = command[:-1] - fst.lt_proc(len(lt_proc_command), lt_proc_command, input_file.name, output_file.name) + fst.lt_proc(lt_proc_command, input_file.name, output_file.name) elif 'lrx-proc' == command[0]: dictionary_path = command[-1] lextools.LtLocale.tryToSetLocale()