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:
-rwxr-xr-xscripts/OSM/OSM-Train.perl1
-rwxr-xr-xscripts/OSM/extract-singletons.perl1
-rwxr-xr-xscripts/OSM/flipAlignment.perl4
-rwxr-xr-xscripts/Transliteration/clean.pl1
-rwxr-xr-xscripts/Transliteration/corpusCreator.pl1
-rwxr-xr-xscripts/Transliteration/in-decoding-transliteration.pl1
-rwxr-xr-xscripts/Transliteration/post-decoding-transliteration.pl1
-rwxr-xr-xscripts/Transliteration/prepare-transliteration-phrase-table.pl1
-rwxr-xr-xscripts/Transliteration/threshold.pl1
-rwxr-xr-xscripts/Transliteration/train-transliteration-module.pl1
-rwxr-xr-xscripts/analysis/bootstrap-hypothesis-difference-significance.pl1
-rwxr-xr-xscripts/analysis/sentence-by-sentence.pl1
-rwxr-xr-xscripts/analysis/sg2dot.perl1
-rwxr-xr-xscripts/analysis/show-phrases-used.pl2
-rwxr-xr-xscripts/analysis/smtgui/filter-phrase-table.pl1
-rwxr-xr-xscripts/ems/experiment.perl1
-rwxr-xr-xscripts/ems/fix-info.perl1
-rwxr-xr-xscripts/ems/support/analysis.perl1
-rwxr-xr-xscripts/ems/support/build-domain-file-from-subcorpora.perl1
-rwxr-xr-xscripts/ems/support/build-sparse-features.perl1
-rwxr-xr-xscripts/ems/support/consolidate-training-data.perl1
-rwxr-xr-xscripts/ems/support/generic-multicore-parallelizer.perl1
-rwxr-xr-xscripts/ems/support/generic-parallelizer.perl1
-rwxr-xr-xscripts/ems/support/input-from-sgm.perl1
-rwxr-xr-xscripts/ems/support/interpolate-lm.perl1
-rwxr-xr-xscripts/ems/support/lmplz-wrapper.perl1
-rwxr-xr-xscripts/ems/support/mml-filter.perl1
-rwxr-xr-xscripts/ems/support/mml-score.perl1
-rwxr-xr-xscripts/ems/support/mml-train.perl1
-rwxr-xr-xscripts/ems/support/prepare-fast-align.perl1
-rwxr-xr-xscripts/ems/support/reference-from-sgm.perl1
-rwxr-xr-xscripts/ems/support/remove-segmentation-markup.perl1
-rwxr-xr-xscripts/ems/support/report-experiment-scores.perl1
-rwxr-xr-xscripts/ems/support/run-command-on-multiple-refsets.perl1
-rwxr-xr-xscripts/ems/support/run-wade.perl1
-rwxr-xr-xscripts/ems/support/split-sentences.perl1
-rwxr-xr-xscripts/ems/support/submit-grid.perl1
-rwxr-xr-xscripts/ems/support/substitute-filtered-tables-and-weights.perl1
-rwxr-xr-xscripts/ems/support/substitute-filtered-tables.perl2
-rwxr-xr-xscripts/ems/support/substitute-weights.perl2
-rwxr-xr-xscripts/ems/support/symmetrize-fast-align.perl1
-rwxr-xr-xscripts/ems/support/thot-lm-wrapper.perl1
-rwxr-xr-xscripts/ems/support/wrap-xml.perl1
-rwxr-xr-xscripts/ems/web/progress.perl1
-rwxr-xr-xscripts/fuzzy-match/create_xml.perl1
-rwxr-xr-xscripts/generic/compound-splitter.perl1
-rwxr-xr-xscripts/generic/extract-factors.pl1
-rwxr-xr-xscripts/generic/extract-parallel.perl1
-rwxr-xr-xscripts/generic/fsa2fsal.pl1
-rwxr-xr-xscripts/generic/fsa2plf.pl1
-rwxr-xr-xscripts/generic/fsal2fsa.pl1
-rwxr-xr-xscripts/generic/generic-parallel.perl1
-rwxr-xr-xscripts/generic/giza-parallel.perl1
-rwxr-xr-xscripts/generic/lopar2pos.pl2
-rwxr-xr-xscripts/generic/moses-parallel.pl1
-rwxr-xr-xscripts/generic/mteval-v12.pl1
-rwxr-xr-xscripts/generic/multi-bleu.perl1
-rwxr-xr-xscripts/generic/ph_numbers.perl1
-rwxr-xr-xscripts/generic/qsub-wrapper.pl1
-rwxr-xr-xscripts/generic/reverse-alignment.perl1
-rwxr-xr-xscripts/generic/score-parallel.perl1
-rwxr-xr-xscripts/generic/strip-xml.perl1
-rwxr-xr-xscripts/generic/trainlm-irst2.perl1
-rwxr-xr-xscripts/generic/trainlm-lmplz.perl1
-rwxr-xr-xscripts/other/beautify.perl1
-rwxr-xr-xscripts/other/delete-scores.perl1
-rwxr-xr-xscripts/other/get_many_translations_from_google.perl1
-rwxr-xr-xscripts/recaser/detruecase.perl1
-rwxr-xr-xscripts/recaser/recase.perl1
-rwxr-xr-xscripts/recaser/train-recaser.perl1
-rwxr-xr-xscripts/recaser/train-truecaser.perl1
-rwxr-xr-xscripts/recaser/truecase.perl2
-rwxr-xr-xscripts/regression-testing/compare-results.pl1
-rwxr-xr-xscripts/regression-testing/create_localized_moses_ini.pl1
-rwxr-xr-xscripts/regression-testing/modify-pars.pl1
-rwxr-xr-xscripts/regression-testing/moses-virtual.pl1
-rwxr-xr-xscripts/regression-testing/run-single-test.pl1
-rwxr-xr-xscripts/regression-testing/run-test-suite.pl1
-rwxr-xr-xscripts/tokenizer/deescape-special-chars-PTB.perl1
-rwxr-xr-xscripts/tokenizer/deescape-special-chars.perl1
-rwxr-xr-xscripts/tokenizer/detokenizer.perl2
-rwxr-xr-xscripts/tokenizer/escape-special-chars.perl1
-rwxr-xr-xscripts/tokenizer/lowercase.perl1
-rwxr-xr-xscripts/tokenizer/normalize-punctuation.perl1
-rwxr-xr-xscripts/tokenizer/pre-tokenizer.perl1
-rwxr-xr-xscripts/tokenizer/remove-non-printing-char.perl1
-rwxr-xr-xscripts/tokenizer/replace-unicode-punctuation.perl1
-rwxr-xr-xscripts/tokenizer/tokenizer.perl1
-rwxr-xr-xscripts/tokenizer/tokenizer_PTB.perl1
-rwxr-xr-xscripts/training/absolutize_moses_model.pl2
-rwxr-xr-xscripts/training/binarize-model.perl1
-rwxr-xr-xscripts/training/build-generation-table.perl1
-rwxr-xr-xscripts/training/build-mmsapt.perl1
-rwxr-xr-xscripts/training/clean-corpus-n.perl1
-rwxr-xr-xscripts/training/clone_moses_model.pl1
-rwxr-xr-xscripts/training/convert-moses-ini-to-v2.perl1
-rwxr-xr-xscripts/training/corpus-sizes.perl1
-rwxr-xr-xscripts/training/exodus.perl1
-rwxr-xr-xscripts/training/filter-model-given-input.pl1
-rwxr-xr-xscripts/training/get-lexical.perl1
-rwxr-xr-xscripts/training/giza2bal.pl2
-rwxr-xr-xscripts/training/mert-moses.pl1
-rwxr-xr-xscripts/training/postprocess-lopar.perl1
-rwxr-xr-xscripts/training/reduce-factors.perl1
-rwxr-xr-xscripts/training/remove-orphan-phrase-pairs-from-reordering-table.perl1
-rwxr-xr-xscripts/training/threshold-filter.perl1
-rwxr-xr-xscripts/training/train-global-lexicon-model.perl1
-rwxr-xr-xscripts/training/train-model.perl1
-rwxr-xr-xscripts/training/wrappers/berkeleyparsed2mosesxml.perl1
-rwxr-xr-xscripts/training/wrappers/berkeleyparsed2mosesxml_PTB.perl1
-rwxr-xr-xscripts/training/wrappers/filter-excluded-lines.perl1
-rwxr-xr-xscripts/training/wrappers/find-unparseable.perl1
-rwxr-xr-xscripts/training/wrappers/mada-wrapper.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-brown-cluster-mkcls.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-de-morph.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-de-pos.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-en-pos.mxpost.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-pos.tree-tagger.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-stem.perl1
-rwxr-xr-xscripts/training/wrappers/make-factor-suffix.perl1
-rwxr-xr-xscripts/training/wrappers/mosesxml2berkeleyparsed.perl1
-rwxr-xr-xscripts/training/wrappers/parse-de-berkeley.perl1
-rwxr-xr-xscripts/training/wrappers/parse-de-bitpar.perl1
-rwxr-xr-xscripts/training/wrappers/parse-en-collins.perl1
-rwxr-xr-xscripts/training/wrappers/parse-en-egret.perl1
-rwxr-xr-xscripts/training/wrappers/syntax-hyphen-splitting.perl1
-rwxr-xr-xscripts/training/wrappers/tagger-german-chunk.perl1
127 files changed, 137 insertions, 1 deletions
diff --git a/scripts/OSM/OSM-Train.perl b/scripts/OSM/OSM-Train.perl
index 27ecfe342..e2b604f0b 100755
--- a/scripts/OSM/OSM-Train.perl
+++ b/scripts/OSM/OSM-Train.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/OSM/extract-singletons.perl b/scripts/OSM/extract-singletons.perl
index faa4e8dd6..83719502f 100755
--- a/scripts/OSM/extract-singletons.perl
+++ b/scripts/OSM/extract-singletons.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use Getopt::Std;
getopts('q');
diff --git a/scripts/OSM/flipAlignment.perl b/scripts/OSM/flipAlignment.perl
index 3c14a4542..3559bf79b 100755
--- a/scripts/OSM/flipAlignment.perl
+++ b/scripts/OSM/flipAlignment.perl
@@ -1,5 +1,7 @@
#!/usr/bin/env perl
- use strict;
+
+use warnings;
+use strict;
my $file = shift(@ARGV);
open(MYFILE, $file);
diff --git a/scripts/Transliteration/clean.pl b/scripts/Transliteration/clean.pl
index 252a25075..c59bf0798 100755
--- a/scripts/Transliteration/clean.pl
+++ b/scripts/Transliteration/clean.pl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
#input hindi word urdu word, delete all those entries that have number on any side
+use warnings;
use utf8;
use Getopt::Std;
diff --git a/scripts/Transliteration/corpusCreator.pl b/scripts/Transliteration/corpusCreator.pl
index 8c8dab863..d2df8323c 100755
--- a/scripts/Transliteration/corpusCreator.pl
+++ b/scripts/Transliteration/corpusCreator.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use utf8;
diff --git a/scripts/Transliteration/in-decoding-transliteration.pl b/scripts/Transliteration/in-decoding-transliteration.pl
index e4e8b41e3..216d99a3e 100755
--- a/scripts/Transliteration/in-decoding-transliteration.pl
+++ b/scripts/Transliteration/in-decoding-transliteration.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use utf8;
diff --git a/scripts/Transliteration/post-decoding-transliteration.pl b/scripts/Transliteration/post-decoding-transliteration.pl
index 7e6f249ae..201f40d97 100755
--- a/scripts/Transliteration/post-decoding-transliteration.pl
+++ b/scripts/Transliteration/post-decoding-transliteration.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use utf8;
diff --git a/scripts/Transliteration/prepare-transliteration-phrase-table.pl b/scripts/Transliteration/prepare-transliteration-phrase-table.pl
index 565a98297..4fc03b526 100755
--- a/scripts/Transliteration/prepare-transliteration-phrase-table.pl
+++ b/scripts/Transliteration/prepare-transliteration-phrase-table.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use utf8;
diff --git a/scripts/Transliteration/threshold.pl b/scripts/Transliteration/threshold.pl
index 8af699821..8e3704fd6 100755
--- a/scripts/Transliteration/threshold.pl
+++ b/scripts/Transliteration/threshold.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use utf8;
require Encode;
use IO::Handle;
diff --git a/scripts/Transliteration/train-transliteration-module.pl b/scripts/Transliteration/train-transliteration-module.pl
index 54c2ccf78..05804afb6 100755
--- a/scripts/Transliteration/train-transliteration-module.pl
+++ b/scripts/Transliteration/train-transliteration-module.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use utf8;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/analysis/bootstrap-hypothesis-difference-significance.pl b/scripts/analysis/bootstrap-hypothesis-difference-significance.pl
index b74aa003d..149676b6f 100755
--- a/scripts/analysis/bootstrap-hypothesis-difference-significance.pl
+++ b/scripts/analysis/bootstrap-hypothesis-difference-significance.pl
@@ -14,6 +14,7 @@ use utf8;
# 23.01.2010: added NIST p-value and interval computation
###############################################
+use warnings;
use strict;
#constants
diff --git a/scripts/analysis/sentence-by-sentence.pl b/scripts/analysis/sentence-by-sentence.pl
index c8bc367b2..4f6560a56 100755
--- a/scripts/analysis/sentence-by-sentence.pl
+++ b/scripts/analysis/sentence-by-sentence.pl
@@ -4,6 +4,7 @@
#sentence-by-sentence: take in a system output, with any number of factors, and a reference translation, also maybe with factors, and show each sentence and its errors
#usage: sentence-by-sentence SYSOUT [REFERENCE]+ > sentences.html
+use warnings;
use strict;
use Getopt::Long;
diff --git a/scripts/analysis/sg2dot.perl b/scripts/analysis/sg2dot.perl
index a165cf25e..b17dfd9fb 100755
--- a/scripts/analysis/sg2dot.perl
+++ b/scripts/analysis/sg2dot.perl
@@ -4,6 +4,7 @@
# Script to convert MOSES searchgraph to DOT format
#
+use warnings;
use strict;
use File::Path;
use File::Basename;
diff --git a/scripts/analysis/show-phrases-used.pl b/scripts/analysis/show-phrases-used.pl
index c31e930d5..0a719d207 100755
--- a/scripts/analysis/show-phrases-used.pl
+++ b/scripts/analysis/show-phrases-used.pl
@@ -5,7 +5,9 @@
#usage: show-phrases-used DECODER_OUTFILE > output.html
# where DECODER_OUTFILE is the output of moses with the -T (show alignments) option
+use warnings;
use strict;
+
BEGIN
{
my $wd= `pawd 2>/dev/null`;
diff --git a/scripts/analysis/smtgui/filter-phrase-table.pl b/scripts/analysis/smtgui/filter-phrase-table.pl
index ed09d0b3f..9f411f3fa 100755
--- a/scripts/analysis/smtgui/filter-phrase-table.pl
+++ b/scripts/analysis/smtgui/filter-phrase-table.pl
@@ -9,6 +9,7 @@
#similar function to filter-model-given-input.pl, but only operates
#on the phrase table and doesn't require that any subdirectories exist
+use warnings;
use strict;
my $MAX_LENGTH = 10;
diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl
index a7ce88622..7070a7c9e 100755
--- a/scripts/ems/experiment.perl
+++ b/scripts/ems/experiment.perl
@@ -3,6 +3,7 @@
# Experiment Management System
# Documentation at http://www.statmt.org/moses/?n=FactoredTraining.EMS
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/ems/fix-info.perl b/scripts/ems/fix-info.perl
index 98139f211..8f83d4ccf 100755
--- a/scripts/ems/fix-info.perl
+++ b/scripts/ems/fix-info.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($file,$step) = @ARGV;
diff --git a/scripts/ems/support/analysis.perl b/scripts/ems/support/analysis.perl
index 8df3d6551..cea2657c9 100755
--- a/scripts/ems/support/analysis.perl
+++ b/scripts/ems/support/analysis.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/ems/support/build-domain-file-from-subcorpora.perl b/scripts/ems/support/build-domain-file-from-subcorpora.perl
index 683ef1ed7..f166c8927 100755
--- a/scripts/ems/support/build-domain-file-from-subcorpora.perl
+++ b/scripts/ems/support/build-domain-file-from-subcorpora.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
# Create domain file from corpora
diff --git a/scripts/ems/support/build-sparse-features.perl b/scripts/ems/support/build-sparse-features.perl
index 04da69873..5d9b786ad 100755
--- a/scripts/ems/support/build-sparse-features.perl
+++ b/scripts/ems/support/build-sparse-features.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
# Build necessary files for sparse lexical features
diff --git a/scripts/ems/support/consolidate-training-data.perl b/scripts/ems/support/consolidate-training-data.perl
index f312b1649..170ba999c 100755
--- a/scripts/ems/support/consolidate-training-data.perl
+++ b/scripts/ems/support/consolidate-training-data.perl
@@ -2,6 +2,7 @@
# $Id: consolidate-training-data.perl 928 2009-09-02 02:58:01Z philipp $
+use warnings;
use strict;
my ($in,$out,$consolidated,@PART) = @ARGV;
diff --git a/scripts/ems/support/generic-multicore-parallelizer.perl b/scripts/ems/support/generic-multicore-parallelizer.perl
index 073e0f62e..e5a12adce 100755
--- a/scripts/ems/support/generic-multicore-parallelizer.perl
+++ b/scripts/ems/support/generic-multicore-parallelizer.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $cores = 8;
diff --git a/scripts/ems/support/generic-parallelizer.perl b/scripts/ems/support/generic-parallelizer.perl
index db4d2f492..0b248be7e 100755
--- a/scripts/ems/support/generic-parallelizer.perl
+++ b/scripts/ems/support/generic-parallelizer.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $jobs = 20;
diff --git a/scripts/ems/support/input-from-sgm.perl b/scripts/ems/support/input-from-sgm.perl
index 81f177d6c..223996676 100755
--- a/scripts/ems/support/input-from-sgm.perl
+++ b/scripts/ems/support/input-from-sgm.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
die("ERROR syntax: input-from-sgm.perl < in.sgm > in.txt")
diff --git a/scripts/ems/support/interpolate-lm.perl b/scripts/ems/support/interpolate-lm.perl
index 34bd2219d..a2fe62b22 100755
--- a/scripts/ems/support/interpolate-lm.perl
+++ b/scripts/ems/support/interpolate-lm.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use IPC::Open3;
use File::Temp qw/tempdir/;
diff --git a/scripts/ems/support/lmplz-wrapper.perl b/scripts/ems/support/lmplz-wrapper.perl
index 0fa676ce8..f79399d6b 100755
--- a/scripts/ems/support/lmplz-wrapper.perl
+++ b/scripts/ems/support/lmplz-wrapper.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/ems/support/mml-filter.perl b/scripts/ems/support/mml-filter.perl
index 5b6e02834..c50725aae 100755
--- a/scripts/ems/support/mml-filter.perl
+++ b/scripts/ems/support/mml-filter.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use FindBin qw($RealBin);
diff --git a/scripts/ems/support/mml-score.perl b/scripts/ems/support/mml-score.perl
index 1fe065586..449d6a05c 100755
--- a/scripts/ems/support/mml-score.perl
+++ b/scripts/ems/support/mml-score.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
#
diff --git a/scripts/ems/support/mml-train.perl b/scripts/ems/support/mml-train.perl
index aacf153a7..1f0548082 100755
--- a/scripts/ems/support/mml-train.perl
+++ b/scripts/ems/support/mml-train.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($indomain_source,,$indomain_target,$outdomain_source,$outdomain_target,$lm_training,$lm_binarizer,$order,$lm_settings,$line_count,$model);
diff --git a/scripts/ems/support/prepare-fast-align.perl b/scripts/ems/support/prepare-fast-align.perl
index 1d6e75422..4ecc14cd7 100755
--- a/scripts/ems/support/prepare-fast-align.perl
+++ b/scripts/ems/support/prepare-fast-align.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($source_file,$target_file,$alignment_factors) = @ARGV;
diff --git a/scripts/ems/support/reference-from-sgm.perl b/scripts/ems/support/reference-from-sgm.perl
index 0749648c0..595226bf1 100755
--- a/scripts/ems/support/reference-from-sgm.perl
+++ b/scripts/ems/support/reference-from-sgm.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
die("ERROR syntax: reference-from-sgm.perl ref src out")
diff --git a/scripts/ems/support/remove-segmentation-markup.perl b/scripts/ems/support/remove-segmentation-markup.perl
index b345c9a7e..d6333f813 100755
--- a/scripts/ems/support/remove-segmentation-markup.perl
+++ b/scripts/ems/support/remove-segmentation-markup.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
$|++;
diff --git a/scripts/ems/support/report-experiment-scores.perl b/scripts/ems/support/report-experiment-scores.perl
index 5bcf32f48..2e433f291 100755
--- a/scripts/ems/support/report-experiment-scores.perl
+++ b/scripts/ems/support/report-experiment-scores.perl
@@ -2,6 +2,7 @@
# $Id: report-experiment-scores.perl 407 2008-11-10 14:43:31Z philipp $
+use warnings;
use strict;
my $email;
diff --git a/scripts/ems/support/run-command-on-multiple-refsets.perl b/scripts/ems/support/run-command-on-multiple-refsets.perl
index f8e211582..c3db3c4dc 100755
--- a/scripts/ems/support/run-command-on-multiple-refsets.perl
+++ b/scripts/ems/support/run-command-on-multiple-refsets.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
die("ERROR: syntax: run-command-on-multiple-refsets.perl cmd in out")
diff --git a/scripts/ems/support/run-wade.perl b/scripts/ems/support/run-wade.perl
index cf4121a14..25cda3bb3 100755
--- a/scripts/ems/support/run-wade.perl
+++ b/scripts/ems/support/run-wade.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use File::Temp qw/ tempfile tempdir /;
diff --git a/scripts/ems/support/split-sentences.perl b/scripts/ems/support/split-sentences.perl
index 6537e84b3..f1af451b3 100755
--- a/scripts/ems/support/split-sentences.perl
+++ b/scripts/ems/support/split-sentences.perl
@@ -6,6 +6,7 @@ binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
+use warnings;
use FindBin qw($RealBin);
use strict;
diff --git a/scripts/ems/support/submit-grid.perl b/scripts/ems/support/submit-grid.perl
index 6e6193674..087d41647 100755
--- a/scripts/ems/support/submit-grid.perl
+++ b/scripts/ems/support/submit-grid.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Cwd;
use FindBin qw($RealBin);
diff --git a/scripts/ems/support/substitute-filtered-tables-and-weights.perl b/scripts/ems/support/substitute-filtered-tables-and-weights.perl
index 9c06b54f8..681d251c7 100755
--- a/scripts/ems/support/substitute-filtered-tables-and-weights.perl
+++ b/scripts/ems/support/substitute-filtered-tables-and-weights.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/ems/support/substitute-filtered-tables.perl b/scripts/ems/support/substitute-filtered-tables.perl
index eee454728..e7d9f55f8 100755
--- a/scripts/ems/support/substitute-filtered-tables.perl
+++ b/scripts/ems/support/substitute-filtered-tables.perl
@@ -1,5 +1,7 @@
#!/usr/bin/env perl
+use warnings;
+
# experiment.perl support script
# get filtered rule and reordering tables and place them into a configuration file
diff --git a/scripts/ems/support/substitute-weights.perl b/scripts/ems/support/substitute-weights.perl
index 24ac034e8..42357ed1e 100755
--- a/scripts/ems/support/substitute-weights.perl
+++ b/scripts/ems/support/substitute-weights.perl
@@ -1,5 +1,7 @@
#!/usr/bin/env perl
+use warnings;
+
# experiment.perl support script
# get filtered rule and reordering tables and place them into a configuration file
diff --git a/scripts/ems/support/symmetrize-fast-align.perl b/scripts/ems/support/symmetrize-fast-align.perl
index f93af642d..90621dea9 100755
--- a/scripts/ems/support/symmetrize-fast-align.perl
+++ b/scripts/ems/support/symmetrize-fast-align.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
die("ERROR: syntax is fastalign2bal.perl direct-alignment inverse-alignment source-file target-file out-stem symmetrization-method symal\n") unless scalar(@ARGV) == 7;
diff --git a/scripts/ems/support/thot-lm-wrapper.perl b/scripts/ems/support/thot-lm-wrapper.perl
index bd1f89c7b..222623c5b 100755
--- a/scripts/ems/support/thot-lm-wrapper.perl
+++ b/scripts/ems/support/thot-lm-wrapper.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/ems/support/wrap-xml.perl b/scripts/ems/support/wrap-xml.perl
index 587e4c541..28708a62a 100755
--- a/scripts/ems/support/wrap-xml.perl
+++ b/scripts/ems/support/wrap-xml.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($language,$src,$system) = @ARGV;
diff --git a/scripts/ems/web/progress.perl b/scripts/ems/web/progress.perl
index 0612a0a44..fd742e410 100755
--- a/scripts/ems/web/progress.perl
+++ b/scripts/ems/web/progress.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Date::Parse;
diff --git a/scripts/fuzzy-match/create_xml.perl b/scripts/fuzzy-match/create_xml.perl
index 56d4dff0f..80a1b3120 100755
--- a/scripts/fuzzy-match/create_xml.perl
+++ b/scripts/fuzzy-match/create_xml.perl
@@ -3,6 +3,7 @@
binmode( STDIN, ":utf8" );
binmode( STDOUT, ":utf8" );
+use warnings;
use strict;
use FindBin qw($RealBin);
use File::Basename;
diff --git a/scripts/generic/compound-splitter.perl b/scripts/generic/compound-splitter.perl
index bbbccc8ef..c0b25f519 100755
--- a/scripts/generic/compound-splitter.perl
+++ b/scripts/generic/compound-splitter.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/generic/extract-factors.pl b/scripts/generic/extract-factors.pl
index 566849053..56c719051 100755
--- a/scripts/generic/extract-factors.pl
+++ b/scripts/generic/extract-factors.pl
@@ -6,6 +6,7 @@
#factor indices start at 0
#factor indices too large ought to be ignored
+use warnings;
use strict;
my ($filename, @factors) = @ARGV;
diff --git a/scripts/generic/extract-parallel.perl b/scripts/generic/extract-parallel.perl
index 3c7429212..2b02fa869 100755
--- a/scripts/generic/extract-parallel.perl
+++ b/scripts/generic/extract-parallel.perl
@@ -3,6 +3,7 @@
# example
# ./extract-parallel.perl 8 ./coreutils-8.9/src/split "./coreutils-8.9/src/sort --batch-size=253" ./extract ./corpus.5.en ./corpus.5.ar ./align.ar-en.grow-diag-final-and ./extracted 7 --NoFileLimit orientation --GZOutput
+use warnings;
use strict;
use File::Basename;
diff --git a/scripts/generic/fsa2fsal.pl b/scripts/generic/fsa2fsal.pl
index 8cfdc0462..50bff1404 100755
--- a/scripts/generic/fsa2fsal.pl
+++ b/scripts/generic/fsa2fsal.pl
@@ -5,6 +5,7 @@
# Some rudimentary sanity checks are done on the fly.
# Ondrej Bojar, bojar@ufal.mff.cuni.cz
+use warnings;
use strict;
my $errs = 0;
diff --git a/scripts/generic/fsa2plf.pl b/scripts/generic/fsa2plf.pl
index 1177b01d5..4e7454a9f 100755
--- a/scripts/generic/fsa2plf.pl
+++ b/scripts/generic/fsa2plf.pl
@@ -8,6 +8,7 @@
# Note that the output format may not contain any spaces.
# Ondrej Bojar, bojar@ufal.mff.cuni.cz
+use warnings;
use strict;
use Getopt::Long;
diff --git a/scripts/generic/fsal2fsa.pl b/scripts/generic/fsal2fsa.pl
index 26258587d..d1aa461ac 100755
--- a/scripts/generic/fsal2fsa.pl
+++ b/scripts/generic/fsal2fsa.pl
@@ -2,6 +2,7 @@
# A very simple script that converts fsal back to fsa format (openfst lattices)
# Ondrej Bojar, bojar@ufal.mff.cuni.cz
+use warnings;
use strict;
while (<>) {
diff --git a/scripts/generic/generic-parallel.perl b/scripts/generic/generic-parallel.perl
index b7dca1bc9..653912c5c 100755
--- a/scripts/generic/generic-parallel.perl
+++ b/scripts/generic/generic-parallel.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use utf8;
diff --git a/scripts/generic/giza-parallel.perl b/scripts/generic/giza-parallel.perl
index b5575e4d0..8793d3d8e 100755
--- a/scripts/generic/giza-parallel.perl
+++ b/scripts/generic/giza-parallel.perl
@@ -3,6 +3,7 @@
# example
# ~/giza-parallel.perl 10 split ~/workspace/sourceforge/trunk/scripts/training/train-model.perl ar en train align
+use warnings;
use strict;
use File::Basename;
diff --git a/scripts/generic/lopar2pos.pl b/scripts/generic/lopar2pos.pl
index d95389c05..c75069135 100755
--- a/scripts/generic/lopar2pos.pl
+++ b/scripts/generic/lopar2pos.pl
@@ -4,6 +4,8 @@
#lopar2pos: extract POSs from LOPAR output
#usage: lopar2pos.pl CORPUS.lopar > CORPUS.pos
+use warnings;
+
my $infilename = shift @ARGV;
open(INFILE, "<$infilename") or die "couldn't open '$infilename' for read: $!\n";
while(my $line = <INFILE>)
diff --git a/scripts/generic/moses-parallel.pl b/scripts/generic/moses-parallel.pl
index 4890864aa..7c0f56c70 100755
--- a/scripts/generic/moses-parallel.pl
+++ b/scripts/generic/moses-parallel.pl
@@ -15,6 +15,7 @@
# added checks for existence of decoder and configuration file
# 26 Jul 2006 fix a bug related to the use of absolute path for srcfile and nbestfile
+use warnings;
use strict;
#######################
diff --git a/scripts/generic/mteval-v12.pl b/scripts/generic/mteval-v12.pl
index 0c771fc77..360376242 100755
--- a/scripts/generic/mteval-v12.pl
+++ b/scripts/generic/mteval-v12.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use utf8;
use Encode;
diff --git a/scripts/generic/multi-bleu.perl b/scripts/generic/multi-bleu.perl
index 5ed6add74..2f44d419f 100755
--- a/scripts/generic/multi-bleu.perl
+++ b/scripts/generic/multi-bleu.perl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id$
+use warnings;
use strict;
my $lowercase = 0;
diff --git a/scripts/generic/ph_numbers.perl b/scripts/generic/ph_numbers.perl
index b33cd2805..ea56927ac 100755
--- a/scripts/generic/ph_numbers.perl
+++ b/scripts/generic/ph_numbers.perl
@@ -7,6 +7,7 @@ package ph_numbers;
#
# (c) 2013 TAUS
+use warnings;
use strict;
run() unless caller();
diff --git a/scripts/generic/qsub-wrapper.pl b/scripts/generic/qsub-wrapper.pl
index c5b63a71b..622323bdb 100755
--- a/scripts/generic/qsub-wrapper.pl
+++ b/scripts/generic/qsub-wrapper.pl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id$
+use warnings;
use strict;
#######################
diff --git a/scripts/generic/reverse-alignment.perl b/scripts/generic/reverse-alignment.perl
index fc8c33dff..d00140c74 100755
--- a/scripts/generic/reverse-alignment.perl
+++ b/scripts/generic/reverse-alignment.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $line;
diff --git a/scripts/generic/score-parallel.perl b/scripts/generic/score-parallel.perl
index 9979f087d..9e5ee0025 100755
--- a/scripts/generic/score-parallel.perl
+++ b/scripts/generic/score-parallel.perl
@@ -4,6 +4,7 @@
# ./score-parallel.perl 8 "gsort --batch-size=253" ./score ./extract.2.sorted.gz ./lex.2.f2e ./phrase-table.2.half.f2e --GoodTuring ./phrase-table.2.coc 0
# ./score-parallel.perl 8 "gsort --batch-size=253" ./score ./extract.2.inv.sorted.gz ./lex.2.e2f ./phrase-table.2.half.e2f --Inverse 1
+use warnings;
use strict;
use File::Basename;
diff --git a/scripts/generic/strip-xml.perl b/scripts/generic/strip-xml.perl
index 61b823ce2..95513b608 100755
--- a/scripts/generic/strip-xml.perl
+++ b/scripts/generic/strip-xml.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
while (my $line = <STDIN>) {
diff --git a/scripts/generic/trainlm-irst2.perl b/scripts/generic/trainlm-irst2.perl
index a84ea1c61..596143386 100755
--- a/scripts/generic/trainlm-irst2.perl
+++ b/scripts/generic/trainlm-irst2.perl
@@ -10,6 +10,7 @@
# irst-dir = /Users/hieu/workspace/irstlm/trunk/bin
# Set smoothing method in settings, if different from modified Kneser-Ney
+use warnings;
use strict;
use FindBin qw($RealBin);
use Getopt::Long;
diff --git a/scripts/generic/trainlm-lmplz.perl b/scripts/generic/trainlm-lmplz.perl
index 045248675..c7e9e4553 100755
--- a/scripts/generic/trainlm-lmplz.perl
+++ b/scripts/generic/trainlm-lmplz.perl
@@ -9,6 +9,7 @@
# It should point to the binary file
# lmplz = /home/waziz/workspace/github/moses/bin/lmplz
+use warnings;
use strict;
use FindBin qw($RealBin);
use Getopt::Long qw/GetOptionsFromArray/;
diff --git a/scripts/other/beautify.perl b/scripts/other/beautify.perl
index 73ea51beb..130afd56b 100755
--- a/scripts/other/beautify.perl
+++ b/scripts/other/beautify.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use File::Basename;
use FindBin qw($RealBin);
diff --git a/scripts/other/delete-scores.perl b/scripts/other/delete-scores.perl
index c0b723d64..08316c95b 100755
--- a/scripts/other/delete-scores.perl
+++ b/scripts/other/delete-scores.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/other/get_many_translations_from_google.perl b/scripts/other/get_many_translations_from_google.perl
index 6ef83e240..512b84e36 100755
--- a/scripts/other/get_many_translations_from_google.perl
+++ b/scripts/other/get_many_translations_from_google.perl
@@ -6,6 +6,7 @@
#
# Ondrej Bojar, bojar@ufal.mff.cuni.cz
+use warnings;
use strict;
use Getopt::Long;
use CGI;
diff --git a/scripts/recaser/detruecase.perl b/scripts/recaser/detruecase.perl
index efa5e12b6..549cd8abe 100755
--- a/scripts/recaser/detruecase.perl
+++ b/scripts/recaser/detruecase.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/recaser/recase.perl b/scripts/recaser/recase.perl
index 0b1ded200..3ba83712a 100755
--- a/scripts/recaser/recase.perl
+++ b/scripts/recaser/recase.perl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id$
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/recaser/train-recaser.perl b/scripts/recaser/train-recaser.perl
index 27c5da198..87a720f6e 100755
--- a/scripts/recaser/train-recaser.perl
+++ b/scripts/recaser/train-recaser.perl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id$
+use warnings;
use strict;
use FindBin qw($Bin);
use Getopt::Long "GetOptions";
diff --git a/scripts/recaser/train-truecaser.perl b/scripts/recaser/train-truecaser.perl
index b6e5c3884..b653a8ca5 100755
--- a/scripts/recaser/train-truecaser.perl
+++ b/scripts/recaser/train-truecaser.perl
@@ -8,6 +8,7 @@
# --possiblyUseFirstToken : boolean option; the default behaviour (when this option is not provided) is that the first token of a sentence is ignored, on the basis that the first word of a sentence is always capitalized; if this option is provided then: a) if a sentence-initial token is *not* capitalized, then it is counted, and b) if a capitalized sentence-initial token is the only token of the segment, then it is counted, but with only 10% of the weight of a normal token.
#
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/recaser/truecase.perl b/scripts/recaser/truecase.perl
index d14d7ebe4..373aa509f 100755
--- a/scripts/recaser/truecase.perl
+++ b/scripts/recaser/truecase.perl
@@ -1,6 +1,8 @@
#!/usr/bin/env perl
# $Id: train-recaser.perl 1326 2007-03-26 05:44:27Z bojar $
+
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/regression-testing/compare-results.pl b/scripts/regression-testing/compare-results.pl
index 0d77ef8fc..df14d444f 100755
--- a/scripts/regression-testing/compare-results.pl
+++ b/scripts/regression-testing/compare-results.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($results, $truth) = @ARGV;
diff --git a/scripts/regression-testing/create_localized_moses_ini.pl b/scripts/regression-testing/create_localized_moses_ini.pl
index 78a033b32..612a39e82 100755
--- a/scripts/regression-testing/create_localized_moses_ini.pl
+++ b/scripts/regression-testing/create_localized_moses_ini.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $script_dir; BEGIN { use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, $script_dir; }
use MosesScriptsRegressionTesting;
diff --git a/scripts/regression-testing/modify-pars.pl b/scripts/regression-testing/modify-pars.pl
index 4669ae0b6..5ad2514a4 100755
--- a/scripts/regression-testing/modify-pars.pl
+++ b/scripts/regression-testing/modify-pars.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $argv=join(" ",@ARGV);
diff --git a/scripts/regression-testing/moses-virtual.pl b/scripts/regression-testing/moses-virtual.pl
index 55198900b..41ddd6b13 100755
--- a/scripts/regression-testing/moses-virtual.pl
+++ b/scripts/regression-testing/moses-virtual.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my %opt = ();
diff --git a/scripts/regression-testing/run-single-test.pl b/scripts/regression-testing/run-single-test.pl
index 2fa7b4dce..bb66e96f6 100755
--- a/scripts/regression-testing/run-single-test.pl
+++ b/scripts/regression-testing/run-single-test.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $script_dir; BEGIN { use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, $script_dir; }
use MosesScriptsRegressionTesting;
diff --git a/scripts/regression-testing/run-test-suite.pl b/scripts/regression-testing/run-test-suite.pl
index d90dfa35d..8ae9ec60f 100755
--- a/scripts/regression-testing/run-test-suite.pl
+++ b/scripts/regression-testing/run-test-suite.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $script_dir; BEGIN { use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, $script_dir; }
use Getopt::Long;
diff --git a/scripts/tokenizer/deescape-special-chars-PTB.perl b/scripts/tokenizer/deescape-special-chars-PTB.perl
index 17fe650d2..0e73a7718 100755
--- a/scripts/tokenizer/deescape-special-chars-PTB.perl
+++ b/scripts/tokenizer/deescape-special-chars-PTB.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
while(<STDIN>) {
diff --git a/scripts/tokenizer/deescape-special-chars.perl b/scripts/tokenizer/deescape-special-chars.perl
index dc810d817..076d1e62f 100755
--- a/scripts/tokenizer/deescape-special-chars.perl
+++ b/scripts/tokenizer/deescape-special-chars.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
while(<STDIN>) {
diff --git a/scripts/tokenizer/detokenizer.perl b/scripts/tokenizer/detokenizer.perl
index 27e315840..7874d5d04 100755
--- a/scripts/tokenizer/detokenizer.perl
+++ b/scripts/tokenizer/detokenizer.perl
@@ -7,6 +7,8 @@
binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");
+
+use warnings;
use strict;
use utf8; # tell perl this script file is in UTF-8 (see all funny punct below)
diff --git a/scripts/tokenizer/escape-special-chars.perl b/scripts/tokenizer/escape-special-chars.perl
index 79ae39469..e94b91744 100755
--- a/scripts/tokenizer/escape-special-chars.perl
+++ b/scripts/tokenizer/escape-special-chars.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
while(<STDIN>) {
diff --git a/scripts/tokenizer/lowercase.perl b/scripts/tokenizer/lowercase.perl
index cb1250938..9ee307bc2 100755
--- a/scripts/tokenizer/lowercase.perl
+++ b/scripts/tokenizer/lowercase.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
binmode(STDIN, ":utf8");
diff --git a/scripts/tokenizer/normalize-punctuation.perl b/scripts/tokenizer/normalize-punctuation.perl
index 8f779449f..db8f9c60e 100755
--- a/scripts/tokenizer/normalize-punctuation.perl
+++ b/scripts/tokenizer/normalize-punctuation.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $language = "en";
diff --git a/scripts/tokenizer/pre-tokenizer.perl b/scripts/tokenizer/pre-tokenizer.perl
index 35134a9c0..499671b44 100755
--- a/scripts/tokenizer/pre-tokenizer.perl
+++ b/scripts/tokenizer/pre-tokenizer.perl
@@ -4,6 +4,7 @@
# Start by Ulrich Germann, after noticing systematic preprocessing errors
# in some of the English Europarl data.
+use warnings;
use strict;
use Getopt::Std;
diff --git a/scripts/tokenizer/remove-non-printing-char.perl b/scripts/tokenizer/remove-non-printing-char.perl
index 4dadd1d77..2b90dfd3b 100755
--- a/scripts/tokenizer/remove-non-printing-char.perl
+++ b/scripts/tokenizer/remove-non-printing-char.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use utf8;
binmode(STDIN, ":utf8");
diff --git a/scripts/tokenizer/replace-unicode-punctuation.perl b/scripts/tokenizer/replace-unicode-punctuation.perl
index 748e1d063..08eb766bf 100755
--- a/scripts/tokenizer/replace-unicode-punctuation.perl
+++ b/scripts/tokenizer/replace-unicode-punctuation.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
#binmode(STDIN, ":utf8");
diff --git a/scripts/tokenizer/tokenizer.perl b/scripts/tokenizer/tokenizer.perl
index eeede0af0..8abffbea4 100755
--- a/scripts/tokenizer/tokenizer.perl
+++ b/scripts/tokenizer/tokenizer.perl
@@ -16,6 +16,7 @@ use warnings;
binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");
+use warnings;
use FindBin qw($RealBin);
use strict;
use Time::HiRes;
diff --git a/scripts/tokenizer/tokenizer_PTB.perl b/scripts/tokenizer/tokenizer_PTB.perl
index 6417b7d6e..bce7a38a0 100755
--- a/scripts/tokenizer/tokenizer_PTB.perl
+++ b/scripts/tokenizer/tokenizer_PTB.perl
@@ -14,6 +14,7 @@
binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");
+use warnings;
use FindBin qw($RealBin);
use strict;
use Time::HiRes;
diff --git a/scripts/training/absolutize_moses_model.pl b/scripts/training/absolutize_moses_model.pl
index ecfcb3395..5c9c0970a 100755
--- a/scripts/training/absolutize_moses_model.pl
+++ b/scripts/training/absolutize_moses_model.pl
@@ -6,6 +6,8 @@
#
# Ondrej Bojar.
+use warnings;
+
my $ini = shift;
die "usage: absolutize_moses_model.pl path-to-moses.ini > moses.abs.ini"
if !defined $ini;
diff --git a/scripts/training/binarize-model.perl b/scripts/training/binarize-model.perl
index 0246190f2..3d4798ffd 100755
--- a/scripts/training/binarize-model.perl
+++ b/scripts/training/binarize-model.perl
@@ -4,6 +4,7 @@
# Binarize a Moses model
#
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/training/build-generation-table.perl b/scripts/training/build-generation-table.perl
index 8b1303795..fb59f4acc 100755
--- a/scripts/training/build-generation-table.perl
+++ b/scripts/training/build-generation-table.perl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id$
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/training/build-mmsapt.perl b/scripts/training/build-mmsapt.perl
index bd8d1078f..a7ddaff70 100755
--- a/scripts/training/build-mmsapt.perl
+++ b/scripts/training/build-mmsapt.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/training/clean-corpus-n.perl b/scripts/training/clean-corpus-n.perl
index 40e4d8935..e1e96528c 100755
--- a/scripts/training/clean-corpus-n.perl
+++ b/scripts/training/clean-corpus-n.perl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
# $Id: clean-corpus-n.perl 3633 2010-10-21 09:49:27Z phkoehn $
+use warnings;
use strict;
use Getopt::Long;
my $help;
diff --git a/scripts/training/clone_moses_model.pl b/scripts/training/clone_moses_model.pl
index 93e37b803..5e9dff72a 100755
--- a/scripts/training/clone_moses_model.pl
+++ b/scripts/training/clone_moses_model.pl
@@ -5,6 +5,7 @@
# in the current directory
# All relevant files are hardlinked or copied to the directory, too.
+use warnings;
use strict;
use Getopt::Long;
diff --git a/scripts/training/convert-moses-ini-to-v2.perl b/scripts/training/convert-moses-ini-to-v2.perl
index 1bc4fe79d..25c562ef4 100755
--- a/scripts/training/convert-moses-ini-to-v2.perl
+++ b/scripts/training/convert-moses-ini-to-v2.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $header = "";
diff --git a/scripts/training/corpus-sizes.perl b/scripts/training/corpus-sizes.perl
index 1eccf9bd5..02dd4ae9b 100755
--- a/scripts/training/corpus-sizes.perl
+++ b/scripts/training/corpus-sizes.perl
@@ -2,6 +2,7 @@
# $Id: consolidate-training-data.perl 928 2009-09-02 02:58:01Z philipp $
+use warnings;
use strict;
my ($in,$out,@PART) = @ARGV;
diff --git a/scripts/training/exodus.perl b/scripts/training/exodus.perl
index ef3d8df92..d3466f5dd 100755
--- a/scripts/training/exodus.perl
+++ b/scripts/training/exodus.perl
@@ -2,6 +2,7 @@
# $Id$
+use warnings;
use strict;
my @LINE = <STDIN>;
diff --git a/scripts/training/filter-model-given-input.pl b/scripts/training/filter-model-given-input.pl
index dbafc73be..7dec0762c 100755
--- a/scripts/training/filter-model-given-input.pl
+++ b/scripts/training/filter-model-given-input.pl
@@ -8,6 +8,7 @@
# changes by Ondrej Bojar
# adapted for hierarchical models by Phil Williams
+use warnings;
use strict;
use FindBin qw($RealBin);
diff --git a/scripts/training/get-lexical.perl b/scripts/training/get-lexical.perl
index 2dcf7437f..45fe6d54c 100755
--- a/scripts/training/get-lexical.perl
+++ b/scripts/training/get-lexical.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use FindBin qw($RealBin);
BEGIN { require "$RealBin/LexicalTranslationModel.pm"; "LexicalTranslationModel"->import; }
diff --git a/scripts/training/giza2bal.pl b/scripts/training/giza2bal.pl
index 8b2150e31..8daa8e916 100755
--- a/scripts/training/giza2bal.pl
+++ b/scripts/training/giza2bal.pl
@@ -7,6 +7,8 @@
#Copyright Marcello Federico, November 2004
+use warnings;
+
($cnt,$dir,$inv)=();
while ($w=shift @ARGV){
diff --git a/scripts/training/mert-moses.pl b/scripts/training/mert-moses.pl
index 5d1f9b368..86084abbf 100755
--- a/scripts/training/mert-moses.pl
+++ b/scripts/training/mert-moses.pl
@@ -47,6 +47,7 @@
# 13 Oct 2004 Use alternative decoders (DWC)
# Original version by Philipp Koehn
+use warnings;
use strict;
use FindBin qw($RealBin);
use File::Basename;
diff --git a/scripts/training/postprocess-lopar.perl b/scripts/training/postprocess-lopar.perl
index 9962d5594..5171e02fb 100755
--- a/scripts/training/postprocess-lopar.perl
+++ b/scripts/training/postprocess-lopar.perl
@@ -2,6 +2,7 @@
# $Id$
+use warnings;
use strict;
use utf8;
diff --git a/scripts/training/reduce-factors.perl b/scripts/training/reduce-factors.perl
index bc08a3a9d..c265652f6 100755
--- a/scripts/training/reduce-factors.perl
+++ b/scripts/training/reduce-factors.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/training/remove-orphan-phrase-pairs-from-reordering-table.perl b/scripts/training/remove-orphan-phrase-pairs-from-reordering-table.perl
index 2f412cd28..bd5d7f1d2 100755
--- a/scripts/training/remove-orphan-phrase-pairs-from-reordering-table.perl
+++ b/scripts/training/remove-orphan-phrase-pairs-from-reordering-table.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($ttable_file) = @ARGV;
diff --git a/scripts/training/threshold-filter.perl b/scripts/training/threshold-filter.perl
index f8d15a8ae..a23fb8b5c 100755
--- a/scripts/training/threshold-filter.perl
+++ b/scripts/training/threshold-filter.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my %MIN_SCORE;
diff --git a/scripts/training/train-global-lexicon-model.perl b/scripts/training/train-global-lexicon-model.perl
index 20ee42b72..0e7d3077d 100755
--- a/scripts/training/train-global-lexicon-model.perl
+++ b/scripts/training/train-global-lexicon-model.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use Switch;
diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl
index ade5c5277..6f850d609 100755
--- a/scripts/training/train-model.perl
+++ b/scripts/training/train-model.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/training/wrappers/berkeleyparsed2mosesxml.perl b/scripts/training/wrappers/berkeleyparsed2mosesxml.perl
index 3bbf982b7..3dd8fc4ac 100755
--- a/scripts/training/wrappers/berkeleyparsed2mosesxml.perl
+++ b/scripts/training/wrappers/berkeleyparsed2mosesxml.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
while(<STDIN>) {
diff --git a/scripts/training/wrappers/berkeleyparsed2mosesxml_PTB.perl b/scripts/training/wrappers/berkeleyparsed2mosesxml_PTB.perl
index 91fc515cb..e61a53652 100755
--- a/scripts/training/wrappers/berkeleyparsed2mosesxml_PTB.perl
+++ b/scripts/training/wrappers/berkeleyparsed2mosesxml_PTB.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
while(<STDIN>) {
diff --git a/scripts/training/wrappers/filter-excluded-lines.perl b/scripts/training/wrappers/filter-excluded-lines.perl
index 2f1e25ad4..7f9da3efa 100755
--- a/scripts/training/wrappers/filter-excluded-lines.perl
+++ b/scripts/training/wrappers/filter-excluded-lines.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long;
diff --git a/scripts/training/wrappers/find-unparseable.perl b/scripts/training/wrappers/find-unparseable.perl
index 0bbf35df4..b0d38027b 100755
--- a/scripts/training/wrappers/find-unparseable.perl
+++ b/scripts/training/wrappers/find-unparseable.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my $lineNum = 1;
diff --git a/scripts/training/wrappers/mada-wrapper.perl b/scripts/training/wrappers/mada-wrapper.perl
index eec10a3ef..20f76f821 100755
--- a/scripts/training/wrappers/mada-wrapper.perl
+++ b/scripts/training/wrappers/mada-wrapper.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use File::Temp qw/tempfile/;
use Getopt::Long "GetOptions";
diff --git a/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl b/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl
index cf7473e44..88d16b3f6 100755
--- a/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl
+++ b/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($lowercase, $cluster_file,$in,$out,$tmp) = @ARGV;
diff --git a/scripts/training/wrappers/make-factor-de-morph.perl b/scripts/training/wrappers/make-factor-de-morph.perl
index 4b2c90495..1cc917bce 100755
--- a/scripts/training/wrappers/make-factor-de-morph.perl
+++ b/scripts/training/wrappers/make-factor-de-morph.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Encode;
use FindBin qw($RealBin);
diff --git a/scripts/training/wrappers/make-factor-de-pos.perl b/scripts/training/wrappers/make-factor-de-pos.perl
index 8cc28695a..2eadd4123 100755
--- a/scripts/training/wrappers/make-factor-de-pos.perl
+++ b/scripts/training/wrappers/make-factor-de-pos.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($in,$out,$tmpdir) = @ARGV;
diff --git a/scripts/training/wrappers/make-factor-en-pos.mxpost.perl b/scripts/training/wrappers/make-factor-en-pos.mxpost.perl
index 3ab2b1ca4..0d27aa12f 100755
--- a/scripts/training/wrappers/make-factor-en-pos.mxpost.perl
+++ b/scripts/training/wrappers/make-factor-en-pos.mxpost.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use FindBin qw($RealBin);
diff --git a/scripts/training/wrappers/make-factor-pos.tree-tagger.perl b/scripts/training/wrappers/make-factor-pos.tree-tagger.perl
index 1e00a8fa3..2af6eb75c 100755
--- a/scripts/training/wrappers/make-factor-pos.tree-tagger.perl
+++ b/scripts/training/wrappers/make-factor-pos.tree-tagger.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
# handle switches
diff --git a/scripts/training/wrappers/make-factor-stem.perl b/scripts/training/wrappers/make-factor-stem.perl
index c222ad0df..60aca0b34 100755
--- a/scripts/training/wrappers/make-factor-stem.perl
+++ b/scripts/training/wrappers/make-factor-stem.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($size,$in,$out) = @ARGV;
diff --git a/scripts/training/wrappers/make-factor-suffix.perl b/scripts/training/wrappers/make-factor-suffix.perl
index d13c43230..7e864ea0c 100755
--- a/scripts/training/wrappers/make-factor-suffix.perl
+++ b/scripts/training/wrappers/make-factor-suffix.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
my ($size,$in,$out) = @ARGV;
diff --git a/scripts/training/wrappers/mosesxml2berkeleyparsed.perl b/scripts/training/wrappers/mosesxml2berkeleyparsed.perl
index f7855e06d..fc1f0c532 100755
--- a/scripts/training/wrappers/mosesxml2berkeleyparsed.perl
+++ b/scripts/training/wrappers/mosesxml2berkeleyparsed.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
#( (NP (NP (NN resumption)) (PP (IN of) (NP (DT the) (NN session)))) )
diff --git a/scripts/training/wrappers/parse-de-berkeley.perl b/scripts/training/wrappers/parse-de-berkeley.perl
index b8b546953..68df07c49 100755
--- a/scripts/training/wrappers/parse-de-berkeley.perl
+++ b/scripts/training/wrappers/parse-de-berkeley.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/training/wrappers/parse-de-bitpar.perl b/scripts/training/wrappers/parse-de-bitpar.perl
index 8cb34055c..4723d6aa0 100755
--- a/scripts/training/wrappers/parse-de-bitpar.perl
+++ b/scripts/training/wrappers/parse-de-bitpar.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/training/wrappers/parse-en-collins.perl b/scripts/training/wrappers/parse-en-collins.perl
index 3d879c06b..27b33a2dd 100755
--- a/scripts/training/wrappers/parse-en-collins.perl
+++ b/scripts/training/wrappers/parse-en-collins.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use File::Basename;
use File::Temp qw/tempfile/;
diff --git a/scripts/training/wrappers/parse-en-egret.perl b/scripts/training/wrappers/parse-en-egret.perl
index fc330c70f..c3d23a4ee 100755
--- a/scripts/training/wrappers/parse-en-egret.perl
+++ b/scripts/training/wrappers/parse-en-egret.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
use FindBin qw($RealBin);
diff --git a/scripts/training/wrappers/syntax-hyphen-splitting.perl b/scripts/training/wrappers/syntax-hyphen-splitting.perl
index 2c830f6b6..1bb616939 100755
--- a/scripts/training/wrappers/syntax-hyphen-splitting.perl
+++ b/scripts/training/wrappers/syntax-hyphen-splitting.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";
diff --git a/scripts/training/wrappers/tagger-german-chunk.perl b/scripts/training/wrappers/tagger-german-chunk.perl
index b6b2871ba..4f26efabe 100755
--- a/scripts/training/wrappers/tagger-german-chunk.perl
+++ b/scripts/training/wrappers/tagger-german-chunk.perl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
+use warnings;
use strict;
use Getopt::Long "GetOptions";