Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Syllabification
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Algorithm== {{unsolved|computer science|Is there any perfect syllabification algorithm in English language?}} A '''hyphenation algorithm''' is a set of rules, especially one codified for implementation in a computer program, that decides at which points a word can be broken over two lines with a hyphen. For example, a hyphenation algorithm might decide that ''impeachment'' can be broken as ''impeach-ment'' or ''im-peachment'' but not ''impe-achment''. One of the reasons for the complexity of the rules of word-breaking is that different dialects of English tend to differ on hyphenation: [[American English]] tends to work on sound, but [[British English]] tends to look to the origins of the word and then to sound.{{Citation needed|date=November 2017}} There are also a large number of exceptions, which further complicates matters.{{Citation needed|date=November 2017}} Some rules of thumb can be found in the Major Keary's "On Hyphenation β Anarchy of Pedantry."<ref>{{cite web |title=On Hyphenation - Anarchy of Pedantry |work=PC Update |last=Major Keary |publisher=Melbourne PC User Group |url= http://www.melbpc.org.au/pcupdate/9100/9112article4.htm |access-date=6 October 2005 |url-status=dead |archive-url= https://web.archive.org/web/20050310054738/http://www.melbpc.org.au/pcupdate/9100/9112article4.htm |archive-date=10 March 2005}}</ref> Among the [[algorithm]]ic approaches to hyphenation, the one implemented in the [[TeX|TeX typesetting system]] is widely used. It is thoroughly documented in the first two volumes of ''[[Computers and Typesetting]]'' by Donald Knuth and in Franklin Mark Liang's dissertation.<ref>{{cite thesis |last=Liang |first=Franklin Mark |url= http://www.tug.org/docs/liang/ |title=Word Hy-phen-a-tion by Com-pu-ter |type=PhD |publisher=Department of Computer Science, [[Stanford University]] |id=STAN-CS-83-977 |date=August 1983}}</ref> The aim of Liang's work was to get the algorithm as accurate as possible and to keep exceptions to a minimum. In TeX's original hyphenation patterns for American English, the exception list contains only 14 words.<ref>{{cite web |title=The Plain TeX hyphenation tables |url=https://mirrors.ctan.org/info/digests/tugboat/hyphenex/tb0hyf.pdf |access-date=23 June 2009}}</ref> === In TeX === Ports of the TeX hyphenation algorithm are available as libraries for several programming languages, including [[Haskell (programming language)|Haskell]], [[JavaScript]], [[Perl]], [[PostScript]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[C Sharp (programming language)|C#]], and TeX can be made to show hyphens in the log by the command <code>\showhyphens</code>. In [[LaTeX]], hyphenation correction can be added by users by using: <pre>\hyphenation{words}</pre> The <code>\hyphenation</code> command declares allowed hyphenation points in which words is a list of words, separated by spaces, in which each hyphenation point is indicated by a <code>-</code> character. For example, <pre>\hyphenation{fortran er-go-no-mic}</pre> declares that in the current job "fortran" should not be hyphenated and that if "ergonomic" must be hyphenated, it will be at one of the indicated points.<ref>{{cite web |url= http://noodle.med.yale.edu/latex/latex2e-html/ltx-244.html |title= \hyphenation |work= Hypertext Help with LaTeX |publisher= Yale Image Processing and Analysis Group |first1=Sheldon |last1=Green |date=5 Jun 1995 |url-status=live |archive-url=https://web.archive.org/web/20231127043725/http://noodle.med.yale.edu/latex/latex2e-html/ltx-244.html |archive-date= Nov 27, 2023 }}</ref> However, there are several limits. For example, the stock <code>\hyphenation</code> command accepts only [[ASCII]] letters by default and so it cannot be used to correct hyphenation for words with non-ASCII characters (like ''Γ€'', ''Γ©'', ''Γ§''), which are very common in many languages. Simple workarounds exist, however.<ref>{{cite web |url= https://texfaq.org/FAQ-hyphenaccents |title=Accented words aren't hyphenated |work=TeX FAQ |url-status=live |archive-url=https://web.archive.org/web/20231128190033/https://texfaq.org/FAQ-hyphenaccents |archive-date= Nov 28, 2023 }}</ref><ref>{{cite web |url= https://texfaq.org/FAQ-hyphen |title=How does hyphenation work in TeX? |work=TeX FAQ |url-status=live |archive-url= https://web.archive.org/web/20231127043729/https://texfaq.org/FAQ-hyphen |archive-date= Nov 27, 2023 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)