Subject: | Bug report for Lingua::Identify |
Date: | Fri, 13 Jan 2012 16:21:07 +0800 |
To: | <bug-lingua-identify [...] rt.cpan.org> |
From: | CHAO WEI <wei_chao_2007 [...] hotmail.com> |
Hi experts,
I am encountering a issue with Lingua::Identify, please find more information below:
[Environment]
-------------------------
Lingua::Identify is up to date (0.50).
This is perl, v5.10.1 (*) built for MSWin32-x86-multi-thread
OS Name: Microsoft Windows 7 Professional
OS Version: 6.1.7601 Service Pack 1 Build 7601
[Description]
-------------------------
Try to detect the language type for "Vulnerabilidade Windows Client/Server Runtime Subsystem pode permitir elevação de privilégio", code snippet below:
===========
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long qw(:config no_ignore_case);
use Lingua::Identify qw/:language_manipulation langof/;
my $text = "Vulnerabilidade Windows Client/Server Runtime Subsystem pode permitir elevação de privilégio";
set_active_languages('en', 'pt', 'de', 'es', 'fr', 'it' );
my %languages = langof($text);
print "\$test lang is:\n";
foreach my $lang (keys %languages) {
print "$lang : ${languages{$lang}}\n"
}
my $language = langof($text);
print "\n\$test is: $language\n";# if $language eq 'fr';
===========
The expected result should be 'pt', however, I got the print out result 'fr'.
If you need more information, please feel free to let me know.
Thanks for your time!
-Terry