← All cipher signs, grouped · How the signs are used and shared · Ibn al-Durayhim’s Cipher Casebook (Penn LJS 51)

The signs grouped by shape

The sign list groups the signs cipher by cipher. This page groups them by shape, across all the ciphers of the book, without regard to the letter they stand for. Each row is one shape and every cipher that draws it; under each sign is the letter it has in its own cipher. Click a sign to open its row in the sign list.

Loading the shapes…

How the shapes were grouped

Images. Every occurrence in the reviewed sign list (13,713) was taken from the segmenter’s 64-pixel crops, the same crops as the sign tiles on this site, cleaned of specks and centred on its ink.

Comparing shapes. A small neural network was trained on these crops, and on nothing else, to tell apart the signs of one cipher: two occurrences of a sign should come out close, two different signs of the same cipher far apart. Signs of different ciphers were never compared in training, so two ciphers that draw the same 8 are not pushed apart, and the network is free to place them together. On 36 ciphers held out of training it tells a cipher’s signs apart 95.0% of the time (nearest occurrence has the same label), against 90.4% on the same ciphers for the gradient-histogram (HOG) features used by the 3D viewer.

Grouping. Each sign of each cipher is the average of its occurrences. The sign list has 3,986 rows; here 20r.8 and 47r.1, the two halves of one cipher separated when a quire was bound out of order, are counted as one cipher and their matching signs as one sign, which leaves 3,966 signs. Signs were merged into shapes from the most similar pair down (average linkage, cosine similarity 0.6 or more), with one rule taken from the manuscript itself: two different signs of the same cipher are never put in one shape, since the cipher keeps them apart. Then every sign that fits the rest of its shape poorly (similarity to the others under 0.70, or under 0.76 in a shape of two or three signs) was taken out; it joins another shape only if it fits that one clearly (0.75), and otherwise stands alone. Without this step a review of the worst-fitting signs found most of them wrong: a tree among double strokes, a flag among triangles.

Review by eye. On 1 December 2026 every shape was gone through by eye on a local copy of this page, marking the signs that do not belong. 580 signs in 159 shapes were marked, with notes on 17 shapes. The marks are applied after the grouping: a marked sign leaves its shape and stands alone; where the note says the marked signs are one form (the bars of one shape, the Xs of another), they become the shape and the rest leave; one shape of two forms was split, one shape that was four different signs was dissolved, two small shapes were merged and one sign moved. Five signs marked as the three dots of a word divider were taken out; checked against the page and the plaintext, all five are dividers, so they also lost their letter in the sign list, and in each cipher the unlettered box beside the dots took the letter (the run had been shifted by one). One of them, 7r.5 S10, was a sign of its own only through that box and is gone from the list, which now has 3,985 rows. The reviewer separates forms the network joins: an H with a missing arm or a box inside it, a V with a dot or extra strokes, a rounded and a pointed M. So 575 signs that the network had grouped now stand alone, and some shapes are smaller and stricter than the network alone would make them. A second pass the same day, on the corrected shapes, marked 79 more signs in 32 shapes and moved the rings of one small shape into the main ring shape; a third pass marked 22 more in 11 shapes. Then small shapes were offered for merging into the nearest bigger ones: 12 merges were approved (32 signs moved), two single signs moved on notes, one small shape dissolved and 39 kept apart. A fourth pass marked 21 more signs and joined three small shapes of a T on two legs. Retraining the network on the marks (as pairs of signs that belong together or apart) did not help on shapes held out of that training, so the reviews are applied as they stand rather than learned.

Checks. Seven shapes checked by eye before grouping (the 8, the T, the H, the stick figure, the scissors, and the caret and 4 of the 100r–101r alphabet; 37 signs in 117 pairs) were used to judge the network: before the review by eye 66 of the 117 pairs ended up in the same shape, after it 65, and no shape mixes two of the seven. What is missed is mostly the 8s and the Ts, which fall into several shapes. Shapes found in only two ciphers are looser: they are hidden unless asked for. The shape family is a rough sort from stroke counts (closed loops, stroke ends after pruning, small separate dots) and is wrong for some shapes.

The code is in targets/ljs51corpus/shapes (crop.py, train.py, cluster.py, page.py); the data of this page is shapes.json.