commit bc80cea5d786552aa4e5d4c95a023ad1def2297b Author: vaydheesh Date: Sun Aug 11 22:22:52 2019 +0530 improved object names diff --git a/apertium/utils.py b/apertium/utils.py index bf5c7b6..3c2c52c 100644 --- a/apertium/utils.py +++ b/apertium/utils.py @@ -74,14 +74,14 @@ def execute_pipeline(inp: str, commands: List[List[str]]) -> str: lrx = lextools.LRXProc(dictionary_path) lrx.lrx_proc(arg, input_file.name, output_file.name) elif 'apertium-transfer' == command[0]: - obj = apertium_core.ApertiumTransfer(command[2], command[3]) - obj.transfer_text(arg, input_file.name, output_file.name) + transfer = apertium_core.ApertiumTransfer(command[2], command[3]) + transfer.transfer_text(arg, input_file.name, output_file.name) elif 'apertium-interchunk' == command[0]: - obj = apertium_core.ApertiumInterchunk(command[1], command[2]) - obj.interchunk_text(arg, input_file.name, output_file.name) + interchunk = apertium_core.ApertiumInterchunk(command[1], command[2]) + interchunk.interchunk_text(arg, input_file.name, output_file.name) elif 'apertium-postchunk' == command[0]: - obj = apertium_core.ApertiumPostchunk(command[1], command[2]) - obj.postchunk_text(arg, input_file.name, output_file.name) + postchunk = apertium_core.ApertiumPostchunk(command[1], command[2]) + postchunk.postchunk_text(arg, input_file.name, output_file.name) elif 'apertium-pretransfer' == command[0]: apertium_core.pretransfer(arg, input_file.name, output_file.name) elif 'apertium-tagger' == command[0]: @@ -89,9 +89,9 @@ def execute_pipeline(inp: str, commands: List[List[str]]) -> str: apertium_core.ApertiumTagger(len(command), command) elif 'cg-proc' == command[0]: dictionary_path = command[-1] - obj = constraint_grammar.CGProc(dictionary_path) + cg = constraint_grammar.CGProc(dictionary_path) cg_proc_command = command[:-1] - obj.cg_proc(len(cg_proc_command), cg_proc_command, input_file.name, output_file.name) + cg.cg_proc(len(cg_proc_command), cg_proc_command, input_file.name, output_file.name) else: used_wrapper = False