# 3-letter language code as used in user dictionaries

[header]
language = GED
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 "
#
# Avoid end of sentence detection for an ordinal number followed by a capital letter.
# Correct pronunciation of the ordinal when following the word 'des', and followed by a capital letter
!(\s+[Dd]es\s+)7\.(\s+[A-Z])!   -->   "$1siebten$2"
!(\s+[Dd]es\s+)1\.(\s+[A-Z])!   -->   "$1ersten$2"
!(\s+[Dd]es\s+)3\.(\s+[A-Z])!   -->   "$1dritten$2"
!(\s+[Dd]es\s+1?\d)\.(\s+[A-Z])!   -->   "$1/+t\$n/+$2"
!(\s+[Dd]es\s+[2-9]\d)\.(\s+[A-Z])!   -->   "$1/+st\$n/+$2"
#
# avoid '.' at the end when an audio file is inserted
!(audio=\".*\"\\)+(\.)!   -->   "$1"
#
# handle distances i.e. "Nach 10.1 Kilometern ..."  as "Nach zehn komma eins Kilometern ...." instead of "Nach zehn komma ein Kilometern ..."
!(Nach\s)+(\d{1,10})+(.1)!   -->   "$1$2 komma eins"
#
# put a space after Roman numbers, so that these will be converted to ordinal numbers by the user dictionary
!\b(i{1,3}|iv|vi{0,3}|ix|xi{0,3}|xiv|xvi{0,3}|xx)\b!   -->   "$1 "
#
#
#
# cardinal numbers
# declension of German digit "1" after preposition "nach" (=after), Dative
/\b((N|n)ach\s+1)(\s+Meile)\b/   -->   "$1_DATF_$3"  # feminine
/\b((N|n)ach\s+1)(\s+(Kilometer|km|Meter|m|Yard))\b/   -->   "$1_DAT_$3"  # masculine
#
# declension of German digit "1" after preposition "für" (=for), Accusative
/\b((F|f)ür\s+1)(\s+(Kilometer|km|Meter|m|Yard))\b/   -->   "$1_ACC_$3"  # masculine
#
#
# ordinal numbers
# declension of German digit "1." to "10." after "nach der" (=after the), Dative
/\b((N|n)ach\s+der\s+[1-9]\d?\.)(\s+)/   -->   "$1_DATFo_$3"  # feminine
#
#
# cardinal numbers
# Dative case numbers
/\b1_DATF_/   -->   "einer"
/\b1_DAT_/   -->   "einem"
#
# Accusative case numbers
/\b1_ACC_/   -->   "einen"
#
#
# ordinal numbers
# Dative case numbers
/\b1\._DATFo_/   -->   "ersten"
/\b3\._DATFo_/   -->   "dritten"
/\b7\._DATFo_/   -->   "siebten"
/\b(1?\d)\._DATFo_/   -->   "$1\x1b/+t\$n\x1b/+"
/\b([2-9]\d)\._DATFo_/   -->   "$1\x1b/+st\$n\x1b/+"
