Skip Menu |

This queue is for tickets about the Lingua-EN-Inflect CPAN distribution.

Report information
The Basics
Id: 83102
Status: resolved
Priority: 0/
Queue: Lingua-EN-Inflect

People
Owner: Nobody in particular
Requestors: ALEENA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: More NUMWORDS
I noticed NUMWORDS cuts off at a certain point a while ago and started to look into more NUMWORDS. I think I have extended your NUMWORDS array a bit. It might not be to your liking, so change it as you see fit. :) my @numwords = ('',"thousand", map { (my $val=$_) =~ s/_/illion/; "$val" } (qw(m_ b_ tr_ quadr_ quint_ sext_ sept_ oct_ non_)), map { (my $val=$_) =~ s/_/decillion/; "$val" } ('_',qw(un_ duo_ tre_ quattuor_ quin_ sex_ septen_ octo_ novem_)), ); my @prefixes_1 = qw(vi tri quadra quinqua sexa septua octo nona); my @prefixes_2 = qw(un_ duo_ tres_ quattuor_ quinqua_ ses_ septen_ octo_ novem_); for my $prefix (@prefixes_1) { push @numwords, map { (my $val=$_) =~ s/_/$prefix\gintillion/; "$val" } ('_',@prefixes_2) } I hope this helps. You might want to check my work and research, I may have gotten it wrong. Lady Aleena
Subject: Re: [rt.cpan.org #83102] More NUMWORDS
Date: Mon, 4 Feb 2013 13:00:21 +1100
To: bug-Lingua-EN-Inflect [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Lady Aleena wrote: Show quoted text
> I noticed NUMWORDS cuts off at a certain point a while ago and started > to look into more NUMWORDS. I think I have extended your NUMWORDS array > a bit. It might not be to your liking, so change it as you see fit. :)
I have a ToDo item for this probem, but there are complications. The system you so kindly implemented is definitely the "U.S." system my research uncovered, but entirely dissimilar to the U.K. system I found. Here are my notes on the two: U.S. approach ------------- number of 0's Name samples of some of them ==--======---================== thousand 1,000 1 million 1,000,000 2 billion 1,000,000,000 3 trillion 1,000,000,000,000 4 quadrillion 1,000,000,000,000,000 5 quintillion 1,000,000,000,000,000,000 6 sextillion 1,000,000,000,000,000,000,000 7 septillion 1,000,000,000,000,000,000,000,000 8 octillion 1,000,000,000,000,000,000,000,000,000 9 nonillion 1,000,000,000,000,000,000,000,000,000,000 10 decillion 1,000,000,000,000,000,000,000,000,000,000,000 11 undecillion 1,000,000,000,000,000,000,000,000,000,000,000,000 12 duodecillion 13 tredecillion The latin roots of the numbers show the 14 quattuordecillion # of groups of 3-zeroes that follow 1000. 15 quindecillion 2=bi, 3=tri, 4=quad, 5=quin, 6=sex, 7=sept 16 sexdecillion 8=oct, 9=non, 10=decem, 20=vigin. 17 septendecillion 18 octodecillion Names for groups 3 to 63 come from several 19 novemdecillion sources, both encyclopedic and dictionary. 20 vigintillion 21 unvigintillion Prefixes un-, duo-, tre-, quattuor, quin-, 22 duovigintillion sex-, sept-, octo, and novem-, appear to 23 trevigintillion modify TEN (decem) to make 11 to 19. 24 quattuorvigintillion 25 quinvigintillion I followed the same pattern before 26 sexvigintillion vigintillion to create 21 to 29 sets 27 septenvigintillion of 000's after 1,000. 28 octovigintillion 29 novemvigintillion decem=10, viginti=20, centi=100. 30 trigintillion 31 untrigintillion 32 duotrigintillion 33 tretrigintillion 34 quattuortrigintillion 35 quintrigintillion 36 sextrigintillion 37 septtrigintillion 38 octotrigintillion 39 novemtrigintillion 40 quardragintillion 41 unquardragintillion 42 duoquardragintillion 43 trequardragintillion 44 quattuorquardragintillion 45 quinquardragintillion 46 sexquardragintillion 47 septquardragintillion 48 octoquardragintillion 49 novemquardragintillion 50 quinquagintillion 51 unquinquagintillion 52 duoquinquagintillion 53 trequinquagintillion 54 quattuorquinquagintillion 55 quinquinquagintillion 56 sexquinquagintillion 57 septquinquagintillion 58 octoquinquagintillion 59 novemquinquagintillion 60 sexagintillion 61 unsexagintillion 62 duosexagintillion 63 tresexagintillion 64 quattuorsexagintillion 65 quinsexagintillion 66 sexsexagintillion 67 septsexagintillion 68 octosexagintillion 69 novemsexagintillion 70 septuagintillion 71 unseptuagintillion 72 duoseptuagintillion 73 treseptuagintillion 74 quattuorseptuagintillion 75 quinseptuagintillion 76 sexseptuagintillion 77 septseptuagintillion 78 octoseptuagintillion 79 novemseptuagintillion 80 octogintillion 81 unoctogintillion 82 duooctogintillion 83 treoctogintillion 84 quattuoroctogintillion 85 quinoctogintillion 86 sexoctogintillion 87 septoctogintillion 88 octooctogintillion 89 novemoctogintillion 90 nonagintillion 91 unnonagintillion 92 duononagintillion 93 trenonagintillion 94 quattuornonagintillion 95 quinnonagintillion 96 sexnonagintillion 97 septnonagintillion 98 octononagintillion 99 novemnonagintillion 100 centillion 100 sets of 000 after 1,000. 2. British approach ------------------- number of 0's Name samples of some of them ==--======---================== 3 thousand 1,000 6 million 1,000,000 9 milliard 1,000,000,000 12 billion 1,000,000,000,000 15 billiard 1,000,000,000,000,000 18 trillion 1,000,000,000,000,000,000 21 trilliard 1,000,000,000,000,000,000,000 24 quadrillion 1,000,000,000,000,000,000,000,000 27 quadrilliard 1,000,000,000,000,000,000,000,000,000 30 quintillion 1,000,000,000,000,000,000,000,000,000,000 33 quintilliard 1,000,000,000,000,000,000,000,000,000,000,000 36 sextillion 1,000,000,000,000,000,000,000,000,000,000,000,000 39 sextilliard 42 septillion NOTE that if you divide the # of zeroes by six, 45 septilliard you have the number that relates to the word of 48 octillion the group. 2=bi, 3=tri, 4=quad, 5=quin, 6=sex, 51 octilliard 7=sept, 8=oct, 9=non, 10=decem, 20=viginti. 54 nonillion 57 nonilliard the names for number groups 60 decillion (TEN) 3, 6, 9, 12, and every multiple 63 decilliard of 6 up to 120 came from 66 undecillion several sources, both dictionary 69 undecilliard and encyclopedic. 72 duodecillion 75 duodecilliard I followed the pattern of 78 tredecillion "million" to "milliard" to list 81 tredecilliard all other groups up to 123. 84 quattuordecillion 87 quattuordecilliard The prefixes un-, duo-, tre-, quattuor-, 90 quindecillion quin-, sex-, septen, octo-, and novem- 93 quindecilliard appear to modify the latin TEN (decem), 96 sexdecillion to make 11, 12, up to 19. 99 sexdecilliard 102 septendecillion 105 septendecilliard 108 octodecillion 111 octodecilliard 114 novemdecillion 117 novemdecilliard 120 vigintillion (TWENTY) 123 vigintilliard 126 unvigintillion I followed the prefix-pattern 129 unvigintilliard used before -decillion and 132 duovigintillion -decilliard to create the names 135 duovigintilliard for 126 to 177, 21 through 29 138 trevigintillion groups of six. 141 trevigintilliard 144 quattuorvigintillion 147 quattuorvigintilliard 150 quinvigintillion 153 quinvigintilliard 156 sexvigintillion 159 sexvigintilliard 162 septenvigintillion 165 septenvigintilliard 168 octovigintillion 171 octovigintilliard 174 novemvigintillion 177 novemvigintilliard you can figure out the names are for 180 through 597 zeroes by looking at the list for American Numbering System. 180, 186, 192 ...: Divide the number by 6, use that name. 183, 189, 195 ...: Change the name for 3 less. 600 centillion 603 centilliard? (absolute guess, not found in any source). When I get around to implementing this extension, I will probably default to the U.S. approach (which seems to be gaining popularity) and add an extra flag to request the U.K. system instead. Thanks again for all your excellent feedback and suggestions, Damian
Subject: Re: [rt.cpan.org #83102] More NUMWORDS
Date: Mon, 4 Feb 2013 13:14:22 +1100
To: bug-Lingua-EN-Inflect [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Lady Aleena wrote: Show quoted text
> I noticed NUMWORDS cuts off at a certain point a while ago and started > to look into more NUMWORDS. I think I have extended your NUMWORDS array > a bit. It might not be to your liking, so change it as you see fit. :)
Incredibly, another valued contributor just sent me a full patch implementing this very feature. I guess it was two great minds thinking alike. :-) I've just uploaded a new release with this feature. Please check it out and send me any feedback. Thanks again, Damian
On Sun Feb 03 21:15:12 2013, damian@conway.org wrote: Show quoted text
> Lady Aleena wrote: >
> > I noticed NUMWORDS cuts off at a certain point a while ago and started > > to look into more NUMWORDS. I think I have extended your NUMWORDS array > > a bit. It might not be to your liking, so change it as you see fit. :)
> > Incredibly, another valued contributor just sent me a full patch > implementing this > very feature. I guess it was two great minds thinking alike. :-) > > I've just uploaded a new release with this feature. Please check it
out and Show quoted text
> send me any feedback. > > Thanks again, > > Damian
Damian...I think we have a problem. print NUMWORDS(1234); returns one thousandtwo hundred and thirty-four Lady Aleena
Subject: Re: [rt.cpan.org #83102] More NUMWORDS
Date: Tue, 5 Feb 2013 07:35:26 +1100
To: bug-Lingua-EN-Inflect [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> Damian...I think we have a problem. > > print NUMWORDS(1234); > > returns > one thousandtwo hundred and thirty-four
No, that's as documented. In list contexts it returns the various "chunks" of the full number. Try it in scalar context: print scalar NUMWORDS(1234); However, I'll review whether the documentation needs to be made clearer on that point. Thanks, Damian
I'm setting this issue as resolved.