Using MOSES or PHRASER to translate in python?

724 Views Asked by At

I'm trying to use statistical machine translations in python, and so far, I've been mostly using translate library. However, I heard that Moses, Phraser do a better job of machine translations, so I was wondering if there are ways of using them in python.

Is it possible?

Any explanation would be greatly appreciated.

1

There are 1 best solutions below

2
MrRaghav On

If you want to use in windows using Jupyter, you can use mosestokenizer https://pypi.org/project/mosestokenizer/ . But, it is a wrapper for Perl script and if it fails in Jupyter, use sacremoses https://pypi.org/project/sacremoses/.

However, if it is Linux/Unix, better to use tokenizer.py from https://pypi.org/project/mosestokenizer/#files with necessary arguments.