- Notifications
You must be signed in to change notification settings - Fork21
scriptin/topokanji
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
30 seconds explanation for people who want to learn kanji:
It is best to learn kanji starting from simple characters and then learning complex ones as compositions of "parts", which are called "radicals" or "components". For example:
- 一 → 二 → 三
- 丨 → 凵 → 山 → 出
- 言 → 五 → 口 → 語
It is also smart to learn more common kanji first.
This project is based on those two ideas and provides properly ordered lists of kanji to make your learning process as fast, simple, and effective as possible.
Motivation for this project initially came from reading this article:The 5 Biggest Mistakes People Make When Learning Kanji.
First 100 kanji fromlists/aozora.txt (formatted for convenience):
人一丨口日目儿見凵山出十八木未丶来大亅了子心土冂田思二丁彳行寸寺時卜上丿刀分厶禾私中彐尹事可亻何自乂又皮彼亠方生月門間扌手言女本乙气気干年三耂者刂前勹勿豕冖宀家今下白勺的云牛物立小文矢知入乍作聿書学合
These lists can be found inlists
directory. They only differ in order of kanji. Each file contains a list of kanji, ordered as described in following sections. There are few options (seeUsed data for details):
aozora.(json|txt)
- ordered by kanji frequency in Japanese fiction and non-fiction books; I recommend this list if you're starting to learn kanjinews.(json|txt)
- ordered by kanji frequency in online newstwitter.(json|txt)
- ordered by kanji frequency in Twitter messageswikipedia.(json|txt)
- ordered by kanji frequency in Wikipedia articlesall.(json|txt)
- combined "average" version of all previous; this one is experimental, I don't recommend using it
You can use these lists to build anAnki deck or just as a guidance. If you're looking for "names" or meanings of kanji, you might want to check mykanji-keys project.
If you look at a kanji like 語, you can see it consists of at least three distinct parts: 言, 五, 口. Those are kanji by themselves too. The idea behind this project is to find the order of about 2000-2500 common kanji, in which no kanji appears before its' parts, so you only learn a new kanji when you already know its' components.
- No kanji appear before it's parts (components). In fact, in you treat kanji as nodes in agraph structure, and connect them with directed edges, where each edge means "kanji A includes kanji B as a component", it all forms adirected acyclic graph (DAG). For any DAG, it is possible to build atopological order, which is basically what "no kanji appear before it's parts" means.
- More common kanji come first. That way you learn useful characters as soon as possible.
Topological sorting is done by using a modified version ofKahn (1962) algorithm with intermediate sorting step which deals with the second property above. This intermediate sorting uses the "weight" of each character: common kanji (lighter) tend appear before rare kanji (heavier). See source code for details.
Initial unsorted list contains only kanji which are present inKanjiVG project, so for each character there is a data of its' shape and stroke order.
Characters are split into components usingCJK Decompositions Data project, along with "fixes" to simplify final lists and avoid characters which are not present in initial list.
Statistical data of kanji usage frequencies was collected by processing raw textual data from various sources. Seekanji-frequency repository for details.
Kanji list covers about 95-99% of kanji found in various Japanese texts. Generally, the goal is provide something similar toJōyō kanji, but based on actual data. Radicals are also included, but only those which are parts of some kanji in the list.
Kanji/radical mustNOT appear in this list if it is:
- not included in KanjiVG character set
- primarily used in names (people, places, etc.) or in some specific terms (religion, mythology, etc.)
- mostly used because of its' shape, e.g. a part of text emoticons/kaomoji like
( ^ω^)个
- a part of currently popular meme, manga/anime/dorama/movie title, #hashtag, etc., and otherwise is not commonly used
Files inlists
directory are final lists.
*.txt
files contain lists as plain text, one character per line; those files can be interpreted as CSV/TSV files with a single column*.json
files contain lists asJSON arrays
All files are encoded in UTF-8, withoutbyte order mark (BOM), and have unix-styleline endings,LF
.
Files independencies
directory are "flat" equivalents of CJK-decompositions (see below). "Dependency" here roughly means "a component of the visual decomposition" for kanji.
1-to-1.txt
has a format compatible withtsort command line utility; first character in each line is "target" kanji, second character is target's dependency or0
1-to-1.json
contains a JSON array with the same data as in1-to-1.txt
1-to-N.txt
is similar, but lists all "dependecies" at once1-to-N.json
contains a JSON object with the same data as in1-to-N.txt
All files are encoded in UTF-8, withoutbyte order mark (BOM), and have unix-styleline endings,LF
.
kanji.json
- data for kanji included in final ordered lists, includingradicalskanjivg.txt
- list of kanji fromKanjiVGcjk-decomp-{VERSION}.txt
- data fromCJK Decompositions Data, without any modificationscjk-decomp-override.txt
- data to override some CJK's decompositionskanji-frequency/*.json
- kanji frequency tables
All files are encoded in UTF-8, withoutbyte order mark (BOM). All files, except forcjk-decomp-{VERSION}.txt
, have unix-styleline endings,LF
.
Contains table with data for kanji, including radicals. Columns are:
- Character itself
- Stroke count
- Frequency flag:
true
if it is a common kanjifalse
if it is primarily used as a radical/component and unlikely to be seen within top 3000 in kanji usage frequency tables. In this case character is only listed because it's useful for decomposition, not as a standalone kanji
Resrictions:
- No duplicates
- Each character must be listed in
kanjivg.txt
- Each character must be listed on the left hand side in exactly one line in
cjk-decomp-{VERSION}.txt
- Each charactermay be listed on the left hand side in exactly one line in
cjk-decomp-override.txt
Simple list of characters which are present in KanjiVG project. Those are from the list of*.svg
files inKanjiVG's Github repository.
Data file fromCJK Decompositions Data project, seedescription of its' format.
Same format ascjk-decomp-{VERSION}.txt
, except:
- comments starting with
#
allowed - purpose of each record in this file is to override the one from
cjk-decomp-{VERSION}.txt
- type of decomposition is always
fix
, which just means "fix a record for the same character from original file"
Special character0
is used to distinguish invalid decompositions (which lead to characters with no graphical representation) from those which just can't be decomposed further into something meaningful. For example,一:fix(0)
means that this kanji can't be further decomposed, since it's just a single stroke.
NOTE: Strictly speaking, records in this file are not always "visual decompositions" (but most of them are). Instead, it's just an attempt to provide meaningful recommendations of kanji learning order.
Seekanji-frequency repository for details.
You must have Node.js and Git installed
git clone https://github.com/THIS/REPO.git
npm install
node build.js
+ commands and arguments described below
show
- only display sorted list without writing into files- (optional)
--per-line=NUM
- explicitly tell how many characters per line to display.50
by default. Applicable only to (no arguments) - (optional)
--freq-table=TABLE_NAME
- use only one frequency table. Table names are file names fromdata/kanji-frequency
directory, without.json
extension, e.g.all
("combined" list),aozora
, etc. When omitted, all frequency tables are used
- (optional)
coverage
- show tables coverage, i.e. which fraction of characters from each frequency table is included into kanji listsuggest-add
- suggest kanji to add in a list, based on coverage within kanji usage frequency tables- (required)
--num=NUM
- how many - (optional)
--mean-type=MEAN_TYPE
- same as previous, sort by given mean type:arithmetic
(most "extreme"),geometric
,harmonic
(default, most "conservative"). SeePythagorean means for details
- (required)
suggest-remove
- suggest kanji to remove from a list, reverse ofsuggest-add
- (required)
--num=NUM
- see above - (optional)
--mean-type=MEAN_TYPE
- see above
- (required)
save
- update files with final lists
This is a multi-license project. Choose any license from this list:
- Apache-2.0 or any later version
- CC-BY-4.0 or any later version
- EPL-1.0 or any later version
- LGPL-3.0 or any later version
- MIT
About
Topologically ordered lists of kanji for effective learning
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.