summaryrefslogtreecommitdiff
path: root/word-aligner/ortho-norm/rw.pl
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-10-31 14:03:22 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-10-31 14:03:22 -0400
commit6de8f58cd13813bf33af4903bf386439683c0fd6 (patch)
treec61ce14a652f04ca964fe7ac5ff3c4fd43d23a29 /word-aligner/ortho-norm/rw.pl
parentac85e18b071d961f52e1fa9aafd30b36c676dc4b (diff)
lbfgs + time-series minibatch optimization
Diffstat (limited to 'word-aligner/ortho-norm/rw.pl')
-rwxr-xr-xword-aligner/ortho-norm/rw.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/word-aligner/ortho-norm/rw.pl b/word-aligner/ortho-norm/rw.pl
new file mode 100755
index 00000000..4cb0e8e7
--- /dev/null
+++ b/word-aligner/ortho-norm/rw.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+use strict;
+use utf8;
+
+binmode(STDIN, ":utf8");
+binmode(STDOUT, ":utf8");
+
+while(<STDIN>) {
+ $_ = lc $_;
+ s/([a-z])'( |$)/$1$2/g;
+ print;
+}
+