Gem AnsjSeg (中文分词) for jRuby

mimosa · September 17, 2013 · Last by jimmyc replied at February 27, 2014 · 3862 hits

https://github.com/mimosa/ansj_seg-jruby

Usage

require 'ansj_seg'

"Ruby China,对!没错!这里就是 Ruby 社区,目前这里已经是国内最权威的 Ruby 社区,拥有国内所有资深的 Ruby 工程师。".to_tags # or (String).to_seg
=> ["ruby", "china", "没错", "这里", "社区", "目前", "已经", "国内", "权威", "拥有", "所有", "资深", "工程师"]

还没有推送到 rubygems?

LiuMacBook-Pro:jubilee liujiang$ gem install ansj_seg-jruby
ERROR:  Could not find a valid gem 'ansj_seg-jruby' (>= 0) in any repository
ERROR:  Possible alternatives: hbase-jruby, json-jruby, ncurses-ruby
LiuMacBook-Pro:jubilee liujiang$

require 'ansj_seg' LoadError: cannot load such file -- tree_split-1.0.1

tree_split 这个 jar 包加载不了,怎么破`

You need to Sign in before reply, if you don't have an account, please Sign up first.