This is a great start @benjamin-paine . However won't it trip up on relatively common cases such as:
- Hello Dr. Jones.
- The answer is 10.45s.
- Well... that needs extra attention.
- They wanted pets, small animals etc. to be brought in for checks.
- The filename is Report2023.xls.
- You should look at www.example.com.
I'm AFK right now so can't verify for sure but given this seems to use a basic sequence of regex's it seems likely it won't cater for these sorts of things (unless there's some subtle aspect I'm overlooking)
Something like SaT would be too heavy weight. Maybe a compromise closer to PySBD but in JS would work well here?