Custom Alphabets
Use a custom alphabet when the built-in choices keep too much punctuation or exclude characters you want to measure. For example, to count straight and curly apostrophes together in words such as “don’t,” keep the straight apostrophe and map the curly one to it.
Choose a Custom Alphabet
Section titled “Choose a Custom Alphabet”Choose New alphabet from the corpus chooser. In Edit, give the alphabet a name, enter its TOML, and save. Then choose it in the Alphabet field for a plain or counted corpus and choose Apply. An alphabet changes how the analysis reads the sample; it does not change the source text or add keys to the layout. Annotated corpora use the exact characters in each input form instead.
Alphabet Fields
Section titled “Alphabet Fields”| Field | Purpose |
|---|---|
schema_version | Required. Use 1. |
name | Required. Nonempty name shown in the chooser. |
description | Optional text describing the retained characters. |
characters.graphemes | Required array of distinct characters. The word separator is handled separately. |
characters.lowercase | Required. Set to true to retain lowercase forms of the listed characters or false to retain case as listed. |
Character Substitutions
Section titled “Character Substitutions”To count straight and curly apostrophes as the same character, save this alphabet and apply it to a sample containing “don’t” and “don’t”:
schema_version = 1name = "Apostrophe comparison"description = "Preserves letters in don't and folds curly apostrophes into straight ones."
[characters]graphemes = ["d", "o", "n", "t", "'"]lowercase = false
[characters.normalization]"’" = "'"| Field | Purpose |
|---|---|
characters.normalization | Optional table. Each key is one input character; each value is one retained character. The editor applies each substitution once. Neither a retained character nor the word separator can be remapped. |
This small alphabet illustrates the rule with “don’t” and “don’t”. For prose, list the other letters and punctuation you want to retain. A custom uploaded line or counted entry is excluded as a whole if it still contains a character outside the alphabet after normalization.