summaryrefslogtreecommitdiff
path: root/corpus
diff options
context:
space:
mode:
authormjdenkowski <michael.j.denkowski@gmail.com>2013-12-12 15:12:25 -0500
committermjdenkowski <michael.j.denkowski@gmail.com>2013-12-12 15:12:25 -0500
commit09b71909b0ecc2d69dfdfb81f535db2519cd5642 (patch)
treefd5c57b5fa7f7bea8ce1809026d12b6a18bf5db6 /corpus
parent6fb6d64e8191912ed80a652175ccf4e7ce9c0b00 (diff)
Restore unbuffered functionality as option
Diffstat (limited to 'corpus')
-rwxr-xr-xcorpus/tokenize-anything.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/corpus/tokenize-anything.sh b/corpus/tokenize-anything.sh
index c7adfa61..5b7933d8 100755
--- a/corpus/tokenize-anything.sh
+++ b/corpus/tokenize-anything.sh
@@ -5,15 +5,17 @@ SUPPORT=$ROOTDIR/support
if [[ $# == 1 && $1 == '-u' ]] ; then
NORMARGS="--batchline"
+ SEDFLAGS="-u"
else
NORMARGS=""
+ SEDFLAGS=""
fi
$SUPPORT/utf8-normalize.sh $NORMARGS |
$SUPPORT/quote-norm.pl |
$SUPPORT/tokenizer.pl |
- sed -e 's/ al - / al-/g' |
+ sed $SEDFLAGS -e 's/ al - / al-/g' |
$SUPPORT/fix-contract.pl |
- sed -e 's/^ //' | sed -e 's/ $//' |
+ sed $SEDFLAGS -e 's/^ //' | sed $SEDFLAGS -e 's/ $//' |
perl -e '$|++; while(<>){s/(\d+)(\.+)$/$1 ./; s/(\d+)(\.+) \|\|\|/$1 . |||/; print;}'