crystal-mecab
crystal-mecab
This library provides bindings to the Mecab library for tokenzing japanese Text.
Installation
- Install Mecab using the instructions found in the following link: https://taku910.github.io/mecab/#install
The site is in all Japanese but the instructions are pretty straightforward.
-
Add the dependency to your
shard.yml
:dependencies: crystal-mecab: github: your-github-user/crystal-mecab
-
Run
shards install
Usage
require "crystal-mecab"
CrystalMecab.tokenize_japanese("mecabは速くプログラムするし使いやすいしすごいソフトウェアですよ!").each do |t|
puts t.to_s
end
#outputs
#
#
#
#
#
#
#
#
#
As of v0.1.0 the only available functionality is to tokenize Japanese text into JapaneseToken structs which provide the word type (noun, verb, etc..) and the reading in Kana which is useful for words in Kanji to get the reading.
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/your-github-user/crystal-mecab/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
Contributors
- your-name-here - creator and maintainer
Repository
crystal-mecab
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- almost 5 years ago
- June 21, 2020
License
MIT License
Links
Synced at
Tue, 03 Jun 2025 13:56:42 GMT
Languages