skip to navigation
skip to content

hyphenate 1.1.0

Determine hyphenation breaks in English words

Hyphenate, using Frank Liang’s algorithm.

This module provides a single function to hyphenate words. The hyphenate_word function takes a string (the word to hyphenate), and returns a list of parts that can be separated by hyphens. For example:

>>> from hyphenate import hyphenate_word
>>> hyphenate_word('hyphenation')
['hy', 'phen', 'ation']
>>> hyphenate_word('supercalifragilistic')
['su', 'per', 'cal', 'ifrag', 'ilis', 'tic']
>>> hyphenate_word('project')
['project']

This code, originally written by Ned Batchelder in July 2007, is in the public domain.

 
File Type Py Version Uploaded on Size
Hyphenate-1.1.0-py3-none-any.whl (md5, pgp) Python Wheel py3 2016-12-21 21KB
Hyphenate-1.1.0.tar.gz (md5, pgp) Source 2016-12-21 21KB