
pyhyphen
PyHyphen is a wrapper for the Python programming language around the Open Source C library 'libhyphen' originally from hnjlib. It is widely used in software such as OpenOffice.org and Mozilla.
{{{Code example:
from hyphen import hyphenator h = hyphenator('en_US') # this language is the default value; it can thus be omitted h.pairs('hyphenation') [[u'hyphen', u'ation'], [u'hy', u'phenation']] h.inserted('hyphenation') u'hy=phen=ation' h.wrap('hyphenation', 7) [u'hyphen-', u'ation']
Example of non-standard hyphenation from Hungarian:
hyphenator('hu_HU').pairs('asszonnyal') [[u'asszony', u'nyal'], [u'asz', u'szonnyal']] }}}
Project Information
- License: GNU GPL v2
- 7 stars
- hg-based source control
Labels:
Python
Textprocessing
hyphenation