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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generic/moses_sim_pe.py')
-rwxr-xr-xscripts/generic/moses_sim_pe.py33
1 files changed, 19 insertions, 14 deletions
diff --git a/scripts/generic/moses_sim_pe.py b/scripts/generic/moses_sim_pe.py
index 32f785961..3497ca558 100755
--- a/scripts/generic/moses_sim_pe.py
+++ b/scripts/generic/moses_sim_pe.py
@@ -1,20 +1,25 @@
#!/usr/bin/env python
# Written by Michael Denkowski
-
-# This script parallelizes decoding with simulated post-editing via moses XML
-# input (XML entities need to be escaped in tokenization). Memory mapped
-# dynamic phrase tables (Ulrich Germann,
-# www.statmt.org/moses/?n=Moses.AdvancedFeatures#ntoc40) and language models
-# (Kenneth Heafield,
-# http://www.statmt.org/moses/?n=FactoredTraining.BuildingLanguageModel#ntoc19)
-# facilitate memory efficient multi process decoding. Input is divided into
-# batches, each of which is decoded sequentially. Each batch pre-loads the
-# data from previous batches.
-
-# To use in tuning, run mert-moses.pl with --sim-pe=SYMAL where SYMAL is the
-# alignment from input to references. Specify the number of jobs with
-# --decoder-flags="-threads N".
+#
+# This file is part of moses. Its use is licensed under the GNU Lesser General
+# Public License version 2.1 or, at your option, any later version.
+
+"""Parallelize decoding with simulated post-editing via moses XML input.
+
+(XML entities need to be escaped in tokenization). Memory mapped
+dynamic phrase tables (Ulrich Germann,
+www.statmt.org/moses/?n=Moses.AdvancedFeatures#ntoc40) and language models
+(Kenneth Heafield,
+http://www.statmt.org/moses/?n=FactoredTraining.BuildingLanguageModel#ntoc19)
+facilitate memory efficient multi process decoding. Input is divided into
+batches, each of which is decoded sequentially. Each batch pre-loads the
+data from previous batches.
+
+To use in tuning, run mert-moses.pl with --sim-pe=SYMAL where SYMAL is the
+alignment from input to references. Specify the number of jobs with
+--decoder-flags="-threads N".
+"""
import gzip
import itertools