nvdaportable/NVDA/include/nvda-mathcat/assets/Rules/Languages/en/unicode.yaml

566 lines
26 KiB
YAML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
# Note to translators:
# most languages don't have two ways to pronounce 'a' -- if not need, remove the rules and change "B-Z" to "A-Z"
# some languages say the word for "uppercase" after the letter. Make sure to change that where appropriate by moving some code around
- "a":
- test:
if: "$TTS='none'"
then: [t: "eigh"] # long "a" sound in all speech engines I tested (espeak, MS SAPI, eloquence,
else: [spell: "'a'"] # AWS Polly, ReadSpeaker, NaturalReader, google cloud, nuance, ibm watson)
- "b-z":
- test:
if: "$TTS='none'"
then: [t: "."]
else: [spell: "'.'"]
# Capital letters are a little tricky: users can pick their favorite word (something that was requested) and
# screen readers have options to use pitch changes or beeps instead of or in addition to say "cap"
# Also, if a user can see the screen, they probably don't need to hear "cap", but if they specified an override, they must want to hear the override.
- "A":
- test:
if: "$CapitalLetters_Beep"
then:
- audio:
value: "beep.mp4"
replace: []
- test:
if: "$CapitalLetters_UseWord"
then_test:
if: "$SpeechOverrides_CapitalLetters = ''"
then_test:
if: "$Impairment = 'Blindness'"
then: [t: "cap"]
else: [x: "$SpeechOverrides_CapitalLetters"]
- pitch:
value: "$CapitalLetters_Pitch"
replace:
- test:
if: "$TTS='none'"
then: [t: "eigh"]
else: [spell: "'a'"]
- "B-Z":
- test:
if: "$CapitalLetters_Beep"
then:
- audio:
value: "beep.mp4"
replace: []
- test:
if: "$CapitalLetters_UseWord"
then_test:
if: "$SpeechOverrides_CapitalLetters = ''"
then_test:
if: "$Impairment = 'Blindness'"
then: [t: "cap"]
else: [x: "$SpeechOverrides_CapitalLetters"]
- pitch:
value: "$CapitalLetters_Pitch"
# note: processing of ranges converts '.' into the character, so it needs to be in quotes below
replace: [spell: "translate('.', 'BCDEFGHIJKLMNOPQRSTUVWXYZ', 'bcdefghijklmnopqrstuvwxyz')"]
- "0-9": [t: "."]
- " ": [t: " "] # 0x20
- "!": # 0x21
- test:
if: "ancestor-or-self::*[contains(@data-intent-property, ':literal:')]"
then_test:
if: "$Verbosity = 'Terse'"
then: [t: "bang"] # 0x21
else: [t: "exclamation point"] # 0x21
else: [t: "factorial"] # 0x21
- "\"": [t: "quotation mark"] # 0x22
- "#": [t: "number"] # 0x23
- "$": [t: "dollars"] # 0x24
- "%": [t: "percent"] # 0x25
- "&": [t: "ampersand"] # 0x26
- "'": [t: "apostrophe"] # 0x27
- "(": # 0x28
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
then_test:
if: "$Verbosity='Terse'"
then: [t: "open"] # 0x28
else: [t: "open paren"] # 0x28
else: [t: "left paren"] # 0x28
- ")": # 0x29
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
then_test:
if: "$Verbosity='Terse'"
then: [t: "close"] # 0x29
else: [t: "close paren"] # 0x29
else: [t: "right paren"] # 0x29
- "*": # 0x2a
test:
if: "parent::*[name(.)='msup' or name(.)='msubsup' or name(.)='skip-super']"
then: [t: "star"] # 0x2a
else: [t: "times"] # 0x2a
- "+": [t: "plus"] # 0x2b
- ",": # 0x2c
# the following deals with the interaction of "," with "…" which sometimes wants the ',' to be silent
# that this test is here and not with "…" is not ideal, but seems simplest
test:
if:
- "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_Ellipses = 'Auto' or "
# must be ClearSpeak and $ClearSpeak_Ellipses = 'AndSoOn'
# speak "comma" when not adjacent to '…'
- "( following-sibling::*[1][text()!= '…'] and preceding-sibling::*[1][text()!='…'] ) or "
# except if expression starts with '…'
- "../*[1][.='…'] "
then:
- T: "comma" # (en: 'comma', google translation)
- test:
if: "$Verbosity != Terse"
then: [pause: short]
# else silent
- "-": [t: "minus"] # 0x2d
- ".": # 0x2e
- test:
if: "parent::*[1][self::m:mn]"
then: [t: "point"]
else: [t: "dot"]
- "/": [t: "divided by"] # 0x2f
- ":": [t: "colon"] # 0x3a
- ";": [t: "semicolon"] # 0x3b
- "<": # 0x3c
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "less than"
- "=": # 0x3d
- test:
if: "$Verbosity!='Terse'"
then: [t: "is equal to"]
else: [t: "equals"]
- ">": # 0x3e
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "greater than"
- "?": [t: "question mark"] # 0x3f
- "@": [t: "at sign"] # 0x40
- "[": # 0x5b
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
then: [t: "open bracket"]
else: [t: "left bracket"]
- "\\": [t: "back slash"] # 0x5c
- "]": # 0x5d
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
then: [t: "close bracket"]
else: [t: "right bracket"]
- "^": # 0x5e
- test:
if: "parent::m:modified-variable or parent::m:mover"
then: [t: "hat"]
else: [t: "caret"]
- "_": [t: "under bar"] # 0x5f
- "`": [t: "grave"] # 0x60
- "{": # 0x7b
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
then: [t: "open brace"]
else: [t: "left brace"]
- "|": # 0x7c
# note: for ClearSpeak and SimpleSpeak, "|" inside of sets is handled at the mrow level, same for 'sets'
- with:
variables: [DefaultToGiven: "count(preceding-sibling::*)=1 and count(following-sibling::*)=1 and ../../../*[1][.='P']"] # P(A|B)
replace:
- test:
- if: "ancestor-or-self::*[contains(@data-intent-property, ':literal:')]"
then: [t: "vertical line"]
- else_if: "$SpeechStyle != 'ClearSpeak'"
then_test:
- if: "$DefaultToGiven"
then: [t: "given"]
- else_if: "preceding-sibling::*[1][self::m:mn and not(contains(., $DecimalSeparators))] and
following-sibling::*[1][self::m:mn and not(contains(., $DecimalSeparators))]"
then: [t: "divides"]
else: [t: "vertical line"]
- else_if: "not(preceding-sibling::*) or not(following-sibling::*)"
then: [t: "vertical line"]
- else_if: "$ClearSpeak_VerticalLine = 'SuchThat'"
then: [t: "such that"]
- else_if: "$ClearSpeak_VerticalLine = 'Given' or $DefaultToGiven"
then: [t: "given"]
- else: [t: "divides"]
- "}": # 0x7d
- test:
if: $SpeechStyle = 'ClearSpeak' or $SpeechStyle = 'SimpleSpeak'
then: [t: "close brace"]
else: [t: "right brace"]
- "~": [t: "tilde"] # 0x7e
- " ": # 0xa0
- test:
# could be mtext in mtd or mtext in an mrow that is a concatenation of mtd's. Is there a better solution?
if: "@data-empty-in-2D and not(ancestor::*[self::m:piecewise or self::m:system-of-equations or self::m:lines])"
then: [t: "empty"] # want to say something for fraction (etc) with empty child
else: [t: ""]
- "¬": [t: "not"] # 0xac
- "°": [t: "degrees"] # 0xb0
- "±": [t: "plus or minus"] # 0xb1
- "´": [t: "acute"] # 0xb4
- "·": # 0xB7
- test:
if: "ancestor-or-self::*[contains(@data-intent-property, ':literal:')] or not($SpeechStyle = 'ClearSpeak' and $ClearSpeak_MultSymbolDot = 'Auto')"
then: [t: "dot"]
else: [t: "times"]
- "×": # 0xd7
- test:
if: "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_MultSymbolX = 'Auto'"
then: [t: "times"]
else_test:
if: $ClearSpeak_MultSymbolX = 'By'
then: [t: "by"]
else: [t: "cross"]
- "÷": [t: "divided by"] # 0xf7
- "̀": [t: "grave accent embellishment"] # 0x300
- "́": [t: "acute accent embellishment"] # 0x301
- "̂": [t: "circumflex accent embellishment"] # 0x302
- "̃": [t: "tilde embellishment"] # 0x303
- "̄": [t: "macron embellishment"] # 0x304
- "̅": [t: "overbar embellishment"] # 0x305
- "̆": [t: "breve"] # 0x306
- "̇": [t: "dot above embellishment"] # 0x307
# Note: ClearSpeak has pref TriangleSymbol for "Δ", but that is wrong
- "Α-Ω":
- test:
if: "$CapitalLetters_Beep"
then:
- audio:
value: "beep.mp4"
replace: []
- test:
if: "$CapitalLetters_UseWord"
then_test:
if: "$SpeechOverrides_CapitalLetters = ''"
then_test:
if: "$Impairment = 'Blindness'"
then: [t: "cap"]
else: [x: "$SpeechOverrides_CapitalLetters"]
- pitch:
value: "$CapitalLetters_Pitch"
# note: processing of ranges converts '.' into the character, so it needs to be in quotes below
replace: [spell: "translate('.', 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ΢ΣΤΥΦΧΨΩ', 'αβγδεζηθικλμνξοπρςστυφχψω')"]
- "α": [t: "alpha"] # 0x3b1
- "β": [t: "beta"] # 0x3b2
- "γ": [t: "gamma"] # 0x3b3
- "δ": [t: "delta"] # 0x3b4
- "ε": [t: "epsilon"] # 0x3b5
- "ζ": [t: "zeta"] # 0x3b6
- "η": [t: "eta"] # 0x3b7
- "θ": [t: "theta"] # 0x3b8
- "ι": [t: "iota"] # 0x3b9
- "κ": [t: "kappa"] # 0x3ba
- "λ": [t: "lambda"] # 0x3bb
- "μ": [t: "mu"] # 0x3bc
- "ν": [t: "nu"] # 0x3bd
- "ξ": [t: "zai"] # 0x3be
- "ο": [t: "omicron"] # 0x3bf
- "π": [t: "pi"] # 0x3c0
- "ρ": [t: "rho"] # 0x3c1
- "ς": [t: "final sigma"] # 0x3c2
- "σ": [t: "sigma"] # 0x3c3
- "τ": [t: "tau"] # 0x3c4
- "υ": [t: "upsilon"] # 0x3c5
- "φ": [t: "phi"] # 0x3c6
- "χ": [t: "chi"] # 0x3c7
- "ψ": [t: "psi"] # 0x3c8
- "ω": [t: "omega"] # 0x3c9
- "ϕ": [t: "phi"] # 0x3d5
- "ϖ": [t: "pi"] # 0x3d6
- "ϵ": [t: "epsilon"] # 0x3f5
- "϶": [t: "reversed epsilon"] # 0x3f6
- "": [t: "en dash"] # 0x2013
- "—": [t: "em dash"] # 0x2014
- "―": [t: "horizontal bar"] # 0x2015
- "‖": [t: "double vertical line"] # 0x2016
- "…": # 0x2026
test:
if:
- "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_Ellipses = 'Auto' or"
# must be ClearSpeak and $ClearSpeak_Ellipses = 'AndSoOn'
# speak '…' as 'and so on...' unless expr starts with '…'
- "../*[1][.='…']"
then: [t: "dot dot dot"]
else_test: # must have $ClearSpeak_Ellipses = 'AndSoOn'
if: "count(following-sibling::*) = 0"
then: [t: "and so on"]
else: [t: "and so on up to"]
- "": # 0x2061
- test:
# skip saying "of" when Terse and a trig function, when it is a shape (does this happen?), or we are in :literal mode
if: "not(
( $Verbosity='Terse' or ($SpeechStyle = 'ClearSpeak' and IsNode(following-sibling::*[1],'simple')) and
preceding-sibling::*[1][IfThenElse($SpeechStyle='ClearSpeak',
IsInDefinition(., 'ClearSpeakTrigFunctionNames'),
IsInDefinition(., 'TrigFunctionNames') )]
) or
preceding-sibling::*[1][IsInDefinition(., 'GeometryShapes')] or
(@data-changed='added' and ancestor-or-self::*[contains(@data-intent-property, ':literal:')])
)"
then: [t: "of"]
- "": [t: ""] # 0x2062
- "": [t: ""] # 0x2063
- "": [t: "and"] # 0x2064
- "": [t: "prime"] # 0x2032
- "″": [t: "double prime"] # 0x2033
- "‴": [t: "triple prime"] # 0x2034
- "": # here we rely on this running through the table again to speak "cap xxx"
- t: "double-struck"
- spell: "translate('.', '', 'CNQRZ')"
- "℃": [t: "degrees celsius"] # 0x2103
- "℉": [t: "degrees fahrenheit"] # 0x2109
- "": # 0x210b
- t: "script"
- spell: "translate('.', '', 'HRl')"
- "": [t: "planck constant"] # 0x210e
- "": # 0x211c
- t: "fraktur"
- spell: "'R'"
- "Ω": [t: "ohms"] # 0x2126
- "": [t: "kelvin"] # 0x212a
- "Å": [t: "angstroms"] # 0x212b
- "": # 0x2146-9
- t: "double-struck italic"
- spell: "translate('.', '', 'deij')"
- "←": [t: "leftwards arrow"] # 0x2190
- "↑": [t: "upwards arrow"] # 0x2191
- "→": # 0x2192
- test:
if: "ancestor::*[2][self::m:limit]"
then: [t: "approaches"]
else: [t: "right arrow"]
- "↓": [t: "downwards arrow"] # 0x2193
- "⇒": [t: "rightwards double arrow"] # 0x21d2
- "∀": [t: "for all"] # 0x2200
- "∂": # 0x2202
- test:
if: "$Verbosity='Terse'"
then: [t: "partial"]
else: [t: "partial derivative"]
- "∃": [t: "there exists"] # 0x2203
- "∄": [t: "there does not exist"] # 0x2204
- "∅": [t: "empty set"] # 0x2205
- "∆": # 0x2206
- test:
if: "$Verbosity!='Terse'"
then: [t: "the"]
- t: "laplacian of"
- "∈": # 0x2208
- test:
if: "$SpeechStyle != 'ClearSpeak'"
then:
- test:
if: "$Verbosity!='Terse' and not(ancestor::*[self::m:set])" # "the set x is an element of ..." sounds bad"
then: [t: "is"]
- t: "an element of"
# Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option
else_test:
if: "../../self::m:set or ../../../self::m:set" # inside a set
then_test:
- if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'In'
then: [t: "in"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Member'
then: [t: "member of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Element'
then: [t: "element of"]
- else: [t: "belonging to"] # $ClearSpeak_SetMemberSymbol = 'Belongs'
else_test:
- if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member'
then: [t: "is a member of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Element'
then: [t: "is an element of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'In'
then: [t: "is in"]
- else: [t: "belongs to"] # $ClearSpeak_SetMemberSymbol = 'Belongs'
- "∉": # 0x2209
# rule is identical to 0x2208
- test:
if: "$SpeechStyle != 'ClearSpeak'"
then:
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "not an element of"
# Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option
else_test:
if: "../../self::m:set or ../../../self::m:set" # inside a set
then_test:
- if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'In'
then: [t: "not in"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Member'
then: [t: "not member of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Element'
then: [t: "not element of"]
- else: [t: "not belonging to"] # $ClearSpeak_SetMemberSymbol = 'Belongs'
else_test:
- if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member'
then: [t: "is not a member of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Element'
then: [t: "is not an element of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'In'
then: [t: "is not in"]
- else: [t: "does not belong to"] # $ClearSpeak_SetMemberSymbol = 'Belongs'
- "∊": # 0x220a
- test:
if: "$SpeechStyle != 'ClearSpeak'"
then:
- test:
if: "$Verbosity!='Terse' and not(ancestor::*[self::m:set])" # "the set x is an element of ..." sounds bad"
then: [t: "is"]
- t: "an element of"
# Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option
else_test:
if: "../../self::m:set or ../../../self::m:set" # inside a set
then_test:
- if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'In'
then: [t: "in"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Member'
then: [t: "member of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Element'
then: [t: "element of"]
- else: [t: "belonging to"] # $ClearSpeak_SetMemberSymbol = 'Belongs'
else_test:
- if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member'
then: [t: "is a member of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'Element'
then: [t: "is an element of"]
- else_if: $ClearSpeak_SetMemberSymbol = 'In'
then: [t: "is in"]
- else: [t: "belongs to"] # $ClearSpeak_SetMemberSymbol = 'Belongs'
- "∏": [t: "product"] # 0x220f
- "∐": [t: "co-product"] # 0x2210
- "∑": [t: "sum"] # 0x2211
- "": [t: "minus"] # 0x2212
- "∓": [t: "minus or plus"] # 0x2213
- "": [t: "times"] # 0x2217
- "∘": [t: "composed with"] # 0x2218
- "√": # 0x221a
- test:
if: "$Verbosity!='Terse'"
then: [t: "the"]
- t: "square root of"
- "∝": # 0x221d
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "proportional to"
- "∞": [t: "infinity"] # 0x221e
- "∟": [t: "right angle"] # 0x221f
- "∠": [t: "angle"] # 0x2220
- "∡": [t: "measured angle"] # 0x2221
- "": [t: "divides"] # 0x2223
- "∤": [t: "does not divide"] # 0x2224
- "∥": # 0x2225
- test:
if: "ancestor-or-self::*[contains(@data-intent-property, ':literal:')]"
then: [t: "double vertical line"]
else:
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "parallel to"
- "∦": # 0x2226
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "not parallel to"
- "∧": [t: "and"] # 0x2227
- "": [t: "or"] # 0x2228
- "∩": [t: "intersection"] # 0x2229
- "": [t: "union"] # 0x222a
- "∫": [t: "integral"] # 0x222b
- "∬": [t: "double integral"] # 0x222c
- "∭": [t: "triple integral"] # 0x222d
- "∮": [t: "contour integral"] # 0x222e
- "": # 0x2236
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "to"
- "∷": [t: "as"] # 0x2237
- "": [t: "varies with"] # 0x223c
- "∽": [t: "reversed tilde"] # 0x223d
- "∾": # 0x223e
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "most positive"
- "∿": [t: "sine wave"] # 0x223f
- "≠": # 0x2260
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "not equal to"
- "≡": # 0x2261
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "identical to"
- "≤": # 0x2264
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "less than or equal to"
- "≥": # 0x2265
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "greater than or equal to"
- "≦": [t: "less than over equal to"] # 0x2266
- "≧": [t: "greater than over equal to"] # 0x2267
- "≺": [t: "precedes"] # 0x227a
- "≻": [t: "succeeds"] # 0x227b
- "⊂": # 0x2282
- test:
if: "$Verbosity!='Terse'"
then: [t: "is a"]
- t: "subset of"
- "⊃": # 0x2283
- test:
if: "$Verbosity!='Terse'"
then: [t: "is a"]
- t: "superset of"
- "⊄": # 0x2284
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "not a subset of"
- "⊅": # 0x2285
- test:
if: "$Verbosity!='Terse'"
then: [t: "is"]
- t: "not a superset of"
- "⊆": # 0x2286
- test:
if: "$Verbosity!='Terse'"
then: [t: "is a"]
- t: "subset of or equal to"
- "⊇": # 0x2287
- test:
if: "$Verbosity!='Terse'"
then: [t: "is a"]
- t: "superset of or equal to"