summaryrefslogtreecommitdiff
path: root/corpus/support
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2013-09-05 11:26:22 -0700
committerMichael Denkowski <mdenkows@cs.cmu.edu>2013-09-05 11:26:22 -0700
commit76c26e382a9d5e2c95064488f060107e95470055 (patch)
tree7baf7cb1fe7af91b8a4d5b320350607e6b94dd0f /corpus/support
parent7525905ca57bbd425f96a33768e3f6777ba86f7a (diff)
Unbuffered mode, flush after each line where possible, skip otherwise
Diffstat (limited to 'corpus/support')
-rwxr-xr-xcorpus/support/fix-contract.pl2
-rwxr-xr-xcorpus/support/quote-norm.pl1
-rwxr-xr-xcorpus/support/tokenizer.pl1
-rwxr-xr-xcorpus/support/utf8-normalize.sh3
4 files changed, 6 insertions, 1 deletions
diff --git a/corpus/support/fix-contract.pl b/corpus/support/fix-contract.pl
index f1e191ab..49e88981 100755
--- a/corpus/support/fix-contract.pl
+++ b/corpus/support/fix-contract.pl
@@ -1,4 +1,6 @@
#!/usr/bin/perl -w
+$|++;
+
use strict;
while(<>) {
#s/ (pre|anti|re|pro|inter|intra|multi|e|x|neo) - / $1- /ig;
diff --git a/corpus/support/quote-norm.pl b/corpus/support/quote-norm.pl
index b104e73c..57f4ad77 100755
--- a/corpus/support/quote-norm.pl
+++ b/corpus/support/quote-norm.pl
@@ -1,4 +1,5 @@
#!/usr/bin/perl -w
+$|++;
use strict;
use utf8;
binmode(STDIN,"utf8");
diff --git a/corpus/support/tokenizer.pl b/corpus/support/tokenizer.pl
index acc537fb..e0df16a7 100755
--- a/corpus/support/tokenizer.pl
+++ b/corpus/support/tokenizer.pl
@@ -1,4 +1,5 @@
#!/usr/bin/env perl
+$|++;
my $script_dir;
BEGIN {$^W = 1; use Cwd qw/ abs_path /; use File::Basename; $script_dir = dirname(abs_path($0)); push @INC, $script_dir; }
diff --git a/corpus/support/utf8-normalize.sh b/corpus/support/utf8-normalize.sh
index 2f347854..c85ae9f7 100755
--- a/corpus/support/utf8-normalize.sh
+++ b/corpus/support/utf8-normalize.sh
@@ -25,7 +25,8 @@ else
fi
fi
-perl -e 'while(<>){s/\r\n*/\n/g; print;}' | $CMD | /usr/bin/perl -w -e '
+perl -e '$|++; while(<>){s/\r\n*/\n/g; print;}' | $CMD | /usr/bin/perl -w -e '
+ $|++;
while (<>) {
chomp;
s/[\x00-\x1F]+/ /g;