Skip to content

Commit 2b27820

Browse files
Removes dot and @ parsing expressions from the driver, since these were added when NVDA couldn't control when symbols were sent, and the defaults don't send them to the synth. They were breaking things anyway. Consequently, this removes the french_fixes dictionary.
1 parent ac36d85 commit 2b27820

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

addon/synthDrivers/ibmeci.py

+6-13
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@ def unicode(s): return s
3333
time_re = re.compile(br"(\d):(\d+):(\d+)")
3434

3535
english_fixes = {
36-
re.compile(r'(\w+)\.([a-zA-Z]+)'): r'\1 dot \2',
37-
re.compile(r'([a-zA-Z0-9_]+)@(\w+)'): r'\1 at \2',
3836
# Does not occur in normal use, however if a dictionary entry contains the Mc prefix, and NVDA splits it up, the synth will crash.
3937
# Also fixes ViaVoice, as the parser is more strict there and doesn't like spaces in Mc names.
40-
re.compile(r"\b(Mc)\s+([A-Z][a-z]+)"): r"\1\2",
41-
# Fixes a weird issue with the date parser. Without this fix, strings like "03 Marble" will be pronounced as "march threerd ble".
42-
re.compile(r"\b(\d+) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec)([a-z]+)"): r"\1 \2\3",
43-
# Don't break UK formatted dates.
44-
re.compile(r"\b(\d+) (January|February|March|April|May|June|July|August|September|October|November|December)"): r"\1 \2",
45-
# Crash words, formerly part of anticrash_res.
38+
re.compile(r"\b(Mc)\s+([A-Z][a-z]+)"): r"\1\2",
39+
# Fixes a weird issue with the date parser. Without this fix, strings like "03 Marble" will be pronounced as "march threerd ble".
40+
re.compile(r"\b(\d+) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec)([a-z]+)"): r"\1 \2\3",
41+
# Don't break UK formatted dates.
42+
re.compile(r"\b(\d+) (January|February|March|April|May|June|July|August|September|October|November|December)"): r"\1 \2",
43+
# Crash words, formerly part of anticrash_res.
4644
re.compile(r'\b(.*?)c(ae|\xe6)sur(e)?', re.I): r'\1seizur',
4745
re.compile(r"\b(|\d+|\W+)h'(r|v)[e]", re.I): r"\1h \2e",
4846
re.compile(r"\b(\w+[bdfhjlmnqrvz])(h[he]s)([abcdefghjklmnopqrstvwy]\w+)\b", re.I): r"\1 \2\3",
@@ -56,11 +54,7 @@ def unicode(s): return s
5654
re.compile(r"\b(juar[aeou]s)([aeiou]{6,})", re.I): r"\1 \2"
5755
}
5856

59-
french_fixes = { re.compile(r'([a-zA-Z0-9_]+)@(\w+)'): r'\1 arobase \2' }
60-
6157
spanish_fixes = {
62-
#for emails
63-
re.compile(r'([a-zA-Z0-9_]+)@(\w+)'): r'\1 arroba \2',
6458
re.compile(u'([€$]\d{1,3})((\s\d{3})+\.\d{2})'): r'\1 \2',
6559
}
6660
german_fixes = {
@@ -234,7 +228,6 @@ def processText(self,text):
234228
if _ibmeci.params[9] in (65536, 65537, 393216, 655360): text = resub(english_fixes, text) #Applies to Chinese and Korean as they can read English text and thus inherit the English bugs.
235229
if _ibmeci.params[9] in (131072, 131073): text = resub(spanish_fixes, text)
236230
if _ibmeci.params[9] in (196609, 196608):
237-
text = resub(french_fixes, text)
238231
text = text.replace('quil', 'qil') #Sometimes this string make everything buggy with IBMTTS in French
239232
if _ibmeci.params[9] in ('deu', 262144):
240233
text = resub(german_fixes, text)

0 commit comments

Comments
 (0)