Reply to post

[FAQ]Avoid reading superscript, e.g. citation (reference) numbers on Wikipedia etc.

Author
Admin
Administrator
  • Total Posts : 275
  • Reward points: 0
  • Joined: 2010/11/22 00:00:00
  • Location: USA
  • Status: offline
2016/02/19 07:09:19 (permalink)

Avoid reading superscript, e.g. citation (reference) numbers on Wikipedia etc.

The small superscript text, like reference numbers in scientific articles, Wikipedia articles etc., can be removed from speech output in @Voice with our "Edit speech" feature under menu - Settings. Go there and press the + button on top to add a new speech replacement, then enter exactly the following, make also sure that there are no spaces between and after the entered text:
Replacement type: Regular Expression (RegEx)
Pattern: (<sup>|<sup\b)((?!</sup>).)*</sup>
Replace: 
Leaving the "Replace" field empty will simply silence the references. If you want, you could enter some alternative text there, e.g. "reference provided" or whatever.
 
Here is another replacement, that would avoid reading aloud any text contained within square brackets [like this]:
Pattern: \[[^\[.]+\]
 
and a simpler one, that will avoid reading only numbers in square brackets, like [1], [375] etc. :
Pattern: \[\d+\]
Note, the above would not work for Wikipedia or many other Web pages with citations, as inside the square brackets they have some HTML formatting tags, not only numbers.
 
If you are curious, read some of many RegEx references and tutorials on the Web. The particular implementation of Regular Expressions that @Voice uses is described at http://www.regexlab.com/en/deelx/syntax.htm
 
Greg
post edited by Admin - 2016/02/19 07:20:13

0 Replies Related Threads

    Jump to:
    © 2017 APG vNext Commercial Version 5.1