lingua-franca icon indicating copy to clipboard operation
lingua-franca copied to clipboard

pronounce number with higher precision than provided

Open maxbachmann opened this issue 5 years ago • 6 comments

When using the function pronounce_number mycroft/util/lang/parse_*.py with a higher precision than the used number e.g.

pronounce_number(-21.234, places=4)

in english the output is:

minus twenty one point two three four

while in german the output is

minus einundzwanzig komma zwei drei vier null

this leads to the question which of the two behaviors is correct, since either all pronounce_number functions should stop the sentence when they reach the precision of the provided number, or they should all add zero/null in the end until the requested precision is reached.

maxbachmann avatar Nov 26 '19 22:11 maxbachmann

What if it became,

pronounce_number(number, places, trailing_zeroes=False)

That would also make perfect sense as an integer (pronounce up to n trailing zeroes)

ChanceNCounter avatar Nov 28 '19 01:11 ChanceNCounter

fixed by MycroftAI/mycroft-core#2386 here and ported to Lingua Franca, I think this can be closed.

ChanceNCounter avatar Mar 27 '20 01:03 ChanceNCounter

This Commit did only fix some stuff with the way times are said, but did not work on the trailing zeros issue described in this issue

maxbachmann avatar Mar 27 '20 01:03 maxbachmann

Fair enough. In that case, could you (or a Mycroft person) please move it to LF? The function lives there now.

ChanceNCounter avatar Mar 27 '20 01:03 ChanceNCounter

This requires someone from Mycroft to move it (I could only close it here and open it again in LF)

maxbachmann avatar Mar 27 '20 01:03 maxbachmann

I like to move it, move it...

forslund avatar Mar 27 '20 15:03 forslund