scripts taken from Moses [https://github.com/moses-smt/mosesdecoder] github.com/pks/scripts @e137509a77e3a8c12af32852ebba893dacb53f85 moses @7b02017da1e2a09486627b543446ec78e51541a7