Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Day 4 · The Shape of a Sign

A letter is not one shape but a range of shapes. No two scribes draw it the same way. In fact, no writer ever writes a letter the exact same way twice. Today you’ll measure how close those shapes are to one another.

What paleography is

Paleography is the study of old handwriting: how letters were formed, how that forming changed over time and from place to place, and what those changes let us infer about a manuscript. The word comes from the Greek for “ancient writing.” It is one of the oldest skills in our field and still one of the least automated.

A trained paleographer can look at a page and do several things at once, often without being able to say exactly how:

The catch is that this expertise is real but hard to scale and hard to make explicit. A paleographer who has read ten thousand pages carries that experience as trained intuition. They can be right and unable to fully spell out the rule they used, which makes the skill slow to teach and slow to apply across the thousands of manuscripts a large question would need. Their methods are impossible to replicate by any other scholar, limiting material for deep discussion, and making the entire enterprise fundamental not scientific. That gap, between a reliable judgment and a statable, repeatable procedure, is exactly the gap that measuring shapes tries to narrow.

Hieratic forms of the owl sign G17 across periods

Figure 1:The evolution of hieratic 𓅓 (G17).

Discussion questions

Graph, grapheme, allograph

Write the letter “a” five times, quickly. The five are not identical. To talk about that precisely we need three words.

The same grapheme appears as very different graphs from one hand to the next, and that variation is measurable. It can indicate period, scribe, or genre.

Two more terms describe how a sign is made, and they matter because two letters can look alike on the page but be built differently:

What varies across hands, periods, and genres is exactly this: which allographs a scribe favors, the ductus behind them, and the morphology that results. A formal liturgical book and a hasty personal letter, written the same year by the same person, can use noticeably different forms of the same grapheme. Genre changes the hand.

Discussion questions

Digitizing is the hard part

Before a sign can be measured it has to be turned into data a computer can work on. That happens in three steps, and the difficulty is concentrated in the last one.

Imaging. Someone photographs the page. This sounds trivial and is not: resolution, lighting, and color all affect everything downstream. A sign photographed at low resolution simply has fewer pixels to measure. Special techniques (raking light, multispectral imaging) can recover ink that the naked eye misses, which is why digitization is often where faded or palimpsested text is first read at all.

Binarization. The image is reduced to ink versus background: usually black ink on white, every pixel sorted into one or the other. This is what separates the writing from the parchment, stains, show-through from the other side of the leaf, and ruling lines. On a clean page a simple brightness threshold works. On a dark, damaged, or unevenly lit page it does not, and a bad binarization quietly throws away strokes or invents them.

Segmentation. The page is cut into individual signs, one crop per sign, so each can be measured on its own. This is the genuinely hard part. Signs touch, overlap, and break. A ligature joins two letters with a single stroke. A descender from the line above dips into the line below. A cracked letter falls into two pieces. Deciding where one sign ends and the next begins is often genuinely unclear, and there is no clean page-independent rule that gets it right.

Segmentation matters out of proportion to its glamour because segmentation errors propagate into every later measurement. If you crop two touching letters as one sign, every number you compute for that “sign” is measuring a thing that does not exist. Get the cutting wrong and nothing downstream can recover.

This is also why automatic handwriting recognition handles clean printed Latin script well and damaged, variable, non-Latin scripts poorly, which is exactly the material this kind of work involves. Printed type is regularly spaced and uniform, so segmentation is easy and the shapes are consistent. The manuscripts we care about are none of those things.

Discussion questions

From a shape to numbers

To compare two signs by computer, each has to become a list of numbers, a feature vector. A feature vector is just a row of measurements describing one thing, so that two things can be compared by comparing their rows. There are three broad ways to choose those numbers, from crudest to most sophisticated.

