Fontlex German
The box below is a plain text box. The font colors each German noun by its gender,
so you see der, die and das while you read
and write. Edit the text, or paste your own.
blue masculine (der)red feminine (die)
green neuter (das)uncolored: not a noun, or the font isn't sure
How it decides
- German capitalizes nouns, so the font looks at capitalized words only.
- It knows 20,000 words and 12,292 word endings, learned from a gender-annotated
newspaper treebank and German Wiktionary. The longest matching ending decides: -ung makes
Zeitung feminine, and a compound takes the gender of its last part (der Haustürschlüssel).
- When a word has two genders (der/die See), is plural-only (Großeltern), or is an
adjective used as a noun (der/die Vorsitzende), the font leaves it uncolored rather than guess.
- Everything happens inside the font, as OpenType rules the browser's text engine runs. There is no
script on this page doing the coloring.
How accurate it is
| Text | Nouns colored | Colored correctly |
| 199 everyday nouns, labeled by hand | 97.5% | 100.0% |
| HDT test set: tech news, 1996–2001 (same source as the training data) | 97.1% | 99.5% |
| PUD: Wikipedia sentences (a different source) | 90.1% | 98.5% |
"Colored correctly" compares with the dataset's labels, which have errors of their own:
checking every wrong color in the Wikipedia set by hand found the font right in most of them, for a true
accuracy of about 99.5%. Measured with the font embedded in this page.
Limits
- It colors words, not sentences: a word with two meanings gets one color (Steuern are taxes,
die Steuer, but also the dative plural of das Steuer, a steering wheel).
- A capitalized word at the start of a sentence may not be a noun. Common ones are left uncolored.
- Names that are also nouns get the noun's color (Sommer).
- Needs an app that renders color fonts with OpenType features: current Chrome, Firefox and Safari do.
Data: Universal Dependencies German HDT (CC BY-SA 4.0) and German Wiktionary nouns via
github.com/gambolputty/german-nouns (CC BY-SA 4.0). Base font: JetBrains Mono (SIL Open Font License).