skip to content

Commons

What the pieces are made with, set loose on its own. Engines, models and data, each with its code and its licence, some still being made. Take them, use them, build on them.

2 entries · an engine and a model

jkstep · enteropen · or click a row

08.1 Dastkhat دست‌خط engine

Persian, written out by hand, stroke by stroke

An engine that writes typed Persian out again as a pen would, right to left, at the speed a hand moves. Each word is shaped in nasta'liq or naskh, each letter thinned to the single line a pen would take, and the pen's ink pools where it slows. Two hands, each measured against real letters: a Qajar reed and a fine modern pen. It writes whole letters, and it writes back: type a reply and each word is written once it is finished, and a word taken back is crossed out, never erased.

what's inside

  • Shaping with HarfBuzz: joining forms, lām-alef, where the dots and marks sit
  • Single-line skeletons for every letter of Noto Nastaliq Urdu and Vazirmatn, repaired by hand where the tracing goes wrong
  • Two hands, a reed and a fine pen, and a seed that makes no two pages alike
  • An ink model after Rafael Cespedes's If This Finds You
status
In use, still being refined
used by
06.6 What the Hand Gives Back
stack
TypeScript · HarfBuzz (WASM) · Canvas
credits
Noto Nastaliq Urdu and Vazirmatn (SIL Open Font License) · ink after If This Finds You (MIT)
licence
Code: MIT. The piece, 06.6: CC BY 4.0. Fonts and ink keep their own terms.
code
github.com/hamedyaghoobian/dastkhat
Code
08.2 KharchangGPT خرچنگ trainingmodel

A Persian PenGPT, named for the scrawl it is trying to grow out of

Dastkhat writes from a font; KharchangGPT learned from people. Its name comes from khat-e kharchang-ghoorbaghe, خط خرچنگ‌قورباغه, crab-frog writing: what every Persian teacher has called a pupil's illegible scrawl, and what a model's first pages look like. It is a small transformer after Sam Greydanus's PenGPT, trained on the pen-tip paths of a few hundred Persian writers on tablets and screens. Given a word and a writer, it writes the word as that writer might have: their stroke order, where their dots fall, how their letters join. It writes words, numbers and sums, and short sentences word by word.

so far

  • About 49,000 handwritten Persian words from 236 writers, including words cut from whole handwritten paragraphs and checked by the model itself
  • Numbers and sums, with more ×, ÷, + and = made from the writers' own strokes
  • Tested on writers it has never seen
status
Training. The code is open; the trained weights are not released yet, while the licence of the training data is settled.
model
8.8 million parameters, small enough to run in a browser
after
Sam Greydanus, PenGPT, of which it is a fork
licence
Apache 2.0, as PenGPT. The training data keeps its own terms.
code
github.com/hamedyaghoobian/kharchanggpt
Code