News for hackers. Stuff that matters.
Re:Show HN: Convert a number to an approximated text expression by ramshorns on Sunday April 26, 2020 @05:40AM (#22985880)
One other aspect of approximated numbers is whether the author wants to emphasize that the number is large or small. "Less than" and "almost" carry different connotations.
Re:Show HN: Convert a number to an approximated text expression by zz0mm on Sunday April 26, 2020 @06:45AM (#22986160)
You are right, hence Number Words returns different versions of the approximation: 'more', 'less' and 'around'. More nuanced versions could be added to the list. Importantly the choice of the approximation version to use would be with the user of the library. Wonder if the algorithm to choose appropriate approximation can be devised.
Re:Show HN: Convert a number to an approximated text expression by oefrha on Sunday April 26, 2020 @09:45AM (#22987087)
> Water temperature is below 10C (input data would be 9.53C)

I can't tell the water temperature at all without context -- could be any temperature below 10C; and in the wrong context it could be confusing. "Just below"/"just under" would be a lot more accurate.

Re:Show HN: Convert a number to an approximated text expression by jagged-chisel on Sunday April 26, 2020 @09:38AM (#22987045)
Given GP's "...whether the author wants to emphasize..." I don't think an algorithm could choose without knowing the author's intent. There's so much context and subtlety in choosing words based on intent.
Re:Show HN: Convert a number to an approximated text expression by paul_f on Sunday April 26, 2020 @09:46AM (#22987093)
Could one split the difference with "just under"? Or maybe add an expected value or prior value, and the algorithm would adjust how it is phrased?