[liblouis-liblouisxml] Re: python and lou_hyphenate

  • From: Christian Egli <christian.egli@xxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 11 Feb 2010 11:09:09 +0100

Michael Whapples <mwhapples@xxxxxxx> writes:

> I forgot to mention the error messages are things like (this one is
> the last before I get told how many errors):
> File hyph_en_US.dic line 5537: character '2' should be defined at this
> point but is not
>
> The call I do on this python function is:
> louis.hyphenate(['hyph_en_US.dic'], 'internal', 0)

Ah, OK. I think I see the problem. For some reason (probably because
they use a different format) you cannot use the hyphenation table as a
translation table that you pass to lou_hyphenate. Instead the
translation table that you use must contain a "include hyph_en_US.dic"
statement. This should maybe be explained a bit better in the
documentation
(http://liblouis.googlecode.com/svn/documentation/liblouis.html#Hyphenation-Tables).

So what you should probably do is to extend the table you are using
(e.g. en-us-g2.ctb) with a "include hyph_en_US.dic" statement. Then try
your hyphenate function again.

HTH
Christian
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: