def search(text, start, wdic, result)
      if RUBY_VERSION >= '1.9.0'
        txt = text.bytes.to_a
      else
        txt = text.unpack('C*')
      end
      txtu = text.unpack("U*")
      length = txtu.size
      ch = txtu[start]
      ct = @category.category(ch)
    
      if !result.empty? and !ct.invoke
        return
      end
    
      is_space = (ct.id == @space_id)
      limit = [length, ct.length + start].min
    
      for i in start..(limit - 1)
        wdic.search_from_trie_id(ct.id, start, (i - start) + 1, is_space, result)
        
        if((i + 1) != limit and !(@category.compatible?(ch, txt[i + 1])))
          return
        end
      end
    
      if ct.group and limit < length
        for i in limit..(length - 1)
          if not @category.compatible?(ch, txtu[i])
            wdic.search_from_trie_id(ct.id, start, i - start, is_space, result)
            return
          end
        end
        wdic.search_from_trie_id(ct.id, start, length - start, is_space, result)
      end
    end
def search(text, start, wdic, result)
      if RUBY_VERSION >= '1.9.0'
        txt = text.bytes.to_a
      else
        txt = text.unpack('C*')
      end
      txtu = text.unpack("U*")
      length = txtu.size
      ch = txtu[start]
      ct = @category.category(ch)
    
      if !result.empty? and !ct.invoke
        return
      end
    
      is_space = (ct.id == @space_id)
      limit = [length, ct.length + start].min
    
      for i in start..(limit - 1)
        wdic.search_from_trie_id(ct.id, start, (i - start) + 1, is_space, result)
        
        if((i + 1) != limit and !(@category.compatible?(ch, txt[i + 1])))
          return
        end
      end
    
      if ct.group and limit < length
        for i in limit..(length - 1)
          if not @category.compatible?(ch, txtu[i])
            wdic.search_from_trie_id(ct.id, start, i - start, is_space, result)
            return
          end
        end
        wdic.search_from_trie_id(ct.id, start, length - start, is_space, result)
      end
    end
コンストラクタ
data_dir:: 辞書ファイルのディレクトリパス
 検索
text::
start::
wdic::
result::