KanjiDB
Kanji Search Documentation | Kanji Search

KanjiDB Kanji Search Documentation - Four Corner Codes

The Four Corner code is a method of describing and indexing Han and Han-derived characters based on their visual layout. It was developed by Wang Yun-Wuu in the 1920s and became popular for dictionary indexing of Chinese characters before the large-scale use of Pinyin. The code is comprised of four numbers, each describing a feature of the four corners of a character. An optional fifth number is sometimes used for disambiguation between similar characters.

This page provides a very basic overview of the four corner method. Please be aware that the four corner codes used in the KanjiDB database are not guaranteed to be error free, so searching by four corner codes should be used with caution.

Quick Navigation:

The Code

Character elements are divided into ten basic classes:

0 Lid
1 Horizontal Line
2 Vertical Line
3 Dot
4 Cross
5 Skewer
6 Box
7 Angle
8 Hachi
9 Chiisai

The four digits of the code are obtained by classifying each corner of a character, starting from the top left in a Z-shape pattern:

A B
C D
for example:
7 1
2 9
7 7
2 2

Some examples:

Special Rules and Points of Interest

1) A single shape is only used once. If it fills several corners, it is counted as zero in subsequent corners. Multiple occurences of the same shape are counted normally.

Examples:

2) When the upper or lower half of a character consists of only one (single or composite) shape, it is, regardless of its position, counted as a left corner. The right corner is counted as zero.

Examples:

3) When there is no additional element to the four sides of the characters , , (and sometimes ), whatever is inside these characters is taken for the lower two corners.

Examples:

4) The analysis is based on the handwritten block-style ( - kaisho) of characters. This can be slightly confusing in some instances. For example, is 3027, not 1027. The top stroke is treated as a .

5) Some points on analyzing shapes:

- Lid Shape

When the horizontal line below a DOT shape (number 3) is connected to another stroke at its right-hand end (as in , etc.) it is not counted as a LID (number 0) but as a DOT.

Examples:

- Box Shape

Characters such as and where one of the strokes of the square extends beyond it, are not considered to be box (number 6) shapes, but angles (number 7).

Examples:

- Angle Shape

Only the cornered end of angle shapes (number 7) is counted as 7.

Examples:

- Hachi Shape

Strokes that cross other strokes are not counted as shape number 8 ().

Examples:

- Chiisai Shape

Shapes resembling shape 9, but featuring two strokes in the middle (as in the top part of or ) or two strokes on one side (as in or the bottom part of ) are not considered as 9 shapes.

Examples:

6) Some points to note when choosing corners:

When a corner is occupied by more than one independent or parallel strokes, the one that extend furthest to the left or right is taken as the corner, regardless of how high or low it is.

Examples:

If there is another shape above (or, at the bottom of the character, below) the leftmost or rightmost stroke of a character, that shape is given preference and is taken as the corner.

Examples:

When two composite stroke shapes are interwoven and each could be regarded as a corner, the shape that is higher is taken as the upper corner, and the lower stroke as lower corner.

When a stroke that slopes downwards to the left or right is supported by another stroke, the latter is taken as the corner.

Examples:

A left slanting stroke on the upper left is taken for the left corner only; for the right corner one takes a stroke more to the right.

Examples:

7) In order to differentiate between several characters with the same code, an optional "fifth corner" is sometimes used. This is, loosely, a shape above the fourth corner which has not been used in any other shape.

In the KanjiDB database, fifth corners are denoted ABCD.E, and characters without a fifth corner have a default fifth corner of '0'.

Given the complicated nature of the four corner method, it isn't difficult to see why it has been displaced by Pinyin (phonetic romanized Mandarin) as the popular choice for Chinese speakers in indexing hanzi. It is no longer in common usage.

Kanji Search Documentation | Kanji Search

KanjiDB makes use of the EDICT and KANJIDIC datasets, as well as a number of EDICT-format dictionaries. EDICT, KANJIDIC, and related files and terms are the property of The Electronic Dictionary Research and Development Group at Monash University and are used in conformance with the Group's license. All EDICT-format dictionary files are the property of their respective owners and are used in conformance with license restrictions where applicable. All other content © 2006-2008 Martin Thorne.