summaryrefslogtreecommitdiff
path: root/word-aligner/ortho-norm
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
commita769e4964db2443ce165043095e18dfc0d788910 (patch)
treee813f3aa59fb2f242d029ff04837cbff524df2bd /word-aligner/ortho-norm
parent7007550ea4bdba74935c1817a2ba47db8000b5f0 (diff)
lbfgs + time-series minibatch optimization
Diffstat (limited to 'word-aligner/ortho-norm')
-rwxr-xr-xword-aligner/ortho-norm/mg.pl13
-rwxr-xr-xword-aligner/ortho-norm/rw.pl13
2 files changed, 26 insertions, 0 deletions
diff --git a/word-aligner/ortho-norm/mg.pl b/word-aligner/ortho-norm/mg.pl
new file mode 100755
index 00000000..4cb0e8e7
--- /dev/null
+++ b/word-aligner/ortho-norm/mg.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;
+}
+
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;
+}
+