Project

mojix

0.0
No commit activity in last 3 years
No release in over 3 years
Mojix gRPC client for Ruby. Mojix is micro-service oriented kuromoji gRPC server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 1.4.5
~> 5.0
~> 10.0

Runtime

~> 1.4.5
 Project Readme

Mojix

Mojix client for Ruby.

Installation

Install yourself.

gem install mojix

Or write your gemfile.

gem 'mojix'

And then execute.

bundle install

Usage

Premise

Mojix-server is running. See mojix-server repo.

docker run -it --rm -p 9661:9661 xmisao/mojix

Tokenize by mojix-server example

require 'mojix'

mojix = Mojix::Client.new(host: 'localhost', port: 9661, mode: :normal)

mojix.tokenize_simply('もう何も恐くない') #=> ["もう", "何", "も", "恐く", "ない"]

Mojix::Client.new arguments are optional. You can omit host, mode, mode arguments.

require 'mojix'

# Client initialize by default settings.
#   host: 'localhost'
#   port: 9661
#   mode: :normal
mojix = Mojix::Client.new 

mojix.tokenize_simply('もう何も恐くない') #=> ["もう", "何", "も", "恐く", "ない"]

Valid mode arugments.

  • :normal
  • :search
  • :extended

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The gem is available as open source under the terms of the MIT License.