Home › Forums › OpenEars › Grammer for "ZERO"…"ONE HUNDRED AND FORTY FOUR" › Reply To: Grammer for "ZERO"…"ONE HUNDRED AND FORTY FOUR"
On efficient:
I was originally thinking faster to return a result.
If it is a tree structure then following branches implies less ‘comparisons’.
I may have assumed this would result in a more accurate result. which may not be the case. Lots to learn.
On grammer:
If one word in [one,two,…,nineteen,twenty,thirty,…,ninety] then done
If two words and first word is in [Twenty, Thirty, Forty, Fifty, Sixty, Seventy, Eighty, Ninety] and second word in [one,two,…,nine] then done
it three words and first word is [one] and second word in [oh,ten,twenty,thirty,forty] and
if second word was [oh] then third word in [one,…,nine] then done
else second word in [ten,..,forty] and third word in [one,…,nine]
which I may be able translate into the must one of, may one of, … now that I’ve written it out this far.
(and I’ve left out some options such as ‘one hundred and one’).