Sha256: 8ee240899d059456abe8b33e8310d17ecf671337dc5f3955ce809e6e3cb19252

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

# Tataki

Tataki is pure ruby kana converter.

## Installation

Add this line to your application's Gemfile:

    gem 'tataki'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install tataki

## Usage

### Basic usage
```ruby
require "tataki"

"漢字をひらがなに変換".to_kana # => "かんじをひらがなにへんかん"
"X線研究者".to_kana # => "えっくすせんけんきゅうしゃ"
"肉を食べるだけの簡単なお仕事".to_kana # => "にくをたべるだけのかんたんなおしごと"
```

At first time, `require "tataki"` is slow (creating dictionary cache).

### Configure converter
```ruby
require "tataki/base"

alphabet_converter = Tataki::Converter::Alphabet.new
alphabet_converter.to_kana("abcde") # => "えーびーしーでぃーいー"

roman_alphabet_converter = Tataki::Converter::Combine.new(Tataki::Converter::Roman.new, Tataki::Converter::Alphabet.new)
roman_alphabet_converter.to_kana("robottotaisennf") # => "ろぼっとたいせんえふ"

skk_converter = Tataki::Converter::SkkJisyo.new
skk_converter.to_kana("研究者") # => "けんきゅうしゃ"
```

## TODO
- Support more configurable

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tataki-0.0.3 README.md
tataki-0.0.2 README.md