This is a gem using 189works's Chinese segment API service to provide a remote segment way. And it's super easy to use it.
Add this line to your application's Gemfile:
gem '189seg'
And then execute:
$ bundle
Or install it yourself as:
$ gem install 189seg
phrase = params[:phrase]
client = CnTelecomeSeg::Base.new(YOUR_AP_ID, YOUR_KEY, YOUR_PRODUCT_ID)
segments = client.segment(phrase)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request