- Notifications
You must be signed in to change notification settings - Fork0
Darts-clone.rb provides Ruby bindings for the Darts-clone.
License
NotificationsYou must be signed in to change notification settings
yoshoku/darts-clone.rb
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Darts-clone.rb provides Ruby bindings for theDarts-clone.
Add this line to your application's Gemfile:
gem'dartsclone'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install dartsclone
require'dartsclone'da=DartsClone::DoubleArray.new# Construct a dictionary.keys=['abc','abcd','abcde','bcd','cde']da.build(keys)# Search for keys which match the prefix of given string.pda.common_prefix_search('abcde')# => [["abc", "abcd", "abcde"], [0, 1, 2]]# Search a key which matches a given string.pda.exact_match_search('abcd')# => 1# Dump the dictionary.da.save('foo.dat')# Load the dictionary.da.open('foo.dat')
Bug reports and pull requests are welcome on GitHub athttps://github.com/yoshoku/darts-clone.rb.This project is intended to be a safe, welcoming space for collaboration,and contributors are expected to adhere to theContributor Covenant code of conduct.
The gem is available as open source under the terms of theBSD 2-clause License.Moreover, the gem includes the source code of Darts-clone.The License of Darts-clone can be found inCOPYING.md.
About
Darts-clone.rb provides Ruby bindings for the Darts-clone.
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published