using Google API Spellchecker

B

babydoe

I am trying to crack a puzzle by brute force. The
puzzle involves finding a hidden word. The hidden
word is made up of a combination of letters, each
letter chosen from a given list of letters. I have
an example below (written in Perl) that will
produce my exhaustive list of possible words.
The hidden word is 'cat.'

#--------------------------------------------------
my @jumble = (
[ 'c' ],
[ 'q', 'a' ],
[ 'l', 't', 'q' ],
);
my @numbers = (
$jumble[0],
$jumble[1],
$jumble[2],
);
print @$_, "\n" for combine ( @numbers );
sub combine {
my ( $first, @rest) = @_;
return map [ $_], @$first unless @rest;
my @res;
for my $part ( combine( @rest) ) {
push @res, map [ $_, @$part], @$first;
}
return @res;
}
#--------------------------------------------------

What I would like to do is take my candidates for
words and pass all the words to Google API
spellchecker; tossing aside mispelled words, so
that I am left with the solution to my puzzle. I
have looked at Net::Google::Spelling, but this is
not what I want. What I want is to filter an
exhaustive list of generated words through Google,
to find the correctly spelled word.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top