email@example.com <firstname.lastname@example.org> On Behalf Of
November 7, 2020 7:07 PMTo:
Re: [nvda] How to spell out Roman numerals
Below is the list of 10 regular expressions, followed by what you use for the replacement, that you need to enter in your speech dictionary in the order listed. I emphasize again: in the order listed.
This is important because I believe (and am waiting for confirmation) that the speech dictionary (or any dictionary) has its entries processed in order, and on the first match the replacement is passed to the synthesizer and the processing for that "word/character cluster" stops. If you had the entry for Roman numeral one first, it would snag Roman numerals 4, 3, and 2 incorrectly since all of them are composed of a collection of capital Is.
In addition, I am going to presume from your example that all of these Roman numeral, with possible optional letter, sequences must have a colon after the last character of the sequence with no space between the two. If there is no colon then the match will not work, and that's by design, as I do not want the pronoun I to be captured as Roman numeral one.
If you want the word "Roman" or something else in front of the individual characters of the numeral before they're read out one by one then stick that in front of the first character of the replacement string. I just went for the individual letters making up the numeral, along with the letter following it, if that letter is present.
The regular expressions all start with a backslash and end with a question mark. The replacement strings all end with backslash one (the digit 1). When working with the dictionary to add entries, the regular expression goes in the Pattern edit box, the replacement string in the Replacement box, and the Type radio button must be set to regular expression.
\s?IIII([a-z])?:\s? I I I I \1
\s?III([a-z])?:\s? I I I \1
\s?VIII([a-z])?:\s? V I I I \1
\s?VII([a-z])?:\s? V I I \1
Brian - Windows 10 Pro, 64-Bit, Version 2004, Build 19041
It’s hard waking up and realizing it’s not always black and white.
~ Kelley Boorn