#!/usr/local/bin/perl -w

#./preprocess-input-xfer.pl < ../corpus/input > ../corpus/input-xfer

# separating punctuation marks from words
# careful if there are words with a hyphen it will separate them unless, 
# the appropriate line is commented out

while (<>){

    s/\./ \./g;
    s/\,/ \,/g;
    s/\?/ \?/g; 
    s/\!\ !//g;
    s/\"/ \" /g;
    s/\`/ \` /g;
    s/\]/ \]/g;
    s/\[/\[ /g;
    s/\(/\( /g;
    s/\)/ \)/g;
    s/\>/ \> /g;
    s/\</ \< /g;
    s/\%/ \%/g;
    s/\*/ \* /g;
    s/\$/\$ /g;
    s/\#/ \# /g;
    s/\@/ \@ /g;
    s/\:/ \: /g;
    s/\;/ \; /g;
    s/\+/ \+ /g;
    s/\-/ \- /g;
    s/\=/ \= /g;
    s/\\/ \\ /g;
    s/\// \/ /g;
    s/\^/ \^ /g;
    s/\_/ \_ /g;
    s/\-/ \- /g; # comment if there are words with a hyphen!

    print $_;
}
