Something
[vspell.git] / scripts / punct.pl
blobdd180ad8b8a7179cc4eee2967ab52d85b69ba859
1 #!/usr/bin/perl
3 while (<>) {
4 $text = $_;
6 # entity
7 $text =~ s/&\#([0-9]*);/ \#\1 /g;
8 # foreign proper name
9 while ($text =~ s/([A-ZÐ])\. ([A-ZÐ])/\1.\2/g) {}
10 # double colon
11 $chars = "a-záàäãÕ⤥¦ç§åå¡¢ÆÇ£éè먩ꪫ¬­®íìïî¸óòöõ÷ô¯°±²µ½¾¶·ÞþúùüûøßÑ×ØæñýÏÖÛÜðA-ZÁÀÄÀ„…†\x06‡ÅÅ�‚\x02\x05ƒÉÈˈ‰ÊŠ‹Œ�ŽÍ̛ΘÓÒ™ šÔ��‘’“´•–—³”ÚÙœ�ž¿º»¼ÿ¹ÝŸ\x14\x19\x1eÐ";
12 $text =~ s/([$chars])([!~():,.;!?-])([^$chars])/\1\n\3/g;
13 $text =~ s/([^$chars])([!~():,.;!?-])([$chars])/\1\n\3/g;
14 $text =~ s/^([!~():,.;-])([$chars])/\n\2/g;
15 # dot
16 # $text =~ m/\. ([a-zðA-ZÐ])/ . \1/g;
17 print $text;
20 # Local Variables:
21 # coding: viscii
22 # End: