Welcome to mirror list, hosted at ThFree Co, Russian Federation.

amun.py « scripts - github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 98d94c3b68c6e2f29c6503669cab7f850366cba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python
# script by Ulrich Germann
# This script is meant to test the python interface of amun by emulating the amun executable.
import sys, os

if 'AMUN_PYLIB_DIR' in os.environ:
    sys.path.append(os.environ['AMUN_PYLIB_DIR'])
    pass

import libamunmt
if __name__ == "__main__":
    libamunmt.init(" ".join(sys.argv[1:]))
    print libamunmt.translate(sys.stdin.readlines())
    libamunmt.shutdown()