Wednesday, June 13, 2012

Autograms

The following is a list of words that can be anagrammed into other words.  It is ordered by the number of possible words that can be made from a single word (e.g. dog and god have the same letters, trap, part and prat have the same letters).  It shows all the words that have 6 or more possible anagrams.

I particularly like that canter can turn into trance, recant, nectar, cretan, tanrec, and creant.

10 angor argon goran grano groan nagor orang organ rogan ronga
10 elaps lapse lepas pales salep saple sepal slape spale speal
9 ester estre reest reset steer stere stree terse tsere
9 caret carte cater crate creat creta react recta trace
8 asteer easter eastre reseat saeter seater staree teaser
8 laster lastre rastle relast resalt salter slater stelar
8 armet mater metra ramet tamer terma trame trema
8 leapt palet patel pelta petal plate pleat tepal
8 arist astir sitar stair stria tarsi tisar trias
7 canter creant cretan nectar recant tanrec trance
7 alem alme lame leam male meal mela
7 acinar arnica canari carian carina crania narica
7 argel ergal garle glare lager large regal
7 ante aten etna neat taen tane tean
7 least setal slate stale steal stela tales
7 aril lair lari liar lira rail rial
7 alert alter artel later ratel taler telar
7 abel able albe bale beal bela blae
7 dater derat detar drate rated trade tread
7 easting gainset genista ingesta seating signate teasing
7 arpent enrapt entrap panter parent pretan trepan
7 entrail latiner latrine ratline reliant retinal trenail
7 darter dartre redart retard retrad tarred trader
7 albeit albite baltei belait betail bletia libate
7 alien aline anile elain elian laine linea
7 atle laet late leat tael tale teal
7 aldern darnel enlard lander lenard randle reland
7 lepra paler parel parle pearl perla relap
7 emir imer mire reim remi riem rime
6 aitch chait chati chita taich tchai
6 acher arche chare chera rache reach
6 reins resin rinse risen serin siren
6 cerotin cointer cotrine cretion noticer rection
6 gater grate great greta retag targe
6 degrain deraign deringa gradine grained reading
6 angler arleng garnel largen rangle regnal
6 alban balan banal laban nabal nabla
6 caliver caviler claiver clavier valeric velaric
6 aster serta stare strae tarse teras
6 alerse leaser reales resale reseal sealer
6 agnel angel angle genal glean lagen
6 amen enam mane mean name nema
6 apert pater peart prate taper terap
6 petrous posture proetus proteus septuor spouter
6 angrite granite ingrate tangier tearing tigrean
6 pearlet pleater prelate ptereal replate repleat
6 amil amli lima mail mali mila
6 alevin alvine valine veinal venial vineal
6 altair atrail atrial lariat latria talari
6 sawt staw swat taws twas wast
6 balder bardel bedlar bedral belard blader
6 halse leash selah shale sheal shela
6 danuri diurna dunair durain durani durian
6 asper parse prase spaer spare spear
6 grein inger nigre regin reign ringe
6 corset cortes coster escort scoter sector
6 ates east eats sate seat seta
6 beround bounder rebound unbored unorbed unrobed
6 actor corta croat rocta taroc troca
6 derange enraged gardeen gerenda grandee grenade
6 asterin eranist restain stainer starnie stearin
6 clethra latcher ratchel relatch talcher trachle
6 esker keres reesk seker skeer skere
6 acrolein arecolin colinear cornelia creolian lonicera
6 agroan angora anogra arango argoan onagra
6 inset neist snite stein stine tsine
6 evil levi live veil vile vlei
6 anis nais nasi nias sain sina
6 palster persalt plaster psalter spartle stapler
6 abord bardo board broad dobra dorab
6 aspen panse snape sneap spane spean
6 mate meat meta tame team tema
6 roset rotse soter stero store torse
6 poter prote repot tepor toper trope
6 resaw sawer seraw sware swear warse
6 earthen enheart hearten naether teheran traheen
6 owser resow serow sower swore worse

Here's the code that I used to generate the list
use strict;
use warnings;

my %proper;

open W, "</usr/share/dict/propernames";
while (<W>) {
    chomp;
    $proper{lc($_)} = 1;
}
close W;

my %words;

open W, "</usr/share/dict/words";
while (<W>) {
    chomp;
    my $w = lc($_);
    if ( !defined( $proper{$w} ) ) {
        my $l = join('', sort split('', $w));
        if ( !defined( $words{$l}{words}{$w} ) ) {
            $words{$l}{count} += 1;
            $words{$l}{words}{$w} = 1;
        }
    }
}
close W;

foreach my $w (sort { $words{$b}{count} <=> $words{$a}{count} } keys %words) {
    print "$words{$w}{count} " . join(' ', sort keys %{$words{$w}{words}}), "\n";
}

No comments: