Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deraen/clj-hyphenate
https://github.com/deraen/clj-hyphenate
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/deraen/clj-hyphenate
- Owner: Deraen
- License: other
- Created: 2015-06-21T13:51:22.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-18T19:12:49.000Z (about 8 years ago)
- Last Synced: 2024-10-07T17:49:34.934Z (about 1 month ago)
- Language: Clojure
- Size: 640 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-hyphenate [![Circle CI](https://circleci.com/gh/Deraen/clj-hyphenate.svg?style=shield)](https://circleci.com/gh/Deraen/clj-hyphenate) [![codecov.io](http://codecov.io/github/Deraen/clj-hyphenate/coverage.svg?branch=master)](http://codecov.io/github/Deraen/clj-hyphenate?branch=master)
[![Clojars Project](http://clojars.org/deraen/clj-hyphenate/latest-version.svg)](http://clojars.org/deraen/clj-hyphenate)
A Clojure implementation of [Franklin M Liang's hyphenation algorithm][2].
Patterns are automatically imported from [Hyphenator.js][1].## Features
- Supports ~~43~~ 3 languages
- `en-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
```clj
(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][1]. Patterns should contain
mention about their original source.[1]: http://mnater.github.io/Hyphenator/
[2]: http://www.tug.org/docs/liang/