[liblouis-liblouisxml] Re: Hyphenation

  • From: Bert Frees <bertfrees@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 7 Jun 2012 22:20:07 +0200


On 1-jun-12, at 11:57, Christian Egli wrote:

Michael Whapples <mwhapples@xxxxxxx> writes:

[...] One question, is there any case in Braille where a hyphen could be
mid-contraction and so alter the Braille cells output? Might the
hyphenated word need retranslating?

I think there is for some languages. Apparently it is so for German, but
this rule must be optional as we do not follow it. But I'm told that
also for English the word needs to be retranslated if it is hyphenated.
I don't know if liblouis is currently able to handle this use case.

If this would ever become an important requirement, liblouis would have to be able to give you the translations for all possible combinations of break points. This is obviously not something trivial to implement, but I think it is feasable. I realised that the problem of hyphenation-dependent braille transcription is very related to the problem of "non-standard" (of normal text) in languages such as German, Dutch and Czech.

Because the number of possible translations increases exponentially with the number of possible break points and thus with the length of the text, it is not possible to output them all in some sort of a list. libhyphen tackles this problem by telling you, for each break position that causes a "non-standard" hyphenation, which part of the original word changed, and how it looks like after hyphenating. In other words, you only get the "diffs" for individual break points, and this only increases linearly with the length of the string.

In practice (for libhyphen), this results in 3 additional output arrays besides the "hyphenPositions" array. But IMO it could be simplified to only 1 additional array.

Anyway, let's first manage to do normal hyphenation properly before commiting to anything this complicated :)

Regards,
Bert


For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: