Automatic romaji spelling checker for programmer.
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 'romajic'
And then execute:
$ bundle
Or install it yourself as:
$ gem install romajic
Search by hiragana text:
$ romajic search すし
SUSI -> sushi @ /usr/local/src/Example.java:5
sushiya -> sushi @ /usr/local/src/example.txt:2
Search by romaji text:
$ romajic search sushi
SUSI -> sushi @ /usr/local/src/Example.java:5
sushiya -> sushi @ /usr/local/src/example.txt:2
Generate a configuration file:
$ romajic --init
Option | Description | Default |
---|---|---|
-e/--exclude-word |
Word to exclude. | |
-c/--config |
Path of configuration file. | .romajic.yml in the working directory |
-d/--dir |
Path of target directory. | The working directory |
-E/--extensions |
Comma-separated target extensions. | All extensions |
-D/--distance |
Levenshtein distance. | 3 |
-C/--converter |
Romaji converter, such as hepburn , modified_hepburn , traditional_hepburn , nihon , or kunrei . |
hepburn |
The keys below are available in the configuration file.
Key | Description | Type |
---|---|---|
target_words |
Target romaji. | Array |
exclude_words |
Words to exclude. | Array |
dir |
Path of target directory. | String |
extensions |
Target extensions. | Array |
distance |
Levenshtein distance. | Integer |
converter |
Romaji converter. | String |
http://www.rubydoc.info/gems/romajic
Ruby 2.0.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0
- Fork it ( https://github.com/emsk/romajic/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- romajify - Japanese romanization library for Ruby