Don't capitalize Mr, Ms, Mrs#67
Conversation
ppannuto
left a comment
There was a problem hiding this comment.
I've started trying to group these tests a bit more logically; does this change make sense / look good to you?
Co-authored-by: Pat Pannuto <[email protected]>
|
So the |
|
Ugh, this is what is unfortunate about a regex-based approach, you keep running into corner cases. From a quick survey of style guides online, everything after a If you want to add a special case so the library handles it correctly, that'd be awesome. If you'd rather just change the test to not include an |
|
I can't figure out a smart way to add exception for |
ppannuto
left a comment
There was a problem hiding this comment.
I think this is good, thanks for the updates. The reality is that a regex-based solution will always have some corner cases and imperfections that it misses.
Major (interface) changes (#60) -- big thanks @iburago!!: - Read from an abbreviations file only when invoked from command line - Rename and refactor the create_wordlist_filter() function Minor changes: - #63: Do not capitalize small words occurring within hyphenated word groups (thanks @iburago!) - #65: Always capitalize 'Mc'-prefixed small words in compound word groups (thanks @iburago!) - #67: Don't capitalize Mr, Ms, Mrs (thanks @GurraB!) - #71: Add Manifest.in and include license file in src dist (thanks @synapticarbors!)
The current version will capitalize Mr, Mrs, Ms. I added a regex and an if-statement to handle them separately.
Previous
Mr Mrs Ms -> MR MRS MSNow
Mr Mrs Ms -> Mr Mrs Ms