Basic usage (not functional yet):
# convert text to kana and add it to the dictionary with the meaning after "-m"
jcd add -r hiragana -m Cursive syllabary used in the japanese language
jcd add -h hiragana -m Cursive syllabary used in the japanese language
# messed up case also works
jcd add -r KATakANA -m Angualar syllabary used in the japanese language
jcd add -k KATakANA -m Angualar syllabary used in the japanese language
# search the dictionary for a word
jcd search -r ushi # auto detects kana to use
jcd search -h ushi # converts to hiragana (ignores case)
jcd search -k ushi # converts to katakana (ignores case)
# convert arguments to kana and print to stdout
jcd convert -r KATAKANA ga wakaru # auto detects
jcd convert -h KATAKANA ga wakaru # converts to hiragana
jcd convert -k KATAKANA ga wakaru # converts to katakana
See main.rs for more details.
Conversion uses the Modified Hepburn system, except for
syllables with the macron or circumflex, which is
not implemented yet.
Hyphen (-
) is always converted to the chouonpu (ー
).
m
(or M
) is never converted to ん
(or ン
).
Romaji | Kana |
---|---|
hiragana |
ひらがな |
KATakANA and KATAKANA |
カタカナ |
CHOKORE-TO |
チョコレート |
nippon |
にっぽん |
kan'i |
かんい |
kani |
かに |
shin'you |
しんよう |
shinyou |
しにょう |
maccha (not matcha ) |
まっちゃ |
matcha |
まtちゃ |
kka ssa tta hha rra |
っか っさ った っは っら |
I'm using this project as an exercise to learn Rust but I don't plan to drop it at least until it has all the functionality I want.
As I'm pretty new to Rust you'll probably find lots of things that could be improved. As I learn more about it and how to use it hopefully they'll be changed. If not, don't let that put you off!