Permutations Problem



I am trying to filter every combination of ten letters through a spell
checker, and so find valid english words. I have a problem in that ten
factorial, is over three point-six million words to filter, and
results in the computer crashing. (The computer is an old 2.66GHz P4
and just not up to the task).

Any suggestions how I can save computer resources?

#--------%<--------%<-----------------------------------------------------------------------------
use Algorithm::Combinatorics qw(permutations);
use Text::Aspell;

my $speller = Text::Aspell->new; die unless $speller;
# Set some options
$speller->set_option('lang','en_US');
$speller->set_option('sug-mode','fast'); # check a word

my @data = qw(s f e e r t v c o h);

my @words = grep $speller->check ( join '', @$_ ),
permutations(\@data);

print "\nSolution\n";
print map "@$_\n", @words;

.



Relevant Pages

  • Re: Permutations Problem
    ... Honest John schrieb: ... checker, and so find valid english words. ... factorial, is over three point-six million words to filter, and ...
    (comp.lang.perl.misc)
  • Re: Permutations Problem
    ... I am trying to filter every combination of ten letters through a spell ... checker, and so find valid english words. ... rule-based but consult actual dictionaries for instance), ...
    (comp.lang.perl.misc)
  • Re: Permutations Problem
    ... Honest John wrote: ... checker, and so find valid english words. ... factorial, is over three point-six million words to filter, and ...
    (comp.lang.perl.misc)
  • Re: Application for 2D filters with filter length >40 in image processing
    ... It has a marvelous tool in it called a "spell ... filters but it onli works for filter with larger filter lengthso i was wondring wat are the applications in such scenarios. ...
    (sci.image.processing)
  • Re: Application for 2D filters with filter length >40 in image processing
    ... It has a marvelous tool in it called a "spell ... filters but it onli works for filter with larger filter lengthso i was wondring wat are the applications in such scenarios. ...
    (sci.image.processing)