Skip to content

jhgjeraker/bunshi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bunshi (分子)

Kanji can be broken down into one or more base components. Popular courses like KKLC, RTK, and WaniKani use component mnemonics as a method of memorizing kanji, so learning to recognize them can be quite useful.

Bunshi is a tiny tool for kanji component decomposition in the terminal. I made it mostly to fill a gap in my existing study technique, significantly reducing the friction associated with component lookup in the browser.

Installation

Clone the repository and install from source.

pip install .

Usage

Bunshi works with single kanji, words, or complete sentences.

bunshi これ便利ですね

Each kanji is shown with its meaning, On'yomi and Kun'yomi readings, and component breakdown.

これ便利ですね
    │└ 利, profit ─ リ、きく
    │  ├ 禾, grain
    │  │ ├ 丿, slash
    │  │ └ 木, tree
    │  └ 刂, knife
    └ 便, convenience ─ ベン、ビン、たより
      ├ 亻, man
      └ 更, grow late
        ├ 一, one
        ├ 日, day
        └ 乂,
          ├ 丿, slash
          └ 乀, slash

Note that the output is designed for monospace fonts, unlike GitHub here, which I had to adjust manually.

Custom Breakdowns

Bunshi can be configured with a custom breakdown on the same format as the included ./bunshi/assets/breakdown.tsv.

bunshi 列 --breakdown path/to/custom-breakdown.tsv

Known Issues

  • Names and readings not found in the Jouyou dataset are missing.
  • Some unicode issues make a few components like render as a camera-icon, at least in my terminal.

Asset Licence

Bunshi sources its breakdowns from ./assets/breakdown.tsv, a remix of the work done by 3rd parties. Their efforts should not be attributed to me. The individual licences are listed below in an attempt at proper attribution.

About

Kanji Breakdown CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published