I have never been bored since that day.
At work this last week, I was programming an application that only keypad for user input.  To display a report on the monitor, I decided to require the user to type 0.7734.   It was either that or 8675309.  I don't know if anyone will ever figure out the significance of the number or not.
Today, my user asked for a new report.  This requires me to come up with a new numeric sequence, leading me to research calculator spelling.  The official name for calculator spelling is called a BEghILOS (those are the letters that resemble numbers on the calculator).
I have been wanting to write something in python (the programming language) for some time now and decided that this project was as good as any.  So I wrote a program listing all the possible BEghiLOS that exist.  It turns out there are 542 of them.
The dictionary I used was found here.  If you know of a BEghILOS that is not on the list, its the fault of the dictionary :)  Please add it in the comments.
I also posted the python script after the below list.  Any of you python gurus out there, if you see anything weird with my code, please let me know.  It's my first python program, so I'd be surprised if there wasn't something wrong.
| Word | Calculator Numbers | 
| be | 38 | 
| bee | 338 | 
| beebee | 338338 | 
| beebees | 5338338 | 
| bees | 5338 | 
| beg | 938 | 
| begs | 5938 | 
| beige | 39138 | 
| beiges | 539138 | 
| bel | 738 | 
| belie | 31738 | 
| belies | 531738 | 
| bell | 7738 | 
| belle | 37738 | 
| belles | 537738 | 
| bellies | 5317738 | 
| bells | 57738 | 
| bels | 5738 | 
| besiege | 3931538 | 
| besieges | 53931538 | 
| bezel | 73238 | 
| bezels | 573238 | 
| bezil | 71238 | 
| bezils | 571238 | 
| bi | 18 | 
| bib | 818 | 
| bibb | 8818 | 
| bibbs | 58818 | 
| bible | 37818 | 
| bibles | 537818 | 
| bibless | 5537818 | 
| bibs | 5818 | 
| big | 918 | 
| biggie | 319918 | 
| biggies | 5319918 | 
| biggish | 4519918 | 
| bigs | 5918 | 
| bilbo | 08718 | 
| bilboes | 5308718 | 
| bilbos | 508718 | 
| bile | 3718 | 
| biles | 53718 | 
| bilge | 39718 | 
| bilges | 539718 | 
| bill | 7718 | 
| billie | 317718 | 
| billies | 5317718 | 
| bills | 57718 | 
| bio | 018 | 
| bios | 5018 | 
| bis | 518 | 
| bise | 3518 | 
| bises | 53518 | 
| biz | 218 | 
| bize | 3218 | 
| bizes | 53218 | 
| bizzes | 532218 | 
| bleb | 8378 | 
| blebs | 58378 | 
| bless | 55378 | 
| blesses | 5355378 | 
| bliss | 55178 | 
| blisses | 5355178 | 
| blob | 8078 | 
| blobs | 58078 | 
| blooie | 310078 | 
| bo | 08 | 
| bob | 808 | 
| bobbies | 5318808 | 
| bobble | 378808 | 
| bobbles | 5378808 | 
| bobs | 5808 | 
| bog | 908 | 
| boggish | 4519908 | 
| boggle | 379908 | 
| boggles | 5379908 | 
| bogie | 31908 | 
| bogies | 531908 | 
| bogle | 37908 | 
| bogles | 537908 | 
| bogs | 5908 | 
| boil | 7108 | 
| boils | 57108 | 
| bole | 3708 | 
| boles | 53708 | 
| boll | 7708 | 
| bolls | 57708 | 
| bolo | 0708 | 
| bolos | 50708 | 
| bolshie | 3145708 | 
| bolshies | 53145708 | 
| boo | 008 | 
| boob | 8008 | 
| boobie | 318008 | 
| boobies | 5318008 | 
| boobish | 4518008 | 
| booboo | 008008 | 
| booboos | 5008008 | 
| boobs | 58008 | 
| boogie | 319008 | 
| boogies | 5319008 | 
| boohoo | 004008 | 
| boohoos | 5004008 | 
| boos | 5008 | 
| booze | 32008 | 
| boozes | 532008 | 
| bos | 508 | 
| bosh | 4508 | 
| boshes | 534508 | 
| boss | 5508 | 
| bosses | 535508 | 
| bossies | 5315508 | 
| bozo | 0208 | 
| bozos | 50208 | 
| ebb | 883 | 
| ebbs | 5883 | 
| eel | 733 | 
| eels | 5733 | 
| egg | 993 | 
| eggless | 5537993 | 
| eggs | 5993 | 
| eggshell | 77345993 | 
| egis | 5193 | 
| egises | 535193 | 
| ego | 093 | 
| egoless | 5537093 | 
| egos | 5093 | 
| eh | 43 | 
| el | 73 | 
| elegies | 5319373 | 
| elegise | 3519373 | 
| elegises | 53519373 | 
| elegize | 3219373 | 
| elegizes | 53219373 | 
| elhi | 1473 | 
| eligible | 37819173 | 
| ell | 773 | 
| ells | 5773 | 
| els | 573 | 
| else | 3573 | 
| es | 53 | 
| eses | 5353 | 
| ess | 553 | 
| esses | 53553 | 
| gee | 339 | 
| gees | 5339 | 
| geese | 35339 | 
| geez | 2339 | 
| gel | 739 | 
| gelee | 33739 | 
| gelees | 533739 | 
| gels | 5739 | 
| gesso | 05539 | 
| gessoes | 5305539 | 
| ghee | 3349 | 
| ghees | 53349 | 
| ghi | 149 | 
| ghibli | 178149 | 
| ghiblis | 5178149 | 
| ghillie | 3177149 | 
| ghillies | 53177149 | 
| ghis | 5149 | 
| gib | 819 | 
| gibbose | 3508819 | 
| gibe | 3819 | 
| gibes | 53819 | 
| gibs | 5819 | 
| gie | 319 | 
| gies | 5319 | 
| gig | 919 | 
| giggle | 379919 | 
| giggles | 5379919 | 
| gighe | 34919 | 
| gigolo | 070919 | 
| gigolos | 5070919 | 
| gigs | 5919 | 
| gill | 7719 | 
| gillie | 317719 | 
| gillies | 5317719 | 
| gills | 57719 | 
| glebe | 38379 | 
| glebes | 538379 | 
| glee | 3379 | 
| glees | 53379 | 
| gleg | 9379 | 
| glib | 8179 | 
| glob | 8079 | 
| globe | 38079 | 
| globes | 538079 | 
| globose | 3508079 | 
| globs | 58079 | 
| glogg | 99079 | 
| gloggs | 599079 | 
| gloss | 55079 | 
| glosses | 5355079 | 
| glossies | 53155079 | 
| gloze | 32079 | 
| glozes | 532079 | 
| go | 09 | 
| gob | 809 | 
| gobble | 378809 | 
| gobbles | 5378809 | 
| gobies | 531809 | 
| gobo | 0809 | 
| goboes | 530809 | 
| gobos | 50809 | 
| gobs | 5809 | 
| goes | 5309 | 
| goggle | 379909 | 
| goggles | 5379909 | 
| gogo | 0909 | 
| gogos | 50909 | 
| golosh | 450709 | 
| goloshe | 3450709 | 
| goloshes | 53450709 | 
| goo | 009 | 
| googlies | 53179009 | 
| googol | 709009 | 
| googols | 5709009 | 
| goos | 5009 | 
| goose | 35009 | 
| gooses | 535009 | 
| gosh | 4509 | 
| he | 34 | 
| hebe | 3834 | 
| hebes | 53834 | 
| heel | 7334 | 
| heelless | 55377334 | 
| heels | 57334 | 
| heeze | 32334 | 
| heezes | 532334 | 
| heh | 434 | 
| hehs | 5434 | 
| heigh | 49134 | 
| heil | 7134 | 
| heils | 57134 | 
| heishi | 145134 | 
| helio | 01734 | 
| helios | 501734 | 
| hell | 7734 | 
| hellhole | 37047734 | 
| hellish | 4517734 | 
| hello | 07734 | 
| helloes | 5307734 | 
| hellos | 507734 | 
| hells | 57734 | 
| helo | 0734 | 
| helos | 50734 | 
| hes | 534 | 
| hi | 14 | 
| hie | 314 | 
| hies | 5314 | 
| higgle | 379914 | 
| higgles | 5379914 | 
| high | 4914 | 
| highs | 54914 | 
| hili | 1714 | 
| hill | 7714 | 
| hillo | 07714 | 
| hilloes | 5307714 | 
| hillos | 507714 | 
| hills | 57714 | 
| his | 514 | 
| hiss | 5514 | 
| hisses | 535514 | 
| hissies | 5315514 | 
| ho | 04 | 
| hob | 804 | 
| hobbies | 5318804 | 
| hobble | 378804 | 
| hobbles | 5378804 | 
| hobo | 0804 | 
| hoboes | 530804 | 
| hobos | 50804 | 
| hobs | 5804 | 
| hoe | 304 | 
| hoes | 5304 | 
| hog | 904 | 
| hogg | 9904 | 
| hoggish | 4519904 | 
| hoggs | 59904 | 
| hogs | 5904 | 
| hoise | 35104 | 
| hoises | 535104 | 
| hole | 3704 | 
| holeless | 55373704 | 
| holes | 53704 | 
| holies | 531704 | 
| hollies | 5317704 | 
| hollo | 07704 | 
| holloes | 5307704 | 
| holloo | 007704 | 
| holloos | 5007704 | 
| hollos | 507704 | 
| hols | 5704 | 
| hoolie | 317004 | 
| hose | 3504 | 
| hosel | 73504 | 
| hosels | 573504 | 
| hoses | 53504 | 
| ibis | 5181 | 
| ibises | 535181 | 
| igloo | 00791 | 
| igloos | 500791 | 
| ill | 771 | 
| ills | 5771 | 
| is | 51 | 
| isle | 3751 | 
| isleless | 55373751 | 
| isles | 53751 | 
| isogloss | 55079051 | 
| isohel | 734051 | 
| isohels | 5734051 | 
| isolog | 907051 | 
| isologs | 5907051 | 
| issei | 13551 | 
| isseis | 513551 | 
| lee | 337 | 
| lees | 5337 | 
| leg | 937 | 
| leges | 53937 | 
| legible | 3781937 | 
| legless | 5537937 | 
| legs | 5937 | 
| lei | 137 | 
| leis | 5137 | 
| less | 5537 | 
| lessee | 335537 | 
| lessees | 5335537 | 
| lez | 237 | 
| lezzes | 532237 | 
| lezzie | 312237 | 
| lezzies | 5312237 | 
| li | 17 | 
| lib | 817 | 
| libel | 73817 | 
| libelee | 3373817 | 
| libelees | 53373817 | 
| libellee | 33773817 | 
| libels | 573817 | 
| libs | 5817 | 
| lie | 317 | 
| liege | 39317 | 
| lieges | 539317 | 
| lies | 5317 | 
| lilies | 531717 | 
| lis | 517 | 
| lisle | 37517 | 
| lisles | 537517 | 
| lo | 07 | 
| lob | 807 | 
| lobbies | 5318807 | 
| lobe | 3807 | 
| lobes | 53807 | 
| lobo | 0807 | 
| lobos | 50807 | 
| lobs | 5807 | 
| loess | 55307 | 
| loesses | 5355307 | 
| log | 907 | 
| loge | 3907 | 
| loges | 53907 | 
| loggie | 319907 | 
| logo | 0907 | 
| logoi | 10907 | 
| logos | 50907 | 
| logs | 5907 | 
| loll | 7707 | 
| lollies | 5317707 | 
| lolls | 57707 | 
| loo | 007 | 
| loobies | 5318007 | 
| looie | 31007 | 
| looies | 531007 | 
| loos | 5007 | 
| loose | 35007 | 
| looses | 535007 | 
| lose | 3507 | 
| losel | 73507 | 
| losels | 573507 | 
| loses | 53507 | 
| loss | 5507 | 
| losses | 535507 | 
| obe | 380 | 
| obeli | 17380 | 
| obelise | 3517380 | 
| obelises | 53517380 | 
| obelize | 3217380 | 
| obelizes | 53217380 | 
| obes | 5380 | 
| obese | 35380 | 
| obi | 180 | 
| obis | 5180 | 
| oblige | 391780 | 
| obligee | 3391780 | 
| obligees | 53391780 | 
| obliges | 5391780 | 
| oboe | 3080 | 
| oboes | 53080 | 
| obol | 7080 | 
| obole | 37080 | 
| oboles | 537080 | 
| oboli | 17080 | 
| obols | 57080 | 
| obsess | 553580 | 
| obsesses | 53553580 | 
| oe | 30 | 
| oes | 530 | 
| ogee | 3390 | 
| ogees | 53390 | 
| ogle | 3790 | 
| ogles | 53790 | 
| oh | 40 | 
| oho | 040 | 
| ohs | 540 | 
| oil | 710 | 
| oilhole | 3704710 | 
| oilholes | 53704710 | 
| oils | 5710 | 
| ole | 370 | 
| oleo | 0370 | 
| oleos | 50370 | 
| oles | 5370 | 
| olio | 0170 | 
| olios | 50170 | 
| ologies | 5319070 | 
| ooh | 400 | 
| oohs | 5400 | 
| oologies | 53190700 | 
| ooze | 3200 | 
| oozes | 53200 | 
| os | 50 | 
| ose | 350 | 
| oses | 5350 | 
| see | 335 | 
| seel | 7335 | 
| seels | 57335 | 
| sees | 5335 | 
| seg | 935 | 
| sego | 0935 | 
| segos | 50935 | 
| segs | 5935 | 
| sei | 135 | 
| seis | 5135 | 
| seise | 35135 | 
| seises | 535135 | 
| seize | 32135 | 
| seizes | 532135 | 
| sel | 735 | 
| sell | 7735 | 
| selle | 37735 | 
| selles | 537735 | 
| sells | 57735 | 
| sels | 5735 | 
| sessile | 3715535 | 
| sh | 45 | 
| she | 345 | 
| shell | 77345 | 
| shells | 577345 | 
| sheol | 70345 | 
| sheols | 570345 | 
| shes | 5345 | 
| shh | 445 | 
| shiel | 73145 | 
| shiels | 573145 | 
| shies | 53145 | 
| shill | 77145 | 
| shills | 577145 | 
| shoe | 3045 | 
| shoebill | 77183045 | 
| shoeless | 55373045 | 
| shoes | 53045 | 
| shog | 9045 | 
| shogs | 59045 | 
| shoo | 0045 | 
| shool | 70045 | 
| shools | 570045 | 
| shoos | 50045 | 
| si | 15 | 
| sib | 815 | 
| sibb | 8815 | 
| sibbs | 58815 | 
| sibs | 5815 | 
| siege | 39315 | 
| sieges | 539315 | 
| sigh | 4915 | 
| sighless | 55374915 | 
| sighs | 54915 | 
| sigil | 71915 | 
| sigils | 571915 | 
| sigloi | 107915 | 
| siglos | 507915 | 
| sill | 7715 | 
| sillies | 5317715 | 
| sills | 57715 | 
| silo | 0715 | 
| silos | 50715 | 
| sis | 515 | 
| sises | 53515 | 
| sissies | 5315515 | 
| size | 3215 | 
| sizes | 53215 | 
| sizzle | 372215 | 
| sizzles | 5372215 | 
| sleigh | 491375 | 
| sleighs | 5491375 | 
| slob | 8075 | 
| slobbish | 45188075 | 
| slobs | 58075 | 
| sloe | 3075 | 
| sloes | 53075 | 
| slog | 9075 | 
| slogs | 59075 | 
| slosh | 45075 | 
| sloshes | 5345075 | 
| so | 05 | 
| sob | 805 | 
| sobs | 5805 | 
| soil | 7105 | 
| soilless | 55377105 | 
| soils | 57105 | 
| sol | 705 | 
| sole | 3705 | 
| solei | 13705 | 
| soleless | 55373705 | 
| soles | 53705 | 
| solgel | 739705 | 
| soli | 1705 | 
| solo | 0705 | 
| solos | 50705 | 
| sols | 5705 | 
| sos | 505 | 
| zee | 332 | 
| zees | 5332 | 
| zig | 912 | 
| zigs | 5912 | 
| zill | 7712 | 
| zills | 57712 | 
| zizzle | 372212 | 
| zizzles | 5372212 | 
| zoo | 002 | 
| zoos | 5002 | 
#! /usr/bin/env python
import string
beghilets = ['b', 'e', 'h', 'i', 'l', 'o', 's', 'z', 'g']
calcLets =  ['B', 'E', 'h', 'I', 'L', 'O', 'S', 'Z', 'G']
calcNums   = ['8', '3', '4', '1', '7', '0', '5', '2', '9']
fDict = open('dictionary.txt', 'r')
fWords = open('All_Beghilos.txt', 'w')
count = 0
maxWordLen = 0
line = fDict.readline()
while line != '':
 line = string.strip(line)
 line = string.lower(line)
 if len(line) > maxWordLen:
  maxWordLen = len(line)
 calcWord = ""
 calcNumber = ""
 isBeghilo = True
 for i in range(len(line)):
  isBeghilet = False
  j = 0
  for let in beghilets:
   if line[i] == let:
    calcWord += calcLets[j]
    calcNumber += calcNums[j]
    isBeghilet = True
   j += 1
  if isBeghilet == False:
   isBeghilo = False
 if isBeghilo == True:
  fWords.write(line.ljust(maxWordLen+1)+"  "+calcWord.ljust(maxWordLen+1)+"  "+calcNumber[::-1]+'\n')
  count += 1
 line = fDict.readline()
fWords.write("%d total words" % (count))
fWords.close()
fDict.close()
 
No comments:
Post a Comment