appid は自分で取得したものをご利用ください。# INPUT: my $sentence = "東北新幹線で七夕祭りに!"; # OUTPUT: 東北新幹線 (100), 七夕祭り (97) my $r_ref = yapikp({sentence => $sentence}); foreach my $ri (@$r_ref) { my $k = $ri->{Keyphrase}; my $s = $ri->{Score}; print "$k ($s)\n"; } ... sub yapikp { my ($args_ref) = @_; my $s = URI::Escape::uri_escape($args_ref->{sentence}) || ""; return [] unless $s; my $url = "http://jlp.yahooapis.jp/KeyphraseService/V1/extract?" ."appid=YahooDemo&sentence=$s"; my $response = get($url); return [] unless $response; my $xmlsimple = XML::Simple->new(ForceArray => [ 'Result' ]); my $xml = $xmlsimple->XMLin($response); return [] unless $xml->{Result}; return $xml->{Result}; }