Page 1 of 1

Sentence capitalization

Posted: 2020-07-27 14:00:40
by frazman10
I’m having trouble with the Transform Text: Sentence Capitalization. I was wondering if anyone else experienced this behavior.
1. If I type this sentence: the class is to read A Tale Of Two Cities.
2. Then execute Sentence Capitalization, I get.
3. The class is to read a tale of two cities. As you can see the first word of the sentence is capitalized, but all the other capitals are toggled. This has happened repeatedly.
4. Running Nisus Express 4.1 on iMac running OS 10.11.6
I just want to add that I really to like this new Menu command, and Nisus Writer Express is my favorite app.

Re: Sentence capitalization

Posted: 2020-07-28 02:19:39
by adryan
G’day, frazman10 et al

I don’t have Express to check this, but I get the same result in Nisus Writer Pro. The command appears not to be documented in the User Guide for either application. I think its current implementation represents a bug.


Re: Sentence capitalization

Posted: 2020-07-28 08:39:10
by martin
Thanks for appreciating Nisus Writer! I'm sorry this behavior was unexpected, but Nisus Writer is behaving as intended.

Sentence capitalization means that the first letter of the first word in the sentence is capitalized, while the rest of the sentence is lowercased. Nisus Writer doesn't know that your other capital letters represent a proper noun, and thus converts them to lowercase. Basically Nisus Writer has no way of knowing a book title from a typo. All other capitals in the sentence are converted to lowercase regardless.

Re: Sentence capitalization

Posted: 2020-07-29 16:14:35
by adryan
G’day, Martin et al

I submit that the current name of that command is somewhat misleading, especially in the absence of any documented description of the intended behavior. Global application could be disastrous if all other text were demoted to lowercase save for the initial letter of each sentence.

I realize that the command is probably there in the first place for people who tend to write entirely in lowercase, but one should recognize that capitalization elsewhere in a sentence is probably deliberate (as in frazman10’s situation). The main exception would be where the Shift key remains depressed inadvertently while the second letter of a capitalized word is typed, but this should be dealt with in a different way.

I would prefer to see that command replaced with one that only ensured that the initial letter of the sentence is capitalized but left remaining characters unchanged. It could be named something like “To Sentence Start Capitalized”.

In the absence of such a command, appropriate Find and Replace expressions could be stored in the Saved Expressions lists if one anticipated frequent use.

In Nisus Writer Pro, the whole thing is easily macroized, which is just as well, as the required Find expression (in PowerFind Pro) is horrendous to behold! With a name like “Capitalize Sentence Start” its intended use is clear. If you frequently find your train of thought precludes reaching for the Shift key at the start of a sentence, an upgrade to Nisus Writer Pro might be just what you need!


Re: Sentence capitalization

Posted: 2020-07-30 08:03:20
by martin
I'll admit that the command has issues if you're applying it globally to an entire document. It's likely to introduce more errors than corrections. But as you mentioned a PowerFind Pro (aka regular expression, aka regex) is probably the best solution if you want to do that. Here's a somewhat naive regex that I'd recommend:

Code: Select all

(?<=[!?.] |^)\w+
Use that expression to find all matches, which will select the first word of every sentence in the document. Once you have that big multi-part selection, you can activate the sentence capitalization menu to transform all selected words en-masse. That works in Nisus Writer Pro and Nisus Writer Express.

But if the real problem is a habitual lack of using the Shift key at the start of every sentence, then I'd consider a different solution. In Nisus Writer's QuickFix preferences you can enable the option "fix capitalization at the start of sentences", which will do exactly that as you type.