[liblouis-liblouisxml] Re: Bug in en-us-g2.ctb

  • From: Michael Gray <mgray@xxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Tue, 14 Apr 2015 19:18:09 +0000

I have traced the problem to the last entry in the en-us.g1.ctb table:
pass2 @3-56 @3

Removing this from the table will deal with the "r'S n" issue for now until I
get a chance to find a more permanent solution.

MRG
mgray@xxxxxxx
________________________________________
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] on behalf of Michael Whapples
[dmarc-noreply@xxxxxxxxxxxxx]
Sent: Tuesday, April 14, 2015 12:00 PM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Bug in en-us-g2.ctb

Well, the point still stands as your output positions for en-us-g2.ctb
are still wrong.

Also try a string of three hyphens:
---

This should also lead to an invalid output positions array with
en-us-g2.ctb.

The common thing I can find for both of these examples is that a pass2
opcode rule removes a Braille cell.

Michael Whapples

On 14/04/2015 15:11, Michael Gray wrote:

To clarify, I got the following with the en-us-g2.ctb table:
r'S n
Translation:
r',s n
Output positions:
0 1 4 5 6
Input positions:
0 1 2 2 3 4

and with the en-ueb-g2.ctb table:
r'S n
Translation:
;r',s ;n
Output positions:
1 2 4 5 7
Input positions:
0 0 1 2 2 3 4 4

MRG
mgray@xxxxxxx
________________________________________
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx
[liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] on behalf of Michael Whapples
[dmarc-noreply@xxxxxxxxxxxxx]
Sent: Tuesday, April 14, 2015 5:21 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Bug in en-us-g2.ctb

Further to this, I now think it is more general to pass2 rules. It seems
like pass2 rules do not correct output positions.

The following example also leads to an invalid output positions array.
Tables:
en-us-g2.ctb
Input:
---p
Translation:
--;p
Output positions:
0 1 2 4
Input positions:
0 0 3 3

I have not tested to see whether a pass2 which increases the length also
has similar issues.

Michael Whapples

On 14/04/2015 10:02, Michael Whapples wrote:
Hello,
I have discovered a bug in en-us-g2.ctb where outputPos has incorrect
values.

The original phrase which highlighted this issue was:
ONLINE WRITER'S NOTEBOOK

The problem seems to be around the 'S where the outputPos seems to
imply an additional Braille cell to what is actually in the translation.

I have reduced this to the following example and what LibLouis reports
for the index arrays.
tables:
en-us-g2.ctb
Input:
r'S n
Translation:
r',s ;n
Output positions:
0 1 4 5 7
Input positions:
0 1 2 2 3 4 4

The output positions are not consistant with the other values LibLouis
is calculating and this leads to the last index in the output
positions being invalid.

Michael Whapples
For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org

For a description of the software, to download it and links to
project pages go to http://liblouis.org
For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts: