Thank you. Sorry for the late reply, I just saw it. Looks good apart from misrecognizing whole words. I.e.
we’re master’s doesn’t
We’Re Master’S Doesn’T
We’re Master’s Doesn’t
By the way, the default functionality of the Convert Selection > Capitalize command, does not do that.