semfont is a small library that sets typography automatically. As you can see below it automatically highlights, colors, bolds, and italicizes text which aims to make it easier to read. theme editorial loud monochrome technical How it works Every word gets four scores. Each one starts as a dictionary lookup and is then adjusted by a couple of rules over the words around it. Valence is how good or bad the word is, from -1 to 1. A negator up to three words back flips the sign and damps it, because not great is a mild complaint rather than the mirror image of praise. An intensifier up to two words back scales it instead. let v = VALENCE[word] ?? 0; // great -> 0.75 if (negatorWithin(3)) v = -v * 0.74; // not great -> -0.55 v *= gain; // really great -> 0.98 Salience is how much the word is worth looking at, 0 to 1. A frequency list gives each word a rarity, 0 for one of the hundred most common English words and 1 for one it has never seen.…