Lingua::JA::TFWebIDF

TF*WebIDF calculator
Download

Lingua::JA::TFWebIDF Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kouhei Yoshioka
  • Publisher web site:
  • http://search.cpan.org/~pawapawa/

Lingua::JA::TFWebIDF Tags


Lingua::JA::TFWebIDF Description

Lingua::JA::TFWebIDF is a Perl module that calculates TF*WebIDF scores.Compared with Lingua::JA::TFIDF, this module has the following advantages.- supports Tokyo Cabinet, Bing API, idf_type option, expires_in option and so on.- tfidf function accepts \%tf. (This eases the use of other morphological analyzers.)SYNOPSIS use Lingua::JA::TFWebIDF; use feature qw/say/; use Data::Dumper; my $tfidf = Lingua::JA::TFWebIDF->new( appid => $appid, fetch_df => 1, Furl_HTTP => { timeout => 3 }, ); say $tfidf->idf($word); say $tfidf->df($word); my %tf = ( '自然言語処理' => 9, '自然言語' => 6, '自然言語理解' => 4, '処理' => 5, '解析' => 4, ); $tfidf->ng_word(\@ng_words); say Dumper $tfidf->tfidf($text)->dump; say Dumper $tfidf->tfidf(\%tf)->dump; say Dumper $tfidf->tf($text)->dump; for my $result (@{ $tfidf->tfidf(\%tf)->list(5) }) { my ($word, $score) = each %{$result}; say "$word: $score"; } for my $result (@{ $tfidf->tf($text)->list(5) }) { my ($word, $frequency) = each %{$result}; say "$word: $frequency"; }Product's homepage


Lingua::JA::TFWebIDF Related Software