<commit_before># coding: utf-8

require 'rspec'
require 'juman'

describe Juman::Morpheme do
  context 'when initialized with a line of the result of "見る"' do
    subject { Juman::Morpheme.new(
        '見る みる 見る 動詞 2 * 0 母音動詞 1 基本形 2 "情 報"') }
    its(:surface){ should eq '見る' }
    its(:pronunciation){ should eq 'みる' }
    its(:base){ should eq '見る' }
    its(:pos){ should eq '動詞' }
    its(:pos_id){ should be 2 }
    its(:pos_spec){ should be_nil }
    its(:pos_spec_id){ should be 0 }
    its(:type){ should eq '母音動詞' }
    its(:type_id){ should be 1 }
    its(:form){ should eq '基本形' }
    its(:form_id){ should be 2 }
    its(:info){ should eq '情 報' }
  end
end
describe Juman::Result do
  context 'when initialized with an Array of the result of "見る"' do
    before { @result = Juman::Result.new(
      ['見る みる 見る 動詞 2 * 0 母音動詞 1 基本形 2 "情 報"']) }
    subject { @result }
    it { should be_an Enumerable }
    it { should respond_to :each }
    it { should respond_to :[] }
    it { should respond_to :at }
    describe '#[]' do
      context 'when argument 0' do
        subject { @result[0] }
        it 'should return Juman::Morpheme' do
          should be_an_instance_of Juman::Morpheme
        end
      end
    end
    describe '#each' do
      context 'without block' do
        subject { @result.each }
        it 'should return Enumerator' do
          should be_an_instance_of Enumerator
        end
      end
      context 'with block' do
        subject { @result.each{} }
        it 'should return Array' do
          should be_an_instance_of Array<commit_msg>spec: each with block should return self<commit_after># coding: utf-8

require 'rspec'
require 'juman'

describe Juman::Morpheme do
  context 'when initialized with a line of the result of "見る"' do
    subject { Juman::Morpheme.new(
        '見る みる 見る 動詞 2 * 0 母音動詞 1 基本形 2 "情 報"') }
    its(:surface){ should eq '見る' }
    its(:pronunciation){ should eq 'みる' }
    its(:base){ should eq '見る' }
    its(:pos){ should eq '動詞' }
    its(:pos_id){ should be 2 }
    its(:pos_spec){ should be_nil }
    its(:pos_spec_id){ should be 0 }
    its(:type){ should eq '母音動詞' }
    its(:type_id){ should be 1 }
    its(:form){ should eq '基本形' }
    its(:form_id){ should be 2 }
    its(:info){ should eq '情 報' }
  end
end
describe Juman::Result do
  context 'when initialized with an Array of the result of "見る"' do
    before { @result = Juman::Result.new(
      ['見る みる 見る 動詞 2 * 0 母音動詞 1 基本形 2 "情 報"']) }
    subject { @result }
    it { should be_an Enumerable }
    it { should respond_to :each }
    it { should respond_to :[] }
    it { should respond_to :at }
    describe '#[]' do
      context 'when argument 0' do
        subject { @result[0] }
        it 'should return Juman::Morpheme' do
          should be_an_instance_of Juman::Morpheme
        end
      end
    end
    describe '#each' do
      context 'without block' do
        subject { @result.each }
        it 'should return Enumerator' do
          should be_an_instance_of Enumerator
        end
      end
      context 'with block' do
        subject { @result.each{} }
        it 'should return self' do
          should be @result
{'fraction_non_alphanumeric': 0.11317195850361522, 'fraction_numerical': 0.009430996541967935, 'mean_word_length': 2.42518837459634, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4182473', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1132, 'n_words': 377}