Topics

wild cards in speech dictionary

Scott Berry
 

Hello there,


I was wondering if there is a way to make a wild card speech dictionary entry.  The reason for this is that one of the many survey sites I use reads numbers like  11125 and it should be $111.25.  Thanks for the help.

Luke Davis
 

On Fri, 10 Jul 2020, Scott Berry wrote:

I was wondering if there is a way to make a wild card speech dictionary entry.  The reason for this is that one of the many survey sites I use reads numbers like  11125 and it should be $111.25.  Thanks for the help.
Of course. That's what regular expression entries are for.
Python syntax is what NVDA uses, although you don't need all the function calls and such in this howto, just the regexp stuff: https://docs.python.org/3/howto/regex.html#regex-howto

I think in your case, if they use an 11 where they mean a dollar sign, you would want something like:

\b11([\d\.]{3,})

And the replacement:

$\1

That is quite untested though.

Also, it seems highly unlikely that they are using an 11 instead of a $. Something else is probably going on. You may need to use the log viewer to find out what is actually being sent to the synth (at input output debug level), in order to find out what you actually need to replace.

Luke

Scott Berry
 

I disagree with you when you say that they are using dollars signs.  No some sites use a point system based the dollar whereas others sites use the actuall money ammount based on the dollar. So there is a difference when they say one has 11100 and when they say one has $.80.  I will try the regex but I am not a Python programmer so I know absolutely nothing about Python.

On 7/10/2020 7:10 AM, Luke Davis wrote:
On Fri, 10 Jul 2020, Scott Berry wrote:

I was wondering if there is a way to make a wild card speech dictionary entry.  The reason for this is that one of the many survey sites I use reads numbers like 11125 and it should be $111.25.  Thanks for the help.
Of course. That's what regular expression entries are for.
Python syntax is what NVDA uses, although you don't need all the function calls and such in this howto, just the regexp stuff: https://docs.python.org/3/howto/regex.html#regex-howto

I think in your case, if they use an 11 where they mean a dollar sign, you would want something like:

\b11([\d\.]{3,})

And the replacement:

$\1

That is quite untested though.

Also, it seems highly unlikely that they are using an 11 instead of a $. Something else is probably going on. You may need to use the log viewer to find out what is actually being sent to the synth (at input output debug level), in order to find out what you actually need to replace.

Luke

 

As in all cases like this, providing a couple of URLs that give examples of what you're having an issue with goes a long way toward finding the necessary solution.

I have never in my life seen two ones used as a way to denote a dollar sign or dollars.
--

Brian - Windows 10 Pro, 64-Bit, Version 1909, Build 18363  

Science has become just another voice in the room; it has lost its platform.  Now, you simply declare your own truth.

      ~ Dr. Paul A. Offit, in New York Times article, How Anti-Vaccine Sentiment Took Hold in the United States, September 23, 2019

 

 

Scott Berry
 

It's difficult to give urls because almost all survey sites require creating an account and log in.  I can provide the main url because it is on only one site.



On 7/10/2020 7:55 AM, Brian Vogel wrote:
As in all cases like this, providing a couple of URLs that give examples of what you're having an issue with goes a long way toward finding the necessary solution.

I have never in my life seen two ones used as a way to denote a dollar sign or dollars.
--

Brian - Windows 10 Pro, 64-Bit, Version 1909, Build 18363  

Science has become just another voice in the room; it has lost its platform.  Now, you simply declare your own truth.

      ~ Dr. Paul A. Offit, in New York Times article, How Anti-Vaccine Sentiment Took Hold in the United States, September 23, 2019

 

 

Sarah k Alawami
 

I have. The best buy app at least on iOs does this, not sure about the web site. I bought a cord for $410 when in reality it was $4.10. They don't use the decimal for some reason.

--

Sarah Alawami, owner of TFFP. . For more info go to our website.

Check out my adventures with a shadow machine.

to subscribe to the feed click here and you can also follow us on twitter

Our discord is where you will know when we go live on twitch. Feel free to give the channel a follow and see what is up there.

For stream archives, products you can buy and more visit my main lbry page and my tffp lbry page You will also be able to buy some of my products and eBooks there.

Finally, to become a patron and help support the podcast go here

On 10 Jul 2020, at 6:55, Brian Vogel wrote:

As in all cases like this, providing a couple of URLs that give examples of what you're having an issue with goes a long way toward finding the necessary solution.

I have never in my life seen two ones used as a way to denote a dollar sign or dollars.
--

Brian - Windows 10 Pro, 64-Bit, Version 1909, Build 18363  

Science has become just another voice in the room; it has lost its platform.  Now, you simply declare your own truth.

      ~ Dr. Paul A. Offit, in New York Times article, How Anti-Vaccine Sentiment Took Hold in the United States, September 23, 2019

 

 

Patrick Le Baudour
 

Hi,

One possibility is that there is no delimiter, but the cents are shown as exponent/superscript. If done through the <sup> tag at least, it can be told by nvda when enabling font attribute in document formatting settings. Some more fancy ways of doing it may not be reported, though.


-- Patrick

Scott Berry
 

Patrick,


I bet your exactly right.  What option in the settings especially would I be looking for?

On 7/10/2020 10:22 AM, Patrick Le Baudour wrote:
Hi,

One possibility is that there is no delimiter, but the cents are shown as exponent/superscript.  If done through the <sup> tag at least, it can be told by nvda when enabling font attribute in document formatting settings. Some more fancy ways of doing it may not be reported, though.


-- Patrick

Scott Berry
 

Yes your right Sarah.  It's just a sighty thing I suppose because it's quicker to look at


.

On 7/10/2020 10:19 AM, Sarah k Alawami wrote:

I have. The best buy app at least on iOs does this, not sure about the web site. I bought a cord for $410 when in reality it was $4.10. They don't use the decimal for some reason.

--

Sarah Alawami, owner of TFFP. . For more info go to our website.

Check out my adventures with a shadow machine.

to subscribe to the feed click here and you can also follow us on twitter

Our discord is where you will know when we go live on twitch. Feel free to give the channel a follow and see what is up there.

For stream archives, products you can buy and more visit my main lbry page and my tffp lbry page You will also be able to buy some of my products and eBooks there.

Finally, to become a patron and help support the podcast go here

On 10 Jul 2020, at 6:55, Brian Vogel wrote:

As in all cases like this, providing a couple of URLs that give examples of what you're having an issue with goes a long way toward finding the necessary solution.

I have never in my life seen two ones used as a way to denote a dollar sign or dollars.
--

Brian - Windows 10 Pro, 64-Bit, Version 1909, Build 18363  

Science has become just another voice in the room; it has lost its platform.  Now, you simply declare your own truth.

      ~ Dr. Paul A. Offit, in New York Times article, How Anti-Vaccine Sentiment Took Hold in the United States, September 23, 2019

 

 

Scott Berry
 

Patrick,


Although it didn't read with a decimal the font atribute did help make more sense out of the numbers.  thank you for your guidance.

On 7/10/2020 10:22 AM, Patrick Le Baudour wrote:
Hi,

One possibility is that there is no delimiter, but the cents are shown as exponent/superscript.  If done through the <sup> tag at least, it can be told by nvda when enabling font attribute in document formatting settings. Some more fancy ways of doing it may not be reported, though.


-- Patrick