高速文字列検索をするTRIEをRubyで使ってみた | Simple is Beautiful.

トライ木を使用した高速な文字列検索をRubyで試してみました。 tyler/trieのサンプルコードを使用しています。 fast_trieをインストール gem install fast_trie コード require 'trie' trie = Trie.new words = ['forestry', 'king', 'exculde', 'end', 'Meros'] words.each do |word| trie.add word end word = 'Meros r…