summaryrefslogtreecommitdiff
path: root/corpus/support/fix-eos.pl
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-01-20 00:11:27 -0500
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-01-20 00:11:27 -0500
commit02a764cc553f238cdd0be4c6dee4ea144cda84ba (patch)
treecc1b42844831c2bd190903fe29f6a68cfc41c219 /corpus/support/fix-eos.pl
parent54449ce0eb266ac8e1617f6db7f5390b0a3e26ce (diff)
hindi edits
Diffstat (limited to 'corpus/support/fix-eos.pl')
-rwxr-xr-xcorpus/support/fix-eos.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/corpus/support/fix-eos.pl b/corpus/support/fix-eos.pl
new file mode 100755
index 00000000..584f8b46
--- /dev/null
+++ b/corpus/support/fix-eos.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl -w
+use strict;
+use utf8;
+
+binmode(STDIN, ":utf8");
+binmode(STDOUT, ":utf8");
+while(<STDIN>) {
+ s/(\p{Devanagari}{2}[A-Za-z0-9! ,.\@\p{Devanagari}]+?)\s+(\.)(\s*$|\s+\|\|\|)/$1 \x{0964}$3/s;
+ print;
+}