Re: [orca-list] orca and liblouis




On 12/25/20 2:29 PM, Alexander Epaneshnikov wrote:
I suppose you could also try manually translating a string in Python
to confirm that it works there.

I tried to do it, but I can't. maybe I just don't know python well.
can you, or someone else give me the code?

import louis

tables=["unicode.dis", "en-us-g2.ctb"]

louis.translateString(tables, "This is a test.")


Substitute your preferred translation table for en-us-g2.ctb (they're in /usr/share/liblouis/tables), and you'll need to be in uncontracted mode to check the output, which is in Unicode braille (0x2800-0x28ff).

I don't know whether you need any additional table files other than the main table in order to get correct Cyrillic translation. The input string should be UTF-8.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]