Skip to content

Commit

Permalink
update lt-proc wrapper call for multi-argument typemap
Browse files Browse the repository at this point in the history
  • Loading branch information
singh-lokendra committed Aug 20, 2019
1 parent d49cc0a commit afca20f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apertium/utils.py
Expand Up @@ -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()
Expand Down

0 comments on commit afca20f

Please sign in to comment.