[liblouis-liblouisxml] Re: Update output positions during multi pass (forward translation only)

  • From: "Arend Arends" <mada73bg@xxxxxxxxxx>
  • To: <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Sun, 1 Nov 2015 10:47:03 +0100

Hi Susan,

The array for the output positions gives extra information that cannot be derived from the input positions.
Bert Frees gave the example:
input: "100"
outputPos: [1,2,3]
output: "#ajj"
inputPos: [0,0,1,2]

The first position in outputPos points to the output character at position 1, not zero, so it skips the braille indicator. If this was the result of a contraction rule (replacement), it would point to position zero.

Arend

-----Oorspronkelijk bericht----- From: Susan Jolly
Sent: Saturday, October 31, 2015 5:21 PM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] Re: Update output positions during multi pass (forward translation only)

I think all you need is what you call inputPos along with the input and
output. I don't think you need outputPos.

inputPos: [0,0,1,2]

The zero-based positions in the inputPos array reference the zero-based
positions in the braille output and the corresponding values in the same
array are the zero-based positions in the print input.

In this example the braille cells at positions zero and one in the braille
output translate the print at position zero; the braille cell at position
two in the braille translates the print at position 1; and the braille cell
at position three translates the print at position two.

HTH
SusanJ

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: