Re: Identifying capital letters


Luke Davis
 

Giles, unfortunately there is no such functionality in NVDA.
An add-on for this could be written, but to my knowledge at least, one hasn't.

As Chris suggested, however, if you have an editor which supports regular expression searches, you may be able to find (most of) the problem areas.

This regexp:

[\.\?!] +[a-z]|[a-zA-Z0-9,\+\)\]\"\'\`-] [A-Z]|^ *[a-z]

Finds every capitalization error in the following test text, with no false positives, using Notepad++ with case sensitive searching (you must use case sensitive searching, of course).

This is the first line, and shouldn't be found.
This Is the second line. It should be targeted because of "is".
This is the third, And should be captured like the 2nd! twice!
This fourth line shouldn't be found.
but this 5th line should.

The regexp above only works assuming certain sentence ending characters, and word boundary characters. Character sets can break it, different punctuation style can break it, almost anything can break it. There are probably more robust ways to write it, using more agnostic word boundary characters and such. I am in a hurry, so I will leave improving it to Brian and others, but it's a start I think.

Good luck.

Luke

Join nvda@nvda.groups.io to automatically receive all group messages.