Given a paragraph, I want to split it into sentences. At the moment I'm simply doing this:
var sentences = paragraph.split('.');
It works for the most part, however starts failing when it's given a sentence like this:
Alaska is the largest state in the U.S.
Because U.S.
has periods, it's parsing out S
to be a sentence.
What's the best way to determin the sentences in a paragraph? I thought about parsing them out based on the last period before a capitol letter, but if the paragraph isn't well typed (a lowercase letter after the period) it will also fail on that