diff --git a/Changes b/Changes index 00a7827..ff32783 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,13 @@ Revision history for Perl extension Lingua::JA::WebIDF +0.40 Wed, 03 Oct 2012 12:57:56 +0900 + - improved tests + - changed default options + - added verbose option + - removed Lingua::JA::WebIDF::API::Bing + - removed dependency on File::Sharedir + - removed dependency on JSON + 0.32 Sat, 28 Jul 2012 17:50:26 +0900 - removed _plugin_list function diff --git a/README b/README index cc679eb..66a8bd7 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME SYNOPSIS use Lingua::JA::WebIDF; - my $webidf = Lingua::JA::WebIDF->new; + my $webidf = Lingua::JA::WebIDF->new(%config); print $webidf->idf("東京"); # low print $webidf->idf("スリジャヤワルダナプラコッテ"); # high @@ -12,9 +12,9 @@ SYNOPSIS DESCRIPTION Lingua::JA::WebIDF calculates WebIDF weight. - WebIDF(Inverse Document Frequency) weight represents the rarity of words - on the Web. The WebIDF weight of rare words is high. Conversely, the - WebIDF weight of common words is low. + WebIDF(Inverse Document Frequency) weight represents the rarity of a + word on the Web. The WebIDF weight of a rare word is high. Conversely, + the WebIDF weight of a common word is low. IDF is based on the intuition that a query term which occurs in many documents is not a good discriminator and should be given less weight @@ -80,8 +80,8 @@ METHODS fech_df => 0 Never fetches WebDF from the Web if 0 is specified. - If the WebDF you want to know is already saved, it is used. If not - so, returns undef. + If the WebDF you want to know has already saved, it is used. If it + is not so, returns undef. expires_in => $days If 365 is specified, WebDF expires in 365 days after fetches it. @@ -103,8 +103,8 @@ METHODS If the WebDF of $word has not been saved yet or has expired, fetches it by using the Web API you specified and saves it. - If the WebDF of $word expires and fetch_df is 0, the expiring WebDF of - $word is used. + If the WebDF of $word has expired and fetch_df is 0, the expired WebDF + is used. db_open($mode) Opens the database file which is located in $path. diff --git a/lib/Lingua/JA/WebIDF.pm b/lib/Lingua/JA/WebIDF.pm index 6d5abb9..632a9e8 100644 --- a/lib/Lingua/JA/WebIDF.pm +++ b/lib/Lingua/JA/WebIDF.pm @@ -8,7 +8,7 @@ use Carp (); use Module::Load (); use Furl::HTTP; -our $VERSION = '0.32'; +our $VERSION = '0.40'; sub _options @@ -218,13 +218,13 @@ __END__ Lingua::JA::WebIDF - WebIDF calculator =for test_synopsis -my ($appid); +my (%config); =head1 SYNOPSIS use Lingua::JA::WebIDF; - my $webidf = Lingua::JA::WebIDF->new; + my $webidf = Lingua::JA::WebIDF->new(%config); print $webidf->idf("東京"); # low print $webidf->idf("スリジャヤワルダナプラコッテ"); # high @@ -233,9 +233,9 @@ my ($appid); Lingua::JA::WebIDF calculates WebIDF weight. -WebIDF(Inverse Document Frequency) weight represents the rarity of words on the Web. -The WebIDF weight of rare words is high. -Conversely, the WebIDF weight of common words is low. +WebIDF(Inverse Document Frequency) weight represents the rarity of a word on the Web. +The WebIDF weight of a rare word is high. +Conversely, the WebIDF weight of a common word is low. IDF is based on the intuition that a query term which occurs in many documents is not a good discriminator and should be given less weight @@ -312,8 +312,8 @@ you specifies because WebDF may be different depending on it. Never fetches WebDF from the Web if 0 is specified. -If the WebDF you want to know is already saved, it is used. -If not so, returns undef. +If the WebDF you want to know has already saved, it is used. +If it is not so, returns undef. =item expires_in => $days @@ -342,8 +342,8 @@ Fetches the WebDF of $word. If the WebDF of $word has not been saved yet or has expired, fetches it by using the Web API you specified and saves it. -If the WebDF of $word expires and fetch_df is 0, -the expiring WebDF of $word is used. +If the WebDF of $word has expired and fetch_df is 0, +the expired WebDF is used. =head2 db_open($mode)