Cezi (測字)
Write a Character, Cast a Hexagram
Overview
Cezi (測字, 'measuring characters') is the Chinese art in which the querent's own handwriting becomes the oracle: you write a character — or a word, a name, a phrase — and the characters cast a hexagram of the I-Ching. It is the most personal of the casting methods, because the randomness comes not from coins or stalks but from the querent's own impulse: which character rose to mind when the question was held. The classical rules live in the 字占 chapter of the Meihua Yishu (梅花易數): stroke counts become trigram numbers by the Before-Heaven values, the character count decides how the text divides into upper and lower, and a moving line turns the cast hexagram toward its changing counterpart. askTIAN implements this casting layer exactly, on real stroke counts — the same Unihan-backed table that fixed the stroke-fabrication bug in v5.12.0 — and refuses what it cannot honestly compute: a character with no recorded count is declined by name, and the single-character split that requires seeing the glyph's structure is never faked.
Origin & history
Character divination is old in China — court diviners of the Song were famous for it, and the semi-legendary 謝石 is said to have read the fates of emperors from a single written character. Two arts travel under the name. The first is 拆字, the diviner's craft of taking a glyph apart — seeing 十 inside 田, a hidden 亡 in a corner, an omen in a radical — which is inspired word-play, not an algorithm, and askTIAN deliberately does not simulate it. The second is the computable casting layer the Meihua Yishu systematized: strokes are counted (the strict school insists on traditional forms at 康熙 counts, written in regular script), the count is cast onto the eight trigrams by the Before-Heaven numbers — 乾 one through 坤 eight, a remainder of zero falling to 坤 — and the total modulo six seats the moving line. One character splits by its own structure; two characters stand as upper and lower; three give the third character to the moving line; longer texts divide in half, the smaller half rising as heaven and the larger settling as earth.
The rules survived with the usual noise of oral transmission, and askTIAN's research pass (docs/CEZI-RESEARCH-2026-08.md) recorded the divergences instead of flattening them: a school that sums the second and third characters into the lower trigram where the mainline gives the third character to the moving line; the two rival single-character conventions — the structural left-right split and the deeper stroke-direction method that assigns yin and yang by the way each stroke travels around the 式盤 circle; and the strict school's insistence on traditional forms. The single-character case became this endpoint's honesty test: both classical conventions require per-glyph data that a Unicode codepoint simply does not carry, and fabricating a split would be exactly the sin the v5.12.0 stroke fix removed from the name engine. So a single character requires the hour branch instead — the classically attested 加時辰 cast, where the hour joins the strokes — and the response names the two unimplemented conventions rather than pretending they were applied.
How it works
Send one to nine Chinese characters. Every character is resolved to a real stroke count — the curated 姓名學 map first (where simplified forms deliberately carry their traditional counts), then the full Unihan table covering every CJK unified ideograph; a character with no recorded count is refused by name, never guessed. The casting rule follows the character count: two characters put the first's strokes over the second's; three make the third character the moving line; four to nine divide the text in half — equal halves when even, the smaller half above when odd (天輕清, 地重濁) — and sum each half's strokes; a lone character requires the hour branch and casts strokes over strokes-plus-hour. Trigram numbers are the Before-Heaven values with zero falling to 坤, the moving line is the total modulo six with zero falling to the top line, and the hour branch, when supplied, joins the moving-line sum — except in the three-character rule, where the response explicitly reports it ignored. Everything downstream of the numbers is delegated to the same Meihua engine behind meihua.calculate: the hexagram and its changing counterpart, and the classical 體用 judgment — the trigram holding the moving line is the situation (用), the other is the querent (體), and their five-element relation grades the cast strong or weak. Every response carries the full derivation audit: per-character strokes, the halves, the ordinals, the rule applied.
Good for
- Casting a hexagram from a name, a word, or the phrase that rose to mind with the question
- Single-character casts with the hour branch — the classical 加時辰 form
- Reading the 體用 verdict: whether the querent or the situation holds the strength
- Following the cast into its changing hexagram, and onward via iching.relations
- Brand and name divination — cast a company or product name and read the structure
- A fully auditable cast: every response shows each character's strokes and every remainder
- Studying the 字占 rules themselves, with every school divergence disclosed in place
Use cases
Write-a-Character Reading
The querent types the character they would have written for the diviner; with the current hour branch the classical single-glyph cast returns — hexagram, moving line, 體用 verdict — with the full derivation shown.
Name Oracle
Cast a personal or business name (two to nine characters) and pair the hexagram with nameAnalysis.analyze's 五格 reading — the same real stroke counts feeding two different classical arts.
Phrase of the Moment
Take the short phrase a client says when asked 'what is on your mind' and cast it — the 少上多下 division turns any utterance into a dated, auditable hexagram.
Deep-Dive Chain
Feed the cast hexagram's number into iching.relations for its nuclear, inverse and opposite forms, or compare with a meihua.calculate time-cast of the same moment — one Meihua engine, two doors in.
Key terms
- 測字 / 字占
- Character divination — the querent's written characters cast the hexagram. The computable casting layer is implemented; the 拆字 glyph-reading art is a diviner's craft and is not simulated.
- 先天卦數 (Before-Heaven Numbers)
- 乾1 兌2 離3 震4 巽5 坎6 艮7 坤8 — the trigram values strokes are cast onto, remainder mod 8, zero falling to 坤.
- 動爻 (Moving Line)
- The total strokes (plus the hour, when given) mod 6, zero falling to the sixth line — it turns the cast hexagram toward its changing counterpart and decides 體 and 用.
- 體用 (Body and Use)
- The trigram holding the moving line is 用, the situation; the other is 體, the querent. Their five-element relation grades the cast — the same judgment engine as meihua.calculate.
- 少上多下 / 天輕清地重濁
- An odd text divides with the smaller half above: heaven is light and clear, earth heavy and turbid — the classical rule for three-plus-character division.
- 加時辰
- Adding the hour branch's number (子1..亥12) to the cast — required for a single character, optional otherwise, and explicitly reported when the three-character rule ignores it.
- 康熙筆畫 (Kangxi Strokes)
- The strict school casts on traditional forms at Kangxi dictionary counts, in regular script — submit traditional characters to follow that convention; the engine notes the preference.
- 拆字
- The uncomputable half of the art: taking the glyph apart for omens — a hidden radical, a missing corner. Inspired word-play by a human diviner, deliberately outside this engine.
API
The askTIAN Cezi API casts one to nine Chinese characters into a hexagram by the classical 梅花易數 字占 rules, on real stroke counts — the curated 姓名學 map backed by the full Unihan table, refusing by name any character without a recorded count. Per-count rules (first-over-second, third-as-moving-line, stroke-sum halves with the smaller half above) are applied exactly, the hour branch joins where attested, and the response carries the complete derivation audit: every character's strokes, the halves, the ordinals, the rule. Trigrams, the changing hexagram and the 體用 strength verdict come from the same Meihua engine as meihua.calculate — one engine, one truth. School divergences are disclosed in the method string; the single-glyph structural split and the 拆字 art are declined rather than faked. All eleven test casts were hand-computed before locking. Pure deterministic compute, no LLM.
Endpoint: POST /trpc/cezi.cast — 3 TIAN Points. See the API documentation and Playground.