Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordinal number suffixes and their incorrect number prefixes mix to produce unexpected behavior #96

Open
derekriemer opened this issue Feb 22, 2016 · 3 comments

Comments

@derekriemer
Copy link

  1. Take any natural numeric prefix such as 1, 2, 3, 4.
  2. Prepend this with either st, nd, rd, or th.
  3. Notice how when the wrong number is put with the ordinal number suffix, Espeak speaks the number as if it were an ordinal number.

Examples.

legend:

  • yes
    / no
ordinal prefix ordinal suffix ordinal combination speech correct? * or /
1 st 1st first *
2 st 2st secst /
3 st 3st thirst /
4 st 4st fourst /
1 nd 1nd firrnd /
2 nd 2nd second *
3 nd 3nd thirrnd /
4 nd 4nd fourrnd /
1 rd 1rd fird /
2 rd 2rd secd /
3 rd 3rd third *
4 rd 4rd fourd /
1 th 1th firth /
2 th 2th secth /
3 th 3th thirth /
4 th 4th fourth *

reason.

I haven't dug into the code rules, but I suspect that espeak is concatinating things like thi with rd to make third and thi with st to make thirst or something.

@rhdunn rhdunn added this to the Future milestone Feb 22, 2016
@valdisvi
Copy link
Member

In general, this is "garbage in, garbage out" problem.
Derekriemer, if you have some suggestions, what espeak-ng should say in the wrong cases, I could evaluate, some reasonable workarounds for these cases.

@rhdunn
Copy link
Member

rhdunn commented Jan 27, 2017

This is due to the way espeak handles ordinals. It splits them into the number and (st|nd|rd|th) part. That is, the 1 in 1st is pronounced as fir. The way I would like to implement this in espeak-ng is to use the words for the ordinals. That is, 1st should map to the word first, not f'3:st.

The motivation behind this is to make it easier to support accent variations and to be consistent across the numeric version and the version using words (e.g. 14 and fourteen).

The question is how to handle things like 3st. My thinking is to use:

Word Pronunciation
3rd third
3st three s t
3 st three stone

with the last one being handled by the $units marker proposed in issue #115.

@valdisvi
Copy link
Member

OK.
I'll try to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants