Sha256: 21ed4825f25382713c215e35250183a90abd7f9c33d6ec632377a26314c71376
Contents?: true
Size: 651 Bytes
Versions: 2
Compression:
Stored size: 651 Bytes
Contents
# -*- coding: utf-8 -*- require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Morphem" do before(:all) do YaCan.appid = ENV['YAHOO_API_APPID'] @phrase = '庭には二羽鶏がいる。' end it 'should analyze sentence' do res = YaCan::Morphem.analyze(@phrase) end it 'should take params' do res = YaCan::Morphem.analyze(@phrase, {'results' => 'ma', 'filter' => '9'}) res.ma_result.total_count.should == 9 res.ma_result.filtered_count.should == 3 res.uniq_result.total_count.should == nil end it 'should have module name shortened' do YaCan::MA.should == YaCan::Morphem end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yacan-0.1.1 | spec/morphem_spec.rb |
yacan-0.1.0 | spec/morphem_spec.rb |