summaryrefslogtreecommitdiff
path: root/corpus/tokenize-anything.sh
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-01-13 12:37:45 +0100
committerPatrick Simianer <p@simianer.de>2014-01-13 12:37:45 +0100
commita2f803d5b629f31cf41313d77e382150dd007d39 (patch)
treec56130c1112e803058b33b98853cff08a8f8450d /corpus/tokenize-anything.sh
parent926fb52bfc85dcd58156916ca2536ee32c719954 (diff)
parentc148f8429c66103a401ba4c3a029e349cd11aa8a (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'corpus/tokenize-anything.sh')
-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;}'