Skip to content

Commit

Permalink
updated to Ver.0.40
Browse files Browse the repository at this point in the history
  • Loading branch information
pawa- committed Oct 5, 2012
1 parent 142e956 commit d8504b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
8 changes: 8 additions & 0 deletions 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

Expand Down
16 changes: 8 additions & 8 deletions README
Expand Up @@ -4,17 +4,17 @@ 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

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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
20 changes: 10 additions & 10 deletions lib/Lingua/JA/WebIDF.pm
Expand Up @@ -8,7 +8,7 @@ use Carp ();
use Module::Load ();
use Furl::HTTP;

our $VERSION = '0.32';
our $VERSION = '0.40';


sub _options
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d8504b7

Please sign in to comment.