Skip to content

surculus12/py-hyphen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

py-hyphen

Implementation of knuth-liang

Usage

Object can either be instantiated with an iso-valid language code (at which point the pattern file will be fetched) or with a relative path to a language file.

Example

from hyphen import Hyphen
hyphenator = Hyphen(lang_code='en-us')
hyphenator.hyphenate_word('Floccinaucinihilipilification')
# out: 'Floc-cinau-cini-hilip-il-i-fi-ca-tion'
hyphenator.hyphenate_word('geographical')
# out: 'ge-o-graph-i-cal'

About

Hyphenation algorithm based on knuth-liang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages