-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
474 changed files
with
1,439 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Anki Chinese Radicals Deck+ | ||
|
||
This is an Anki Flashcards Deck for learning the Chinese Radicals. | ||
The Radicals are the building block for the Chinese Characters, but can also be found in Japanese and Korean Language. | ||
The cool thing is, if you know the radicals you can guess the meaning and pronunciation of a character, though you have not learned it yet. | ||
|
||
You can also build up mnemonics for Chinese words from it. For example for the character *好* which means *good*: | ||
|
||
``` | ||
女 + 子 = 好 | ||
Meaning: | ||
woman + child = good, well (好 hǎo) | ||
"When a woman sticks to her child, it is good" | ||
``` | ||
|
||
The Deck is automatically generated from a Python script. You can have a look at the project at github.com/jay-pee/anki-chinese-radicals-deck-plus | ||
|
||
## Fields | ||
|
||
- Hanzi (Character) | ||
- Pinyin (Romanization) | ||
- English (Definition) | ||
- Kanji Radical Number | ||
- Alternatives (Radicals have sometimes multiple glyphs) | ||
- Sound (TTS Pronunciation) | ||
- Ancient Character (Image from zdic.net) | ||
- Examples (Characters where the Radical is used) | ||
|
||
## Example Card | ||
|
||
![example card](./media/example_card.png) | ||
|
||
## Get the most of this deck | ||
|
||
If you want to learn the radicals as fast as possible I would advice you to add some addition information to this cards. | ||
Here are some tips of what you can do: | ||
|
||
- Add images that you have looked up and you think it fits best to the character | ||
- Add an annotation that says something about the radical: Who does it look like? Does the ancient scripture reminds you on something? ... | ||
- ... | ||
|
||
## Build from Source | ||
|
||
1. Download the Repository | ||
2. install the requirements with `pip install -r requirments.txt` | ||
3. install the required node module with `npm install hanzi` (will soon be substituted) | ||
4. open a shell in the repository folder and run the main script (`python main.py`) | ||
|
||
## Contribute | ||
|
||
If you have any suggestions how to improve the cards you are welcome to write an github issue at github.com/jay-pee/anki-chinese-radicals-deck-plus/issues or directly edit the scripts and make a pull request! Slight word of warning is that this project is still in the rapid prototyping phase. So don't expect to much from the code quality. | ||
|
||
## Todos | ||
|
||
- [x] Add Kanji Radical Number | ||
- [x] Add Sound | ||
- [x] Get ancient scriptures | ||
- [x] Add colored Pinyin | ||
- [ ] Stroke order with https://github.com/chanind/hanzi-writer | ||
- [ ] Add Pictures maybe from https://writecantonese8.files.wordpress.com/2012/10/35670726-new-chinese-radical-full.pdf or google IMG | ||
- [ ] Add CI/CD Workflow | ||
- [ ] Implement Mnemonic like https://www.zerotohero.ca/#/en/zh/dictionary/hsk-cedict/%E5%80%91,men,0 | ||
|
||
## Acknowledgment | ||
|
||
Thank you to ccdb.hemiola.com (API for Chinese Characters), zdic.net (for the Ancient Scripture Images) HanziJS (for the Examples), translate.google.com (for the sounds) and the python pinyin module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
//Require | ||
var hanzi = require("hanzi"); | ||
const fs = require('fs'); | ||
const csv = require('@fast-csv/parse'); | ||
|
||
//Initiate | ||
hanzi.start(); | ||
// var decomposition = hanzi.decompose('爱'); | ||
// console.log(decomposition); | ||
|
||
// read a list of Radicals from a csv | ||
|
||
const arr = Array(0); | ||
const arr_char = Array(0); | ||
// console.log(arr) | ||
|
||
|
||
const data = fs.readFileSync('./data/source.csv', 'UTF-8'); | ||
|
||
const lines = data.split(/\r?\n/); | ||
lines.forEach((line) => { | ||
arr.push(line.split("\t")); | ||
}); | ||
|
||
for(let line of arr){ | ||
if (hanzi.ifComponentExists(line[0])){ | ||
var tmp = hanzi.getCharactersWithComponent(line[0]); | ||
if (typeof tmp == "object"){ | ||
var tmp2 = tmp.slice(0,5); | ||
var tmp3 = tmp2.join(", "); | ||
arr_char.push(tmp3); | ||
} | ||
else { | ||
arr_char.push(""); | ||
} | ||
} | ||
else{ | ||
arr_char.push(""); | ||
} | ||
} | ||
|
||
console.log(lines.length) | ||
console.log(arr_char.length) | ||
var text = "" | ||
for (i = 0, len = lines.length; i < len; i++) { | ||
if (lines[i]) { | ||
text += lines[i] + "\t" + arr_char[i] + "\n"; | ||
} | ||
} | ||
|
||
fs.writeFile("./data/source_examples.csv", text, function (err) { | ||
if (err) return console.log(err); | ||
console.log('Finished!'); | ||
}); | ||
// for loop with | ||
// hanzi.ifComponentExists(character/component); | ||
//hanzi.getCharactersWithComponent( element )); | ||
//make list to an string | ||
//BONUS make a ruby with translation | ||
|
||
//append to csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
一 http://img.zdic.net/zy/jiaguwen/41_E000.svg | ||
丨 http://img.zdic.net/zy/xiaozhuan/27_F510.svg | ||
丶 http://img.zdic.net/zy/jinwen/32_E5DF.svg | ||
丿 http://img.zdic.net/zy/xiaozhuan/27_F4E1.svg | ||
乙 http://img.zdic.net/zy/jiaguwen/43_F613.svg | ||
亅 http://img.zdic.net/zy/xiaozhuan/27_F46C.svg | ||
二 http://img.zdic.net/zy/jiaguwen/43_F23E.svg | ||
亠 | ||
人 http://img.zdic.net/zy/jiaguwen/42_F47D.svg | ||
儿 http://img.zdic.net/zy/xiaozhuan/27_513F.svg | ||
入 http://img.zdic.net/zy/jiaguwen/42_E7C5.svg | ||
八 http://img.zdic.net/zy/jiaguwen/41_E38E.svg | ||
冂 http://img.zdic.net/zy/jinwen/34_EF22.svg | ||
冖 http://img.zdic.net/zy/jinwen/32_E811.svg | ||
冫 http://img.zdic.net/zy/jinwen/33_ED5E.svg | ||
几 http://img.zdic.net/zy/chuwenzi/53_F372.svg | ||
凵 http://img.zdic.net/zy/chuwenzi/51_E7CB.svg | ||
刀 http://img.zdic.net/zy/jiaguwen/42_E238.svg | ||
力 http://img.zdic.net/zy/jiaguwen/43_F358.svg | ||
勹 http://img.zdic.net/zy/jiaguwen/44_E23A.svg | ||
匕 http://img.zdic.net/zy/jiaguwen/42_F5AD.svg | ||
匚 http://img.zdic.net/zy/jiaguwen/43_F05A.svg | ||
匸 http://img.zdic.net/zy/xiaozhuan/27_F46D.svg | ||
十 http://img.zdic.net/zy/jiaguwen/41_EC21.svg | ||
卜 http://img.zdic.net/zy/jiaguwen/41_F2FE.svg | ||
卩 http://img.zdic.net/zy/jiaguwen/43_E08B.svg | ||
厂 http://img.zdic.net/zy/jinwen/33_E78D.svg | ||
厶 http://img.zdic.net/zy/jinwen/37_F657.svg | ||
又 http://img.zdic.net/zy/jiaguwen/41_EE92.svg | ||
口 http://img.zdic.net/zy/jiaguwen/41_E514.svg | ||
囗 http://img.zdic.net/zy/xiaozhuan/27_56D7.svg | ||
土 http://img.zdic.net/zy/jiaguwen/43_F29B.svg | ||
士 http://img.zdic.net/zy/jinwen/31_E24D.svg | ||
夂 http://img.zdic.net/zy/xiaozhuan/27_F4DF.svg | ||
夊 http://img.zdic.net/zy/jiaguwen/42_E9BB.svg | ||
夕 http://img.zdic.net/zy/jiaguwen/42_EF2A.svg | ||
大 http://img.zdic.net/zy/jiaguwen/43_E619.svg | ||
女 http://img.zdic.net/zy/jiaguwen/43_EC67.svg | ||
子 http://img.zdic.net/zy/jiaguwen/43_F7A4.svg | ||
宀 http://img.zdic.net/zy/jiaguwen/42_F1A6.svg | ||
寸 http://img.zdic.net/zy/xiaozhuan/27_5BF8.svg | ||
小 http://img.zdic.net/zy/jiaguwen/41_E35E.svg | ||
尢 http://img.zdic.net/zy/jinwen/33_EA5A.svg | ||
尸 http://img.zdic.net/zy/jiaguwen/42_F6D4.svg | ||
屮 http://img.zdic.net/zy/jiaguwen/41_E27B.svg | ||
山 http://img.zdic.net/zy/jiaguwen/43_E50F.svg | ||
巛 http://img.zdic.net/zy/jiaguwen/43_E993.svg | ||
工 http://img.zdic.net/zy/jiaguwen/42_E30F.svg | ||
己 http://img.zdic.net/zy/jiaguwen/43_F6C0.svg | ||
巾 http://img.zdic.net/zy/jiaguwen/42_F41C.svg | ||
干 http://img.zdic.net/zy/jiaguwen/41_EBA0.svg | ||
乡 http://img.zdic.net/zy/jiaguwen/42_ED43.svg | ||
广 http://img.zdic.net/zy/xiaozhuan/27_F4EA.svg | ||
廴 http://img.zdic.net/zy/xiaozhuan/27_F54C.svg | ||
廾 http://img.zdic.net/zy/jiaguwen/41_ECD9.svg | ||
弋 http://img.zdic.net/zy/jiaguwen/45_E2A5.svg | ||
弓 http://img.zdic.net/zy/jiaguwen/43_F080.svg | ||
彐 http://img.zdic.net/zy/xiaozhuan/27_F58A.svg | ||
彡 http://img.zdic.net/zy/jiaguwen/43_E02D.svg | ||
彳 http://img.zdic.net/zy/xiaozhuan/27_5F73.svg | ||
心 http://img.zdic.net/zy/jiaguwen/42_ECBF.svg | ||
戈 http://img.zdic.net/zy/jiaguwen/43_EEC0.svg | ||
戶 http://img.zdic.net/zy/jiaguwen/43_EBE7.svg | ||
手 http://img.zdic.net/zy/jinwen/33_EF10.svg | ||
支 http://img.zdic.net/zy/xiaozhuan/27_E299.svg | ||
攴 http://img.zdic.net/zy/jiaguwen/41_F1A8.svg | ||
文 http://img.zdic.net/zy/jiaguwen/43_E04F.svg | ||
斗 http://img.zdic.net/zy/jiaguwen/43_EEB3.svg | ||
斤 http://img.zdic.net/zy/jiaguwen/43_F3FB.svg | ||
方 http://img.zdic.net/zy/jiaguwen/42_F73E.svg | ||
无 http://img.zdic.net/zy/jinwen/32_EA9E.svg | ||
日 http://img.zdic.net/zy/jiaguwen/42_ED48.svg | ||
曰 http://img.zdic.net/zy/jiaguwen/42_E353.svg | ||
月 http://img.zdic.net/zy/jiaguwen/42_EEA1.svg | ||
木 http://img.zdic.net/zy/jiaguwen/42_EA66.svg | ||
欠 http://img.zdic.net/zy/jiaguwen/43_E008.svg | ||
止 http://img.zdic.net/zy/jiaguwen/41_E750.svg | ||
歹 http://img.zdic.net/zy/jiaguwen/42_E217.svg | ||
殳 http://img.zdic.net/zy/jiaguwen/44_E268.svg | ||
毋 http://img.zdic.net/zy/jinwen/33_F27B.svg | ||
比 http://img.zdic.net/zy/jiaguwen/42_F60A.svg | ||
毛 http://img.zdic.net/zy/jinwen/33_E2CF.svg | ||
氏 http://img.zdic.net/zy/jiaguwen/43_EEB1.svg | ||
气 http://img.zdic.net/zy/jiaguwen/41_E23A.svg | ||
水 http://img.zdic.net/zy/jiaguwen/43_E7BE.svg | ||
火 http://img.zdic.net/zy/jiaguwen/43_E521.svg | ||
爪 http://img.zdic.net/zy/jiaguwen/41_EDF8.svg | ||
父 http://img.zdic.net/zy/jiaguwen/41_EEDF.svg | ||
爻 http://img.zdic.net/zy/jiaguwen/41_F434.svg | ||
丬 | ||
片 http://img.zdic.net/zy/xiaozhuan/27_7247.svg | ||
牙 http://img.zdic.net/zy/jinwen/31_EA3B.svg | ||
牛 http://img.zdic.net/zy/jiaguwen/41_E431.svg | ||
犬 http://img.zdic.net/zy/jiaguwen/43_E48A.svg | ||
玄 http://img.zdic.net/zy/jiaguwen/43_F0EB.svg | ||
玉 http://img.zdic.net/zy/jiaguwen/41_E219.svg | ||
瓜 http://img.zdic.net/zy/jinwen/32_F370.svg | ||
瓦 http://img.zdic.net/zy/xiaozhuan/27_74E6.svg | ||
甘 http://img.zdic.net/zy/jiaguwen/42_E33E.svg | ||
生 http://img.zdic.net/zy/jiaguwen/42_EC57.svg | ||
用 http://img.zdic.net/zy/jiaguwen/45_F05F.svg | ||
曱 | ||
疋 http://img.zdic.net/zy/jiaguwen/45_E2D3.svg | ||
疒 http://img.zdic.net/zy/jiaguwen/42_F370.svg | ||
癶 http://img.zdic.net/zy/chuwenzi/51_E875.svg | ||
白 http://img.zdic.net/zy/jiaguwen/42_F45B.svg | ||
皮 http://img.zdic.net/zy/jinwen/31_F1A9.svg | ||
皿 http://img.zdic.net/zy/jiaguwen/42_E5E3.svg | ||
目 http://img.zdic.net/zy/jiaguwen/41_F455.svg | ||
矛 http://img.zdic.net/zy/jinwen/34_E36F.svg | ||
矢 http://img.zdic.net/zy/jiaguwen/42_E802.svg | ||
石 http://img.zdic.net/zy/jiaguwen/43_E1DB.svg | ||
示 http://img.zdic.net/zy/jiaguwen/45_E285.svg | ||
禸 http://img.zdic.net/zy/xiaozhuan/27_79B8.svg | ||
禾 http://img.zdic.net/zy/jiaguwen/42_F0C2.svg | ||
穴 http://img.zdic.net/zy/chuwenzi/56_F281.svg | ||
立 http://img.zdic.net/zy/jiaguwen/43_E78A.svg | ||
竹 http://img.zdic.net/zy/jiaguwen/43_E265.svg | ||
米 http://img.zdic.net/zy/jiaguwen/42_F17F.svg | ||
糸 http://img.zdic.net/zy/jiaguwen/43_F0F3.svg | ||
缶 http://img.zdic.net/zy/jiaguwen/42_E7F0.svg | ||
网 http://img.zdic.net/zy/jiaguwen/42_F3C4.svg | ||
羊 http://img.zdic.net/zy/jiaguwen/41_F7E8.svg | ||
羽 http://img.zdic.net/zy/jiaguwen/41_F5BE.svg | ||
老 http://img.zdic.net/zy/jiaguwen/42_F6C5.svg | ||
而 http://img.zdic.net/zy/jinwen/33_E7F7.svg | ||
耒 http://img.zdic.net/zy/jinwen/34_EECB.svg | ||
耳 http://img.zdic.net/zy/jiaguwen/43_EC0A.svg | ||
聿 http://img.zdic.net/zy/jiaguwen/41_F084.svg | ||
肉 http://img.zdic.net/zy/jiaguwen/42_E22D.svg | ||
臣 http://img.zdic.net/zy/jiaguwen/41_F096.svg | ||
自 http://img.zdic.net/zy/jiaguwen/41_F515.svg | ||
至 http://img.zdic.net/zy/jiaguwen/43_EB8D.svg | ||
臼 http://img.zdic.net/zy/chuwenzi/52_EF66.svg | ||
舌 http://img.zdic.net/zy/jiaguwen/45_E23F.svg | ||
舛 http://img.zdic.net/zy/xiaozhuan/27_821B.svg | ||
舟 http://img.zdic.net/zy/jiaguwen/42_F6E5.svg | ||
艮 http://img.zdic.net/zy/xiaozhuan/27_826E.svg | ||
色 http://img.zdic.net/zy/jinwen/37_F556.svg | ||
艸 http://img.zdic.net/zy/jiaguwen/45_E93E.svg | ||
虍 http://img.zdic.net/zy/jiaguwen/42_E58B.svg | ||
虫 http://img.zdic.net/zy/jiaguwen/43_F15C.svg | ||
血 http://img.zdic.net/zy/jiaguwen/42_E672.svg | ||
衣 http://img.zdic.net/zy/jiaguwen/42_F693.svg | ||
襾 http://img.zdic.net/zy/xiaozhuan/27_897E.svg | ||
見 http://img.zdic.net/zy/jiaguwen/42_F821.svg | ||
角 http://img.zdic.net/zy/jiaguwen/42_E2BB.svg | ||
言 http://img.zdic.net/zy/jiaguwen/41_EC87.svg | ||
谷 http://img.zdic.net/zy/jiaguwen/43_EA3A.svg | ||
豆 http://img.zdic.net/zy/jiaguwen/42_E530.svg | ||
豕 http://img.zdic.net/zy/jiaguwen/43_E270.svg | ||
豸 http://img.zdic.net/zy/jiaguwen/43_E2E6.svg | ||
貝 http://img.zdic.net/zy/jiaguwen/42_ECC6.svg | ||
赤 http://img.zdic.net/zy/jiaguwen/43_E616.svg | ||
走 http://img.zdic.net/zy/jiaguwen/43_E6CE.svg | ||
足 http://img.zdic.net/zy/jiaguwen/45_E2D3.svg | ||
身 http://img.zdic.net/zy/jiaguwen/44_E23C.svg | ||
車 http://img.zdic.net/zy/jiaguwen/43_F44A.svg | ||
辛 http://img.zdic.net/zy/jiaguwen/43_F71C.svg | ||
辰 http://img.zdic.net/zy/jiaguwen/44_E016.svg | ||
辵 http://img.zdic.net/zy/jiaguwen/41_E86A.svg | ||
邑 http://img.zdic.net/zy/jiaguwen/42_ED2E.svg | ||
酉 http://img.zdic.net/zy/jiaguwen/44_E131.svg | ||
釆 http://img.zdic.net/zy/jiaguwen/41_E418.svg | ||
里 http://img.zdic.net/zy/jinwen/34_E07E.svg | ||
金 http://img.zdic.net/zy/jinwen/34_E19E.svg | ||
長 http://img.zdic.net/zy/jiaguwen/43_E212.svg | ||
門 http://img.zdic.net/zy/jiaguwen/43_EBF2.svg | ||
阜 http://img.zdic.net/zy/jiaguwen/43_F499.svg | ||
隶 http://img.zdic.net/zy/jinwen/31_F136.svg | ||
隹 http://img.zdic.net/zy/jiaguwen/41_F67C.svg | ||
雨 http://img.zdic.net/zy/jiaguwen/43_EA42.svg | ||
靑 http://img.zdic.net/zy/jinwen/32_E5EF.svg | ||
面 http://img.zdic.net/zy/jiaguwen/44_E2D2.svg | ||
革 http://img.zdic.net/zy/jiaguwen/44_E25E.svg | ||
韋 http://img.zdic.net/zy/jiaguwen/42_EA2A.svg | ||
韭 http://img.zdic.net/zy/chuwenzi/56_F12B.svg | ||
音 http://img.zdic.net/zy/jinwen/31_EC76.svg | ||
頁 http://img.zdic.net/zy/jiaguwen/43_E019.svg | ||
凬 http://img.zdic.net/zy/jiaguwen/42_E0AD.svg | ||
飛 http://img.zdic.net/zy/chuwenzi/53_E675.svg | ||
食 http://img.zdic.net/zy/jiaguwen/42_E75E.svg | ||
首 http://img.zdic.net/zy/jiaguwen/44_E2EA.svg | ||
香 http://img.zdic.net/zy/jiaguwen/45_E1D4.svg | ||
馬 http://img.zdic.net/zy/jiaguwen/43_E372.svg | ||
骨 http://img.zdic.net/zy/jiaguwen/42_E22A.svg | ||
高 http://img.zdic.net/zy/jiaguwen/42_E876.svg | ||
髟 http://img.zdic.net/zy/jiaguwen/45_EC4C.svg | ||
鬥 http://img.zdic.net/zy/jiaguwen/41_EE88.svg | ||
鬯 http://img.zdic.net/zy/jiaguwen/42_E739.svg | ||
鬲 http://img.zdic.net/zy/jiaguwen/41_EDC7.svg | ||
鬼 http://img.zdic.net/zy/jiaguwen/43_E19D.svg | ||
魚 http://img.zdic.net/zy/jiaguwen/43_EB01.svg | ||
鳥 http://img.zdic.net/zy/jiaguwen/42_E075.svg | ||
鹵 http://img.zdic.net/zy/jiaguwen/45_EFDA.svg | ||
鹿 http://img.zdic.net/zy/jiaguwen/43_E3E6.svg | ||
麥 http://img.zdic.net/zy/jiaguwen/42_E99E.svg | ||
麻 http://img.zdic.net/zy/jinwen/32_F36B.svg | ||
黃 http://img.zdic.net/zy/jiaguwen/43_E6D0.svg | ||
黍 http://img.zdic.net/zy/jiaguwen/42_F155.svg | ||
黑 http://img.zdic.net/zy/jiaguwen/43_F2F3.svg | ||
黹 http://img.zdic.net/zy/jiaguwen/45_F48B.svg | ||
黽 http://img.zdic.net/zy/jiaguwen/43_F1F5.svg | ||
鼎 http://img.zdic.net/zy/jiaguwen/42_F06B.svg | ||
鼓 http://img.zdic.net/zy/jiaguwen/42_E51A.svg | ||
鼠 http://img.zdic.net/zy/jiaguwen/45_EE23.svg | ||
鼻 http://img.zdic.net/zy/jiaguwen/41_F554.svg | ||
斉 http://img.zdic.net/zy/jiaguwen/42_F013.svg | ||
歯 http://img.zdic.net/zy/jiaguwen/41_EAFE.svg | ||
龍 http://img.zdic.net/zy/jiaguwen/43_EB46.svg | ||
亀 | ||
龠 http://img.zdic.net/zy/jiaguwen/41_EB3A.svg | ||
行 http://img.zdic.net/zy/jiaguwen/41_EA81.svg | ||
非 http://img.zdic.net/zy/jiaguwen/45_EBFF.svg |
Oops, something went wrong.