ctc 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/config/ctc_2_kanji.yml +7085 -0
- data/config/kanji_2_ctc.yml +7085 -0
- data/ctc.gemspec +24 -0
- data/lib/ctc/ctc_2_kanji.rb +16 -0
- data/lib/ctc/kanji_2_ctc.rb +16 -0
- data/lib/ctc/version.rb +3 -0
- data/lib/ctc.rb +8 -0
- data/spec/ctc_2_kanji_spec.rb +19 -0
- data/spec/kanji_2_ctc_spec.rb +19 -0
- data/spec/spec_helper.rb +16 -0
- metadata +105 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b4f7ac8df2949e083702d174b294f5bc3765f8fd
|
4
|
+
data.tar.gz: f7ab24c674154cfa8624902a65951e7cd9a583a4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bd2c70f34bbeadb91dfca832fa4a727e8f2406bd174e9819e6ca094181cb73cc4770dd6eb7dd95302bc13a42169b761fcec6f34e4e1f084c432dbf1dbc7e48ad
|
7
|
+
data.tar.gz: 1be55beca2b36e1645a07de59010cf0865689ff0f8fa01488f51d7ab8a1f8ec5f1ab2f85e3fe9d2d66d2de01c27dfee079f42074ba726662c3fe3d3f5b76bafa
|
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use ruby-2.0.0-p247@ctc --create
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Hao Liu
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Ctc
|
2
|
+
|
3
|
+
Convert the [China Telegraph
|
4
|
+
Code](http://en.wikipedia.org/wiki/Chinese_telegraph_code) to Chinese
|
5
|
+
chinese character and vice versa.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'ctc'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install ctc
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
* `Ctc::Kanji2Ctc.find("刘")` will yield "0491"
|
24
|
+
* `Ctc::Ctc2Kanji.find("0491")` will yield "刘"
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
1. Fork it
|
29
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
30
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
31
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
32
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|