Expand description

hypher separates words into syllables.


  • All-inclusive: Hyphenation patterns are embedded into the binary as efficiently encoded finite automata at build time.
  • Zero load time: Hyphenation automata operate directly over the embedded binary data with no up-front decoding.
  • No allocations unless when hyphenating very long words (>= 39 bytes). You can disable the alloc feature, but then overly long words lead to a panic.
  • Support for many languages.
  • No unsafe code, no dependencies, no std.


use hypher::{hyphenate, Lang};

let mut syllables = hyphenate("extensive", Lang::English);
assert_eq!(syllables.join("-"), "ex-ten-sive");


By default, this crate supports hyphenating more than 30 languages. Embedding automata for all these languages will add ~1.1 MiB to your binary. Alternatively, you can disable support for all languages and manually choose which ones get added:

hypher = { version = "0.1", default-features = false, features = ["english", "greek"] }


An iterator over the syllables of a word.


A language you can hyphenate in.


Segment a word into syllables.
Segment a word into syllables, but forbid breaking betwen the given number of chars to each side.