summaryrefslogtreecommitdiff
path: root/corpus/paste-files.pl
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-03-03 12:06:43 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-03-03 12:06:43 +0100
commitf7f9048f8e4d34682f17bfd050d238005feb3ee3 (patch)
treefa20fa16b0f5a8009a9254622b65ebeaec049399 /corpus/paste-files.pl
parent9d306b30c9abba995ba35243e5cb461bb472a61f (diff)
parent12f2eab0e7dc7167af47cddf8ef88968656277da (diff)
Merge branch 'master' of github.com:pks/cdec-dtrain
Diffstat (limited to 'corpus/paste-files.pl')
-rwxr-xr-xcorpus/paste-files.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/corpus/paste-files.pl b/corpus/paste-files.pl
index 0b788386..4cb424ad 100755
--- a/corpus/paste-files.pl
+++ b/corpus/paste-files.pl
@@ -41,9 +41,9 @@ while(1) {
}
warn "$ARGV[$anum]:$lc contains a ||| symbol - please remove.\n" if $r =~ /\|\|\|/;
$r =~ s/\|\|\|/ /g;
- $r =~ s/ +//g;
- $r =~ s/^ //;
- $r =~ s/ $//;
+ $r =~ s/\s+/ /g;
+ $r =~ s/^ +//;
+ $r =~ s/ +$//;
$anum++;
push @line, $r;
}
@@ -56,5 +56,5 @@ for (my $i = 1; $i < scalar @fhs; $i++) {
my $r = <$fh>;
die "Mismatched number of lines.\n" if defined $r;
}
-print STDERR "Bad lines containing ||| were $bad\n";
+print STDERR "Number of lines containing ||| was: $bad\n" if $bad > 0;