Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:

Can anyone explain this output when installing Net::Google?
t/000-key.........ok t/001-search......ok t/002-spelling....NOK 5 # Failed test (t/002-spelling.t at line 42) # got: 'nu york city' # expected: 'new york city' # Looks like you failed 1 tests of 5. t/002-spelling....dubious

is it a joke? If so I guess I don't get it.



($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print

Replies are listed 'Best First'.
Re: Net::Google Fails Spelling Test?
by Fang (Pilgrim) on Feb 08, 2005 at 10:00 UTC

    Google spell checker apparently changed its mind since the release of that module. The author is making a check on nu yirk citee, which obviously was returned as new york city at one point in time. But now, Google doesn't suggest anything better than nu york city. And so the module works as expected:

    % perl -MNet::Google -wle'open(KEY, "<", ".googlekey");chomp($k = <KEY +>);close KEY;$g = Net::Google->new(key=>$k);print $g->spelling(phrase +=>"nu yirk citee")->suggest()' nu york city

    ;-)

      Surely the fact that it returns anything at all from a google spelling suggestion call should be enough? And did my install really fail and have to be forced because of that? Very strange.


      ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
      =~y~b-v~a-z~s; print