Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (<BR>) {
- # Only punctuation that is not part of a word is a token on its own.
- # This only works on this text, because one flaw it has is decimal numbers
- # and currency.
- s/([,"$%\^\&*()+=\[\]!?])/ $1 /g;
- s/[^A-Z.](\.)\s+/ $1 /g;
- s/\s+/\n/g;
- print $_;
- }
Advertisement
Add Comment
Please, Sign In to add comment