WebService::YahooJapan::WebMA - Easy-to-use Interface for Yahoo! Japan Web MA Web Service
use WebService::YahooJapan::WebMA; my $api = WebService::YahooJapan::WebMA->new( appid => 'your_appid', ); my $result = $api->parse(sentence => 'sentence here') or die $api->error; my $ma_result = $result->{ma_result}; print $ma_result->{total_count}; print $ma_result->{filtered_count}; for my $word (@{$ma_result->{word_list}}) { $word->{surface}; $word->{reading}; $word->{pos}; $word->{baseform}; }
This module priovides you an Object Oriented interface for Yahoo! Japan Web MA Web Service.
You can do Japanese language morphological analysis with this module.
Returns an instance of this module. The following option can be set:
appid # required ua # optional. LWP::UserAgent instance
Requests API with options and returns results. The following option can be set:
sentence # required results response filter ma_response ma_filter uniq_response uniq_by_baseform
See the official API documents about detail of options and return values.
Returns error message.
Jiro Nishiguchi <jiro@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://developer.yahoo.co.jp/jlp/MAService/V1/parse.html
To install WebService::YahooJapan::WebMA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::YahooJapan::WebMA
CPAN shell
perl -MCPAN -e shell install WebService::YahooJapan::WebMA
For more information on module installation, please visit the detailed CPAN module installation guide.