yma4r
Description
Yahoo Morphological Analyzer wrapper For Ruby
Installation
Archive Installation
rake install
Gem Installation
gem install niku-yma4r
Features/Problems
Synopsis
require 'pp'
require 'yma4r'
ma = Yma4r.new(:appid => 'Your Yahoo Japan Application ID',
:sentence => 'すもももももももものうち')
result = ma.analyse
pp result.word_list
#[{:pos=>"名詞", :surface=>"すもも", :reading=>"すもも"},
# {:pos=>"助詞", :surface=>"も", :reading=>"も"},
# {:pos=>"名詞", :surface=>"もも", :reading=>"もも"},
# {:pos=>"助詞", :surface=>"も", :reading=>"も"},
# {:pos=>"名詞", :surface=>"もも", :reading=>"もも"},
# {:pos=>"助詞", :surface=>"の", :reading=>"の"},
# {:pos=>"名詞", :surface=>"うち", :reading=>"うち"}]
#=> nil
SEE ALSO
日本語形態素解析Webサービス: http://developer.yahoo.co.jp/jlp/MAService/V1/parse.html
Copyright
- Author
-
niku <niku at niku.name>
- Copyright
-
Copyright © 2008 niku
- License
-
you can redistribute it and/or modify it under the same terms as Ruby itself.