<div dir="ltr"><font face="arial, helvetica, sans-serif">I'm guessing the bad "p-neu-mo-ni-a" may be caused by missing support for LEFTHYPHENMIN and RIGHTHYPHENMIN in the implementation used.</font><div><font face="arial, helvetica, sans-serif">From the top of my head, these are both atleast 2 for english.<br></font><div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><font face="arial, helvetica, sans-serif"><span style="font-size:13px;background-color:rgb(255,255,255)">kind regards,</span><br style="font-size:13px;background-color:rgb(255,255,255)"><span style="font-size:13px;background-color:rgb(255,255,255)">Martijn van der Lee (developer of the phpSyllable implementation for PHP at </span><a href="https://github.com/vanderlee/phpSyllable">https://github.com/vanderlee/phpSyllable</a></font><span style="font-size:13px;font-family:arial,helvetica,sans-serif">).</span></div></div></div></div>
<br><div class="gmail_quote">2015-07-29 10:07 GMT+02:00 Philip Taylor <span dir="ltr"><<a href="mailto:P.Taylor@rhul.ac.uk" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=P.Taylor@rhul.ac.uk&cc=&bcc=&su=&body=','_blank');return false;">P.Taylor@rhul.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
Yuri wrote:<br>
<br>
> When I am looking at the algorithm results, I keep seeing a lot of<br>
> inconsistencies.<br>
><br>
> Original hyphen.tex has some testcases in the end, that are supposedly<br>
> the correct hyphenation points:<br>
<br>
</span>No, these are not test cases; they are explicit hyphenations (i.e.,<br>
exceptions) that correct the results that would otherwise be obtained<br>
using only the patterns.<br>
<span class=""><br>
> But when I run the algorithm with patterns from hyphen.tex, I get these<br>
> results:<br>
> as·so·ci·ate<br>
> as·so·ci·ates<br>
> de·cli·na·tion<br>
> obli·ga·to·ry<br>
> phi·lan·throp·ic<br>
> p·re·sen·t<br>
> p·re·sents<br>
> pro·jec·t<br>
> pro·ject·s<br>
> re·ciproc·i·ty<br>
> rec·og·nizance<br>
> re·for·ma·tion<br>
> re·tri·bu·tion<br>
> table<br>
<br>
</span>Yes, that is exactly the point.  Those words are known to be hyphenated<br>
incorrectly using the patterns alone, whence the list of exceptions.<br>
<span class=""><br>
> Available correct answers from the Merriam-Webster dictionary:<br>
> as·so·ci·ate<br>
> dec·li·na·tion<br>
> oblig·a·to·ry<br>
> phil·an·throp·ic<br>
> pres·ent<br>
> proj·ect<br>
> rec·i·proc·i·ty<br>
> re·cog·ni·zance<br>
> ref·or·ma·tion<br>
> ret·ri·bu·tion<br>
> ta·ble<br>
<br>
</span>TeX gives these break-points for your word list :<br>
<span class=""><br>
as-so-ciate<br>
as-so-ciates<br>
dec-li-na-tion<br>
oblig-a-tory<br>
phil-an-thropic<br>
present<br>
presents<br>
project<br>
projects<br>
reci-procity<br>
re-cog-ni-zance<br>
ref-or-ma-tion<br>
ret-ri-bu-tion<br>
ta-ble<br>
<br>
</span>Thus there are differences, but it is quite possible that Don Knuth did<br>
not use Merriam-Webster as his authoritative source for hyphenation in<br>
<Am.E>.<br>
<span class=""><br>
> Additionally, the produced "gen·uine" hyphenation split isn't correct<br>
> (should be " gen·u·ine"), the word "toothache" isn't split at all, and<br>
> "p·neu·mo·ni·a" result is wrong too (should be " pneu·mo·nia").<br>
<br>
</span>TeX<br>
This is TeX, Version 3.14159265 (TeX Live 2014/W32TeX) (preloaded<br>
format=tex)<br>
**\showhyphens {genuine toothache pneumonia}<br>
<br>
gen-uine toothache pneu-mo-nia<br>
<br>
Thus "pneumonia" is hyphenated correctly, "genuine" arguably so<br>
(depending on whether or not one regards the "u" as syllabic) and<br>
"toothache" is indeed wrong.<br>
<span class="HOEnZb"><font color="#888888"><br>
Philip Taylor<br>
</font></span></blockquote></div><br></div></div></div></div>