Created
May 19, 2009 15:16
-
-
Save kyanny/114167 to your computer and use it in GitHub Desktop.
summarize_extract.pl Example of Lingua::JA::Summarize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Lingua::JA::Summarize::Extract; | |
use Perl6::Say; | |
use Getopt::Long; | |
use Pod::Usage; | |
my $help; | |
GetOptions( | |
'help' => ¥$help, | |
) or pod2usage(2); | |
$help and pod2usage(2); | |
my $text = do { local $/; <> }; | |
my $summary = Lingua::JA::Summarize::Extract->extract($text); | |
say 'original'; | |
say $text; | |
say 'summary'; | |
say $summary; | |
__END__ | |
=head1 NAME | |
summarize_extract.pl - | |
=head1 SYNOPSIS | |
$ curl http://blog.livedoor.jp/tabbata/archives/50684381.html | ./content_extract.pl | ./summarize_extract.pl | |
=head1 DESCRIPTION | |
=cut | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment