commit 94c2a69776c30a4e354f833a501e439e7be8ba70 Author: vaydheesh Date: Thu Jul 11 11:51:42 2019 +0530 Wrapper for apertium-tagger diff --git a/apertium/utils.py b/apertium/utils.py index 8898770..79e0dfd 100644 --- a/apertium/utils.py +++ b/apertium/utils.py @@ -77,6 +77,9 @@ def execute_pipeline(inp: str, commands: List[List[str]]) -> str: elif 'apertium-pretransfer' == command[0]: obj = apertium_core.apertium() obj.pretransfer(arg, input_file.name, output_file.name) + elif 'apertium-tagger' == command[0]: + command += [input_file.name, output_file.name] + apertium_core.tagger(len(command), command) else: used_wrapper = False if used_wrapper: diff --git a/build-swig-wrapper.sh b/build-swig-wrapper.sh index 8183f0e..d2378a5 100755 --- a/build-swig-wrapper.sh +++ b/build-swig-wrapper.sh @@ -15,7 +15,7 @@ cd apertium-lex-tools cd python python3 setup.py install -git clone --depth 1 https://github.com/apertium/apertium.git +git clone --depth 1 -b swig_wrapper_tagger https://github.com/Vaydheesh/apertium.git cd apertium ./autogen.sh --enable-python-bindings && make -j2 cd python