Japanese romanization library for Ruby.
http://qiita.com/emsk/items/3e24628c220c825da709 (Japanese)
You have to install Ruby 2.0.0 or higher.
Add this line to your application's Gemfile:
gem 'romajify'
And then execute:
$ bundle
Or install it yourself as:
$ gem install romajify
$ romajify hepburn すし
require 'romajify/converter'
puts Romajify::Converter.hepburn('すし')
Modified Hepburn:
$ romajify hepburn しんばし
shinbashi
Traditional Hepburn:
$ romajify hepburn --traditional しんばし
shimbashi
$ romajify nihon まちづくり
matidukuri
$ romajify kunrei まちづくり
matizukuri
Option | Description | Default |
---|---|---|
-u/--upcase |
Whether to return upper case. | false - Lower case |
-t/--traditional |
Whether to convert to traditional hepburn. This is the option only for hepburn command. |
false - Modified hepburn |
http://www.rubydoc.info/gems/romajify
Ruby 2.0.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)