TextUx
More Succinct Trie Data structure (binding for ux-trie)
https://code.google.com/p/ux-trie/wiki/Tutorial_Japanese
Installation
Add this line to your application's Gemfile:
gem 'text_ux'
And then execute:
$ bundle
Or install it yourself as:
$ gem install text_ux
Usage
require "text_ux"
ux = TextUx.new
ux.build(%w( hoge foo bar baz footprint ), true)
ux.save("path/to/index")
ux.prefix_search("hoge---foo")
ux.prefix_search("xxx")
ux.common_prefix_search("footprint")
ux.common_prefix_search("xxx")
ux.predictive_search("fo")
ux.predictive_search("xxx")
ux.decode_key(0)
ux.decode_key(10000)
Contributing
- Fork it ( https://github.com/[my-github-username]/text_ux/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request