Speech-Rule-Engine/speech-rule-engine

Not speaking plural

Closed this issue · 3 comments

The following should be spoken as "4 millimeters" (plural). It is spoken in the singular.

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
    <mn>4</mn>
    <mo>&InvisibleTimes;</mo>
    <mi class="MathML-Unit">mm</mi>
  </mrow>"
</math>

In general, anything that precedes a unit (skipping over a potential ⁢) that isn't a '1' should be spoken as plural. This includes the case where the unit is in a numerator and the number is not in the fraction. Same for an msup.

In the mathspeak rules it is spoken as 4 millimeters. Is that the expected behaviour?

In case you are referring to the clearspeak rules, there is currently incomplete handling of units, so you just get mm which is neither translated nor plural. I am about to tackle that together with some other related issues.

Btw., does that plural rule also apply to proper names, e.g.,

echo "<math><mn>4</mn><mi class=\"MathML-Unit\">Ω</mi></math>" | ./bin/sre -d mathspeak 

currently yields 4 ohms. While it sounds wrong to me, I assume it is correct?

Fixed since v3.0.1