Stephan Hennig wrote:
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.

Not a lot, that is true.

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?

That's pretty much what it does, yes. There is a severe lack of
documentation, though. I recall seeing a set of slides explaining
the algorithm, but I can't find it on the web any more.

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)?

No, it should be reasonably straightforward. Ok, as I have some time to
spare today, I'll have a go at it (I got stuck in metapost anyway, and
can use a bit of distraction).

Best wishes,
Taco

Reply via email to