Created
October 1, 2009 10:52
-
-
Save kyanny/198889 to your computer and use it in GitHub Desktop.
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/env perl | |
BEGIN { | |
require Lingua::JA::Summarize::Extract::ResultSet; | |
*Lingua::JA::Summarize::Extract::ResultSet::as_string = sub { | |
my $self = shift; | |
my $text; | |
my @result; | |
for my $line (@{ $self->sentences }) { | |
push @result, $line; | |
$text .= "$line->{text}\n"; | |
last if length $text > $self->length; | |
} | |
if ($self->{sort} ne 'score') { | |
$text = ''; | |
for my $line (sort { $a->{line} <=> $b->{line} } @result) { | |
$text .= "$line->{text}\n"; | |
} | |
} | |
my $len = $self->length; | |
$text =~ s/^(.{$len}.*?\x{3002}).*$/$1\n/s; # $self->length に直近の「。」まで残して余分を削除 | |
$text; | |
}; | |
} | |
use strict; | |
use utf8; | |
use Encode; | |
use Lingua::JA::Summarize::Extract; | |
my $text = do { local $/; <DATA> }; | |
my $summary = Lingua::JA::Summarize::Extract->extract($text); | |
print encode('utf-8', $summary->as_string); | |
__END__ | |
結婚が決まり、スタッフから祝福の花束を受け取ってほほえむお天気キャスターの根本美緒さん=1日、TBS(佐久間修志撮影) | |
TBSの情報番組「みのもんたの朝ズバッ!」(月〜金午前5・30)でお天気キャスターを務める気象予報士、根本美緒さん(30)の結婚が決まり、同局で記者会見を開いた。相手は都内の大学病院に勤める医師の男性(37)。根本さんは現在の心境を「快晴です!」ときっぱり。挙式は12月に行われ、同じ日に入籍するという。 | |
会見で根本さんは「何事にもひたむきで、一生懸命取り組む姿や、人柄にひかれました」とノロケ気味。最近は医師不足で「寝る間を惜しんで頑張っているので、支えになれれば」と相手を思いやった。 | |
男性とは友人の紹介で知り合い、約1年の交際を経てゴールイン。今年の初めくらいに、相手から「結婚しよう」とプロポーズされた。子供については「大家族が夢なので、いっぱいつくりたい。少なくとも3人は」と声を弾ませた。 | |
番組のコーナーで絵を描いている根本さんは、相手男性の似顔絵も披露。「これ結構、いい出来です。笑顔がカワイイ人です」と“自画自賛”していた。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment