<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">> LuaTeX provides a “hyphenate” callback allowing to replace TeX's <br>> hyphenation routine (LuaTeX manual, p. 175).<br>> This callback is used by the luatexko and luavlna packages, which <br>> however do not use it for real hyphenation.<br>> I would like to get an idea how this callback can be used for hyphenation.<br>> Is there any known Lua implementation of TeX's or any other hyphenation <br>> algorithm?<br>> What is the preferred way to access the hyphenation patterns within Lua?<br></div><div dir="ltr"><br></div><div>I don't think replacing the internal hyphenation algorithm is a good idea,</div><div>mainly for efficiency reasons. Not as a replacement of the hyphenation</div><div>algorithm, but as a complement, babel provides \babelposthyphenation,</div><div>to deal with non-standard hyphenation. See:</div><div dir="ltr"><div><br></div><div><a href="https://github.com/latex3/babel/wiki/Non%E2%80%93standard-hyphenation-with-luatex" target="_blank">https://github.com/latex3/babel/wiki/Non%E2%80%93standard-hyphenation-with-luatex</a><br></div><div><br></div><div>It's also used  by babel for CJK and southeast Asian line breaking.</div><div><br></div><div>Javier</div></div></div>
</div></div>