Pular para o conteúdo

Custom Alphabets

Este conteúdo não está disponível em sua língua ainda.

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 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.

FieldPurpose
schema_versionRequired. Use 1.
nameRequired. Nonempty name shown in the chooser.
descriptionOptional text describing the retained characters.
characters.graphemesRequired array of distinct characters. The word separator is handled separately.
characters.lowercaseRequired. Set to true to retain lowercase forms of the listed characters or false to retain case as listed.

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 = 1
name = "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]
"’" = "'"
FieldPurpose
characters.normalizationOptional 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.