Variant character selector conversion library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
README.md
Rakefile
variant.gemspec

README.md

Variant

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/variant. To experiment with that code, run bin/console for an interactive prompt.

Compatible kanji changes its glyph shape by Unicode normalization.Therefore, by using compatibility_to_unified method, convert it into integrated Chinese character with variant character selector so that character shape does not change.

Also, IVS has duplicate characters of the same form registered in Adobe-Japan 1 and Hanyo-Denshi.Conversion can be done mutually by using adobe_to_hanyo method and hanyo_to_adobe method.

Installation

Add this line to your application's Gemfile:

gem 'variant'

And then execute:

$ bundle

Or install it yourself as:

$ gem install variant

Usage

compatibility_to_unified: Conversion into integrated kanji including variant character selector can be performed by executing on sentences including compatible kanji

adobe_to_hanyo: Convert from Adobe-Japan 1 registered in IVS to Hanyo-Denshi of the same character shape

hanyo_to_adobe: Can be converted from Hanyo-Denshi registered in IVS to Adobe-Japan1 of the same character shape

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/variant.