From 6162223690d8a9a3d461a85acdafe9cbef7bf3e5 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Mon, 13 Apr 2015 20:42:33 +0400 Subject: add use warnings to all perl scripts --- scripts/analysis/bootstrap-hypothesis-difference-significance.pl | 1 + scripts/analysis/sentence-by-sentence.pl | 1 + scripts/analysis/sg2dot.perl | 1 + scripts/analysis/show-phrases-used.pl | 2 ++ scripts/analysis/smtgui/filter-phrase-table.pl | 1 + 5 files changed, 6 insertions(+) (limited to 'scripts/analysis') 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; -- cgit v1.2.3