image thumbnail

Hyphenate

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

65 Downloads

Updated 16 May 2021

From 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 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 (2022). Hyphenate (https://github.com/DrosteEffect/Hyphenate/releases/tag/v2.0.3), GitHub. Retrieved .

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

Inspired: Image Manipulation Toolbox

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.