Crate spellabet

source ·
Expand description

§Spelling Alphabet

A Rust library for transforming text strings into corresponding code words based on predefined spelling alphabets, like the NATO phonetic alphabet. These alphabets are designed to enhance verbal clarity, especially when spelling out words over low-fidelity voice channels. This library supports several standard alphabets and allows for customization to suit specific communication needs.

In operation, spellabet preserves the original capitalization of letters by returning either lowercase or uppercase code words. It similarly converts known digits and other symbols into code words, while unrecognized characters are returned unconverted.

This library powers the command line utility spellout, which provides a handy interface for phonetic conversions. Check out spellout on GitHub for more information.

§Example

use spellabet::{PhoneticConverter, SpellingAlphabet};

let converter = PhoneticConverter::new(&SpellingAlphabet::Nato);
println!("{}", converter.convert("Example123!"));
ECHO x-ray alfa mike papa lima echo One Two Tree Exclamation

Structs§

Enums§