This is a code for the sentence parsing that does its job properly and FAST.
The main problem is that you really need a database of abbreviations so that phrases such as "Dr. Smith" are not calculated as 2 sentences, which means that the good parser must be language dependent. I am also providing a list of all English abbreviations with the code.
You can always tweak the code to get a nicer output, but the main idea is still there, and completed with this little program.