Subject: | typo in _get_lang (Lingua::Stem::Snowball 0.7) |
here is the strange piece of code from Lingua/Stem/Snowball.pm
soubroutine _get_lang
$lang_id compared to -1 and -2 just after setting it to 0
so it always return 'Unknown error' if
Lingua::Stem::Snowball::get_stemmer_id returns negative value.
my $lang_id = Lingua::Stem::Snowball::get_stemmer_id($lang);
if ($lang_id < 0) {
$lang = '';
$lang_id = 0;
if ($lang_id == -1) {
$@ = "There is no lang '$lang'";
} elsif ($lang_id == -2) {
$@ = "Can't call init for lang '$lang'";
}
$@ = "Unknown error";
}