Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

siiky/jcd.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(WIP) Japanese Command-line Dictionary

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 method

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 ).

Some examples:

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 っか っさ った っは っら

Notes about the project and Rust

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!

About

Japanese Command-line Dictionary (WIP)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages