tetrak_translit.registry

The scripts this package handles, and how to find the one a string is in.

A script package exports four names – SCRIPT, SCHEMES, fold_token and variant – and is registered here. Everything above this module (detection, transliteration, the fold, the command line) goes through the registry and never names a script directly, which is what keeps a new script a matter of adding a package.

Module Attributes

PACKAGES

Every registered script, by key, in documentation order.

SCHEMES

Every scheme across every script, by fully qualified id ("hy/ala_lc").

Functions

get_scheme(scheme[, script, text])

Resolve a scheme by key, choosing the script it belongs to.

get_script(script)

Resolve a script key ("hy"), name ("Armenian") or Script.

scripts_in(text)

The registered scripts whose letters occur in text, in registry order.

Classes

ScriptPackage(script, schemes, fold_token, ...)

What one script package contributes.

Exceptions

UnknownSchemeError

Raised when a scheme key names no table, or names tables in several scripts.

UnknownScriptError

Raised when a script key or name names no registered script.