Awesome
clj-hyphenate
A Clojure implementation of Franklin M Liang's hyphenation algorithm. Patterns are automatically imported from Hyphenator.js.
Features
- Supports
433 languagesen-us
,en-gb
,fi
- Others may work. Some might not work as I left some special handling out.
Example uses
- Use with Boot and Enlive to hyphenate html files
- Implementation: https://github.com/Deraen/boot-hyphenate
- Output: http://deraen.github.io/hello-world/
Usage
(require '[clj-hyphenate.core :refer [hyphenate-word]]
'[clj-hyphenate.patterns.en-us :as en]))
user=> (hyphenate-word en/rules "associate")
"as-so-ciate"
user=> (hyphenate-word en/rules "hyphenation")
"hy-phen-ation"
License
Copyright © 2015 Juho Teperi
Distributed under the MIT License.
Patterns are imported from Hyphenator.js. Patterns should contain mention about their original source.