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
commit65e999da12ea6d88e7703a89932b30b9ccbfcdb6 (patch)
treeae438759a50e6d045a87f6b23808f5e5dd81b309 /corpus/support
parentcf7f814acfebf03b577e105a9295ef67cfdb74cd (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;