TextFX Proper Case does not handle 's properly
-
if you convert google’s you get Google’S while it should be Google’s.
Not sure if this is the right place to report this or if this is the intended behavior. Thanks!
-
Hello Sushubh Mittal,
Unfortunately, I think that this behaviour is a side-effect of the Proper Case capitalization rule itself :-((
Have a look to my post, about the different capitalization rules, below :
https://notepad-plus-plus.org/community/topic/130/convert-case-to/4
With the Start Case / Proper Case rule, ALL the words are capitalized, regardless its grammatical category. And, as the apostrophe sign is NOT a word character, the final lowercase letter s, of your example, is considered as a word ( containing only 1 letter ), which is capitalized !
There are plenty of examples, similar to yours, which give weird results, while applying the Proper Case rule
Just consider the following word or sentences :
McDonald MacDonald O'Neil Google's A FBI Inspector my.email@test.com John Smith III
Using the TextFX - TextFX Characters - Proper Case, on that selected text , you’ll get :
Mcdonald Macdonald O'Neil Google'S A Fbi Inspector My.Email@Test.Com John Smith Iii
You’ll, also, get the same results, if you perform the regular expression search and replace, given, on my post, referred above, for the Proper Case capitalization rule :
SEARCH =
(\w)(\w*)
and REPLACE =\u\1\L\2
It’s easy to understand that the only way to get the good spelling for all these cases, would require an artificial intelligence engine, which would be able to know that :
- MacDonald is legal denomination of a restaurant
- FBI is an abbreviation of Federal Bureau of Investigation
- An E-mail address NEVER contains any uppercase letter
- The characters III, after a proper name, is a Roman number
and so on…
Moreover, how to distinguish, for instance, between the Scottish name O’Neil and the name Google’s, when applying the Proper Case rule ?
However, IF you prefer that your text doesn’t contain any uppercase letter, right after an apostrophe sign, here is, below, a S/R which could achieve the Proper Case rule, while including that specific rule :
SEARCH =
(\w|')(\w*)
and REPLACE =\u\1\L\2
So the two sentences :
The different Google's applications The name O'Neil is very common, in Scotland
then, would become :
The Different Google's Applications The Name O'neil Is Very Common, In Scotland
With the hope that this post helps you, a bit !
Best Regards,
guy038
-
You are right. It would need something smarter to power the backend engine like Google’s spell checker. I would check out your connected post as well. Thanks!
-
Hi, all,
With the last version
v8.4.6
, I’ve just tried to use theEdit > Convert Case to > Proper Case
option against this INPUT text :McDonald MacDonald O'Neil Google's A FBI Inspector my.email@test.com John Smith III
And I get :
Mcdonald Macdonald O'neil Google's A Fbi Inspector My.Email@Test.Com John Smith Iii
Now, if I use the
Edit > Convert Case to > Proper Case (blend)
option against this same INPUT text, I get :McDonald MacDonald O'neil Google's A FBI Inspector My.Email@Test.Com John Smith III
Note that, whatever your choice, most of these expressions are not correct, after modifications !
Refer, my previous post of
2015
, above !Best Regards,
guy038
Funny : Exactly seven years, to the day, between my two posts !!