=== modified file 'source/speech.py'
|
|
|
|
| 62 | 62 | def terminate(): |
| 63 | 63 | setSynth(None) |
| 64 | 64 | |
| | 65 | RE_REPEATED_CHARS = re.compile(r"(([\W_])\2{3,})") |
| | 66 | def _replaceRepeatedChars(m): |
| | 67 | return _("%s %d times ") % (m.group(2), len(m.group(1))) |
| | 68 | |
| 65 | 69 | def processTextSymbols(text,expandPunctuation=False): |
| 66 | 70 | if (text is None) or (len(text)==0) or (isinstance(text,basestring) and (set(text)<=set(characterSymbols.blankList))): |
| 67 | 71 | return _("blank") |
| 68 | 72 | #Convert non-breaking spaces to spaces |
| 69 | 73 | if isinstance(text,basestring): |
| 70 | 74 | text=text.replace(u'\xa0',u' ') |
| | 75 | text = RE_REPEATED_CHARS.sub(_replaceRepeatedChars, text) |
| 71 | 76 | text = userDictHandler.processText(text) |
| 72 | 77 | #expands ^ and ~ so they can be used as protector symbols |
| 73 | 78 | #Expands special sentence punctuation keeping the origional physical symbol but protected by ^ and ~ |
=== modified file 'source/userdicts/default.dic'
|
|
|
|
| 1 | 1 | #General NVDA dictionary |
| 2 | 2 | #syntax: record fields divided by tab character |
| 3 | 3 | |
| 4 | | #Limit groups of the same character to 5 or less. |
| 5 | | ([\W])\1{5,} \1\1\1\1\1 |
| 6 | 4 | #break up words that use a capital letter to denote another word |
| 7 | 5 | ([a-z])([A-Z]) \1 \2 |
| 8 | 6 | #Break away a word starting with a capital from a fully uppercase word |