Given the following phrase
Ms. Mary got to know her husband Mr. Dave in her trip to U.S.A. and it was cool. Did you know Dave worked for Microsoft? Well he did. He was even part of Internet Explorer devs.
What is the best "pseudo-code" way to split it into sentences? Python or any other similar language is also fine because of its pseudo-code resemblance.
What I've thought is to replace every occurrence of " a-zA-Z."
(notice the space), ".a-zA-Z"
and ".a-zA-Z."
to its equivalent without the dot of course, so for example
" a."
" b."
" c."
" d."
" e."
" f."
...
and
".a."
".b."
".c."
".d."
".e."
".f."
...
and
" ab."
" ac."
" ad."
...
" ba."
" bc."
" bd."
...
The phrase should be nicely converted to the following
Ms Mary got to know her husband Mr Dave in her trip to USA and it was cool. Did you know Dave worked for Microsoft? Well he did. He was even part of Internet Explorer devs.
...or am I wrong somewhere and I have a flawed logic?
For the future what's your question comments, I need to know what's the best way to split the example text into correct sentences avoiding clashes with acronyms.
This either explained in pseudo-code, Python or other languages similar to pseudo-code. I want it to be language agnostic so it can be implemented by anyone, regardless of the language they use.