1 unstable release
0.1.0 | Oct 30, 2023 |
---|
#1871 in Text processing
45KB
1K
SLoC
cologne_phonetics
Crate to generate phonetic cologne codes for utf8 strings.
For more information see https://en.wikipedia.org/wiki/Cologne_phonetics
Roadmap
[ ] Support more unicode characters
[ ] Add more tests/fuzzing with defined corpi
lib.rs
:
Implementation of cologne codes or "Kölner Phonetik" see https://en.wikipedia.org/wiki/Cologne_phonetics for more information.
This crate is mainly used by either calling utf8_to_cologne_phonetics_vec
or preferably creating
a CologneVec
and using its read_from_utf8
function.
Example
let mut buf = CologneVec::new();
buf.read_from_utf8("Marius Macher".as_bytes());
assert_eq!(buf, CologneVec::from_codes(&[
CologneCode::Class6,
CologneCode::Class7,
CologneCode::Class8,
CologneCode::Space,
CologneCode::Class6,
CologneCode::Class4,
CologneCode::Class7,
]))