There have been already many solutions w/word list look up posted to this thread. I'll try to give a 'hands on' example (if you work on a windows box).
First, you could download a dictionary from
ftp://ftp.ox.ac.uk/pub/wordlists/american/dic-0294.tar.gzand put it in a directory, eg. "c:\dic-0294" (extract it *there*, winrar or winzip should work)
You'll see ~30 different files, each containing words of a defined length.
Then, create a Perl script like the ones that have been posted in the thread or use one that is tailored for this dictionary, like:
use strict; use warnings; my $word = shift || 'OLHOSC'; my $fname = sprintf 'length%02d.txt', length $word; # eg. length06.tx +t my $word_key = join '', sort split //, lc $word; # sort lowercase +letters open my $fh, '<', $fname or die "sorry, no such word list available, +Bye!"; while( my $line = <$fh> ) { chomp $line; my $dict_key = join '', sort split //, lc $line; print "$word => $line\n" if $dict_key eq $word_key # bail out here - if only one match is needed } close $fh;
From the *length* of the looked-up word, the name of the dictionary file is built. If you extracted the above archive, then the files with word lengths between 2 and 32 should reside in the current directory.
Regards
mwa
In reply to Re: Found a word from a set of letters
by mwah
in thread Found a word from a set of letters
by vnpenguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |