File Exchange

image thumbnail

Hyphenate

version 1.1.0 (32.1 KB) by Stephen Cobeldick
Word hyphenation using Franklin Mark Liang's algorithm (aka Knuth-Liang algorithm). Used in TeX.

6 Downloads

Updated 08 Jan 2020

GitHub view license on GitHub

Word hyphenation using Franklin Mark Liang's algorithm (aka Knuth-Liang algorithm). As used by Knuth in TeX and LaTeX, and ported to many other languages.
HYPHENATE provides a function to hyphenate words. HYPHENATE takes the word, and returns the parts that can be separated by hyphens.

### Examples ###

>> hyphenate('hyphenation')
ans =
'hy' 'phen' 'a' 'tion'

>> hyphenate('supercalifragilisticexpialidocious')
ans =
'su' 'per' 'cal' 'ifrag' 'ilis' 'tic' 'ex' 'pi' 'ali' 'do' 'cious'

>> hyphenate('project')
ans =
'project'

### Note ###

I just ported this algorithm to MATLAB, but am not responsible for it deciding where it splits words.

Cite As

Stephen Cobeldick (2020). Hyphenate (https://www.github.com/DrosteEffect/Hyphenate), GitHub. Retrieved .

Comments and Ratings (0)

Updates

1.1.0

* Add Barbara Beeton's exceptions.

1.0.0.0

* Fixed tags

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux