I have a checkmate in one hundred seventeen moves.

Discussion of chess software programming and technical issues.

Moderator: Ras

Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: I have a checkmate in one hundred seventeen moves.

Post by Dann Corbit »

Daniel Shawul wrote:
And even this won't always work. You have to use completely different
algorithms for every language and every output string.
why would one need different algorithms for this? Strings are placed in a resource file (like is done for windows APIs) and one could modify the strings to the required language. I would say different algorithm may be required for speaking 1500 either as 'one thousand five hundred' or just 'fifteen hundred'.

Daniel
Get the number shar file from here for lots of ways to spell numbers:
http://homepages.cwi.nl/~dik/english/ftp.html
krazyken

Re: I have a checkmate in one hundred seventeen moves.

Post by krazyken »

sje wrote:Three more usages:
2) Voice synthesis output. Do you want to hear "Mate in twelve moves" or "Mate in one two moves"?
I just tried this on my Mac OS box, I had it read your post above with all the numbers up to 4611686018427387904. It turns out that it pronounces all the numbers correctly up to one million, and will pronounce the other numbers correctly if they are comma delimited like so: 4,611,686,018,427,387,904
Teemu Pudas
Posts: 88
Joined: Wed Mar 25, 2009 12:49 pm

Re: Spelling test: the first 63 powers of two

Post by Teemu Pudas »

4611686018427387904
four quintillion six hundred eleven quadrillion six hundred eighty-six trillion eighteen billion four hundred twenty-seven million three hundred eighty-seven thousand nine hundred four
four point six one one six eight six oh one eight four two seven three eight seven nine oh four times ten to the eighteenth
MattieShoes
Posts: 718
Joined: Fri Mar 20, 2009 8:59 pm

Re: I have a checkmate in one hundred seventeen moves.

Post by MattieShoes »

Haha, I was thinking "m117" would be my choice :-)
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: I have a checkmate in one hundred seventeen moves.

Post by sje »

MattieShoes wrote:Haha, I was thinking "m117" would be my choice :-)
Or hexadecimal: "m75". Saves a byte.

More seriously, those with a Unix system of some kind with audio output can use the "say" command:

Code: Select all

say I have a checkmate in one hundred seventeen moves

say I have a checkmate in 117 moves
Both might produce the same audio output. But to be sure for all numbers and all platforms, you'll need to use the first version.

On a Mac, the outputs are slightly different: the second version inserts an "and" between "hundred" and "seventeen". I suppose that this is an acceptable variant although I prefer the results of the first version.

Some experimentation with "say" shows several inconsistencies when handling four digit values that could be interpreted as year numbers, so an explicit number speller would be needed in those cases.