Raw pixels. Take the cropped, binarized sign, lay its pixels out in a fixed order, and read off the brightness of each. A 16×16 crop becomes 256 numbers. This is the simplest possible feature vector and the one the notebook starts with. It is easy and it works for a demonstration, but it is fragile: it treats the sign as a grid of dots with no idea that those dots form strokes, and it is extremely sensitive to position, size, and rotation.

Engineered features. Instead of raw pixels, measure things a paleographer might actually name: the height-to-width proportion, the number of strokes, the slant angle, how much ink sits in the top half versus the bottom, the curvature of the contour, statistical moments that summarize the overall distribution of ink. These are fewer numbers and more meaningful ones. They are designed by hand to capture what matters and ignore what doesn’t, so they tend to be steadier than raw pixels.

Learned features. A neural network can be trained to invent its own features from many labeled examples, finding the measurements that best separate the signs it was shown. These often outperform hand-designed features, but they need a lot of training data and they are harder to interpret. You get numbers that work without an easy account of what each one means.

Whatever the features, one step comes first: normalization. Pixel features are sensitive to rotation and size, so we normalize before comparing. If one scribe’s “a” is twice as tall, or sits in the corner of its crop, or leans ten degrees more, a raw comparison will call two identical shapes different, not because the shapes differ but because the framing does. Normalizing means centering each sign, scaling it to a standard size, and, where appropriate, correcting its rotation, so that the comparison is about shape and not about accidents of cropping. The notebook shows a normalization step lifting similarity scores between signs that were always the “same” shape.

Discussion questions

Similarity and distance

Once every sign is a feature vector, comparing two signs means comparing two rows of numbers. There are two standard ways to put a number on how alike they are.

The two can disagree, and which you choose changes the answer. The notebook computes both and shows where they diverge.

With a similarity (or distance) for every pair, a few standard moves follow:

A confusion is itself informative. When two archetypes get mixed up, the heatmap shows it as a bright patch off the diagonal, and that tells you which shapes your features can’t yet tell apart. The notebook builds a small confusion example so you can see this happen.

Discussion questions

HTR and the Isut Guesser

Handwritten text recognition (HTR) is the task of turning a page of handwriting into machine-readable text, the handwriting equivalent of OCR for printed books. A trained HTR model takes a manuscript image and outputs a transcription. The main tools are Transkribus and eScriptorium: you upload page images, correct a sample of transcriptions to train the model on your material, and it then transcribes the rest.

HTR does well on clean, consistent material and poorly on the hard cases. It transcribes a tidy printed Latin book or a uniform scribal hand with high accuracy. It struggles with damaged pages, highly variable hands, and non-Latin scripts, the same reasons segmentation struggles, plus a deeper one: a model only knows the shapes it was trained on, and for most historical and non-Latin scripts there is little training data. The material this field most wants to read is the material HTR finds hardest, which is why measuring shapes directly (rather than waiting for a full transcription) is often the more useful first move.

The Isut Guesser is one of those direct tools. You draw a sign and it returns the signs most similar to yours. Under the hood that is nearest-neighbors-on-shapes: your drawing becomes a feature vector, every sign in the collection is already a feature vector, and it ranks them by similarity and hands back the closest. It does not need to “read” anything or transcribe a page. Today’s notebook is a teaching-scale version of the same idea, built on made-up signs so the whole pipeline runs end to end before real images go in.

Discussion questions

Explore Isut

Open Isut’s Guesser, draw a sign, and see what it returns. Then look through the sign analysis view and find a sign whose shape clearly varies across texts.

For a worked version, the notebook’s last section loads real drawings of G17 (the owl) straight from the Isut data in the repository and shows the same sign in a dozen different hands. That is today’s whole point: one sign, no two scribes drawing it alike.

Discussion questions

Measure similarity

The notebook converts each sign image into numbers and scores every pair for similarity. Pick a sign and find its nearest matches by shape. Do they agree with your eye? Where they don’t, the disagreement tells you something about what the features actually capture. Then run the normalization step and the two distance metrics, add noise and watch the nearest-neighbor results degrade, and read off which archetypes get confused.