[luatex] get the hyphenation patterns matching a word

Stephan Hennig mailing_list at arcor.de
Tue Feb 23 21:15:59 CET 2010


Am 23.02.2010 17:15, schrieb Taco Hoekwater:
> Stephan Hennig wrote:
>>
>> Are there any plans to replace libhnj by a pure Lua implementation?  As
>> long as hyphenation is hard-coded in C, it remains a black box for the
>> LuaTeX user.
>
> But it is a reasonably fast black box. :)

Sure.  But I wonder what impact hyphenation has on runtime in comparison 
to paragraph breaking.


> I am not eager to recode hyphen.c into lua, it uses a lot of C trickery.

I can't judge if that trickery qualifies as dirty or ingenious 
programming. ;-)

I haven't found much about libhnj's finite state hash approach, so I 
have to ask here: Is that something else than an automaton that is the 
result of pre-calculating all states the /list/ of tries can ever take 
on for arbitrary (word) input?  What about the hashes?  Any pointers?

To me, it sound like Lua's tables are just made for automata (but who am 
I?).  I don't want to push you re-writing existing code.  Actually, I'm 
considering doing that myself (for various reasons)).  So, an honest 
question: Is there anything that makes implementing the finite state 
hash approach hard in Lua (other than performance)?

Best regards,
Stephan Hennig


More information about the luatex mailing list