[header]
# 3-letter language code as used in user dictionaries
language = ENG
charset = utf-8

[data]

# replace slash with 100ms pause to avoid slash being read out literally (Bug JIRA: GI-704)
!(\D\d+)\/(\D\d+)!    -->   " $1 \\pause=100\\ $2 "
!(\D[-]\d+)\/(\D\d+)!    -->   " $1 \\pause=100\\ $2 "
!(\D\d+)\/(\d+)!    -->   " $1 \\pause=100\\ $2 "
!(\D[-]\d+)\/(\d+)!    -->   " $1 \\pause=100\\ $2 "
!(\D\d+)\/(\D[-]\d+)!    -->   " $1 \\pause=100\\ $2 "
!(\D[-]\d+)\/(\D[-]\d+)!    -->   " $1 \\pause=100\\ $2 "


# replace I-[0-9]  by Interstate followed by the number
!\s+I-([0-9])! --> "Interstate $1"

# replace 'St' followed by NE, NW, SE or SW by 'street' i.o. 'saint'
!\b[Ss][tT](\.*)(\s+[NS][EWew][\s+\.,;\!\?])! --> " street$2" 

# replace 'St' followed by N, W, S or E by 'street' i.o. 'saint' and
# avoid missing end of sentence detection (non final abbreviation) in case of a '.' following N,W,S or E
!\b[Ss][tT](\.*)(\s+[NSEW])([\s+\.,;\!\?])! --> " street$2 $3"

# replace the first Dr(.) by Doctor if there's a second Dr furter in the input.
![Dd]r\.{0,1}\s+([A-Z].+?\s+[Dd]r[\s+\.,;\!\?])! --> "Doctor  $1"

# Add a . after N, W, S or E if this letter is followed by 1 to 3 words beginning with a capital letter, and followed by 
# St, Rd, Ave, Blvd, Dr or Bay
!(\b)([NSEW])(\s+)(([A-Z]\w+\s+){1,3})([Ss]t|[Rr]d|[Aa]ve|[Dd]r|[Bb]ay|[Bb]lvd)! --> "$1$2.$3$4$6"

# Add a . after N, W, S or E if this letter comes after 1 to 3 words beginning with a capital letter (MOS-2401)
!(\b)(([A-Z]\w+\s+){1,3})([NSEW])\s! --> "$1$2$4."

# Spell capital letter followed by 3 digits (not zero)
!(\s+[A-Z]\d)([1-9])([1-9][\s+\.,;\!\?])! --> "$1 $2 $3"

# Use 'double oh' if the middle 2 digits are zero of a 4 digit number following a capital letter
!(\s+[A-Z]\d)00([1-9][\s+\.,;\!\?])! --> "$1 double oh $2"

# Pronounce 0 in 2nd position of a 4 digit number following a capital letter as 'Oh' 
!(\s+[A-Z]\d)0([1-9])([1-9][\s+\.,;\!\?])! --> "$1 oh $2 $3"

# Pronounce 0 in 3rd position of a 4 digit number following a capital letter as 'Oh', 
# knowing that a 3 digit number with 0 in the middle is pronounced correctly in address mode
!(\s+[A-Z]\d)([1-9]0[1-9][\s+\.,;\!\?])! --> "$1 $2"

# Spell capital letter followed by 4 digits if the last digit is non zero
!(\s+[A-Z]\d)(\d)(\d)([1-9][\s+\.,;\!\?])! --> "$1 $2 $3 $4"

# Ignore parenthesis around M if following a capital letter and one or more digits
!(\s+[A-Z]\d+)\(M\)([\s+\.,;\!\?])! --> "$1 M$2"

# Avoid expansion of "Alt" into "alternative" when followed by a hyphen and a capital letter and non white spaces
!(\s+)Alt\-([A-Z]\S+)! --> "$1/+Alt/+ $2"

# no silence after digits in address mode when preceded by 'de', 'des', 'du', 'de la'
!(\x1b\\tn=address\\.+?\s+[Dd])(es{0,1}|u|e\s+la)(\s+)(\d+)(\.*)(\.*\s*|\s+)(\D)! --> "$1$2$3\x1b\\tn=normal\\$4\x1b\\tn=address\\$6"

# avoid '.' at the end when an audio file is inserted
!(audio=\".*\"\\)+(\.)! --> "$1"

# avoid handling "Xi" as roman numbers if it is followed by a space plus a capital letter (MOS-1853)
!\s+Xi+\s([A-Z]\S+)! --> "/+'si/+$1"

# insert a pause before "A St." in address mode
!(\x1b\\tn=address\\.*?\s+)(A\s+St\.)! --> "$1, \x1b/+e&I_'stR+it\x1b/+"
