Skip to content

Commit 1a16830

Browse files
Merge pull request #33 from Mohamed00/viavoice
Readability improvements
2 parents 334b861 + 4462907 commit 1a16830

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

addon/synthDrivers/ibmeci.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ def unicode(s): return s
5858
}
5959
english_ibm_fixes = {
6060
#Prevents the synth from spelling out everything if a punctuation mark follows a word.
61-
re.compile(br"([a-z]+)([\x7e\x23\x24\x25\x5e\x2a\x28\x7b\x7c\x5c\x5b\x3c\x25\x95])", re.I): br"\1 \2",
61+
re.compile(br"([a-z]+)([~#$%^*({|\\[<%\x95])", re.I): br"\1 \2",
6262
#Don't break phrases like books).
6363
re.compile(br"([a-z]+)\s+(\(s\))", re.I): br"\1\2",
6464
#Removes spaces if a string is followed by a punctuation mark, since ViaVoice doesn't tolerate that.
65-
re.compile(br"([a-z]+|\d+|\W+)\s+([\x3a\x2e\x21\x3b\x2c])", re.I): br"\1\2",
65+
re.compile(br"([a-z]+|\d+|\W+)\s+([:.!;,])", re.I): br"\1\2",
6666
re.compile(br"(http://|ftp://)([a-z]+)(\W){1,3}([a-z]+)(/*\W){1,3}([a-z]){1}", re.I): br"\1\2\3\4 \5\6",
67-
re.compile(br"(\d+)([\x2d\x2b\x2a\x5e\x2f])(\d+)(\.)(\d+)(\.)(0{2,})", re.I): br"\1\2\3\4\5\6 \7",
68-
re.compile(br"(\d+)([\x2d\x2b\x2a\x5e\x2f])(\d+)(\.)(\d+)(\.)(0\W)", re.I): br"\1\2\3\4 \5\6\7",
69-
re.compile(br"(\d+)([\x2d\x2b\x2a\x5e\x2f]+)(\d+)([\x2d\x2b\x2a\x5e\x2f]+)([\x2c\x2e+])(0{2,})", re.I): br"\1\2\3\4\5 \6",
70-
re.compile(br"(\d+)(\.+)(\d+)(\.+)(0{2,})\s*\.*([\x2d\x2b\x2a\x5e\x2f])", re.I): br"\1\2\3\4 \5\6",
71-
re.compile(br"(\d+)\s*([\x2d\x2b\x2a\x5e\x2f])\s*(\d+)(,)(0{2,})", re.I): br"\1\2\3\4 \5",
67+
re.compile(br"(\d+)([-+*^/])(\d+)(\.)(\d+)(\.)(0{2,})", re.I): br"\1\2\3\4\5\6 \7",
68+
re.compile(br"(\d+)([-+*^/])(\d+)(\.)(\d+)(\.)(0\W)", re.I): br"\1\2\3\4 \5\6\7",
69+
re.compile(br"(\d+)([-+*^/]+)(\d+)([-+*^/]+)([,.+])(0{2,})", re.I): br"\1\2\3\4\5 \6",
70+
re.compile(br"(\d+)(\.+)(\d+)(\.+)(0{2,})\s*\.*([-+*^/])", re.I): br"\1\2\3\4 \5\6",
71+
re.compile(br"(\d+)\s*([-+*^/])\s*(\d+)(,)(0{2,})", re.I): br"\1\2\3\4 \5",
7272
}
7373
spanish_fixes = {
7474
# Euros

0 commit comments

Comments
 (0)