[liblouis-liblouisxml] Re: SV: Re: SV: testing my changes on table

  • From: James Bowden <James.Bowden@xxxxxxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Mon, 23 Mar 2020 14:41:48 +0000

Hello Ikrami,

Further to what Bue has written:

One way I found you can get a starting point is to run lou_translate and add 
Unicode.dis as the first translation table. This will then output Unicode 
braille characters instead of your local encoding.

If your test file has one word per line, then your output will also have one 
word per line.

So, load both of these into say, Excel (just copy/paste might work).

Then, if you select all and copy out to, say, Microsoft Word, then you get a 
Tab character between the two columns. A bit like this, for example:

card[Tab]⠉⠜⠙[nl]

[tab] represents the actual Tab character and[nl] represents a new line.

Now, use some search and replace in Word:

Replace ^t with , (comma space)
Replace ^p with ]^p  - [  (that is right square bracket, new line, space, 
space, hyphen, space, left square bracket).

You might have to tidy up the beginning and end of the file. Finally, add the 
header to the test (see other YAML files).

Finally, save as a plain text and rename as YAML.
If necessary, copy/paste to Notepad++ to make sure the Unicode encoding is all 
good.

No short cut to proof reading the output, that's manual because you have to 
check it is accurate.

I trust this all helps.

With best regards,

James.


-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Bue ;
Vester-Andersen
Sent: 22 March 2020 14:05
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] SV: Re: SV: testing my changes on table

Hello Ikrami,

 

You wrote:

If I got a large Arabic document and wanted to convert it to be used as a yaml 
test, how can I do this? It will be difficult to manually type every word in 
Unicode braille.

 

I agree. Use a dictionary type document with one word on each line, and let the 
current version of Liblouis make the translation for you. The difficult part is 
to merge the text document and the translation into a yaml file. That is where 
I use a Python script. I don’t know how other people make their dictionary 
tests. The primary purpose of the dictionary tests is to establish a base line 
to work from.

 

Also how can I find out the mistakes or the problematic parts? The results of 
the tests I mean.

 

You could proof-read with a Braille display or search for suspicious words in 
an editor like Notepad++. However, most of the time, I use the dictionary tests 
to ensure against regressions. If you add a rule or a hyphenation pattern to 
solve a problem, it is very easy to introduce new errors. The yaml tests will 
show you what has changed, both from wrong to right and from right to wrong.

 

Another question, how can I use the luTrace tool? Is their documentation 
somewhere? Is it a command line application?

 

All the tools are documented in the Liblouis documentation, and yes, they are 
all command line tools. That also applies to the lou_checkyaml program, which 
is used to run yaml tests from the command line. In my opinion, the best way to 
go about it is to learn the Bash Linux shell and then install the “Ubuntu on 
Windows” feature. Then, you will have access to all the Linux command line 
tools, including the Liblouis test tools, and you can still use Windows 
Explorer and whatever Windows editor you like best.

Also, I use Python scripts for a lot of things, e.g. enhancing my word corpus 
from new documents and making new yaml tests from the new corpus.

 

Yes, I agree, it shouldn’t be necessary to be a programmer or to know one in 
order to work with Liblouis tables. Perhaps some of the more useful scripts 
could be converted into C programs and distributed along with the other 
Liblouis test tools.

 

Bue

 

Fra: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
<liblouis-liblouisxml-bounce@xxxxxxxxxxxxx> På vegne af ikrami.ahmad@xxxxxxxxx
Sendt: 22. marts 2020 11:47
Til: liblouis-liblouisxml@xxxxxxxxxxxxx
Emne: [liblouis-liblouisxml] Re: SV: testing my changes on table

 

Thank you for your response.

If I got a large Arabic document and wanted to convert it to be used as a yaml 
test, how can I do this? It will be difficult to manually type every word in 
Unicode braille.

Also how can I find out the mistakes or the problematic parts? The results of 
the tests I mean.

Another question, how can I use the luTrace tool? Is their documentation 
somewhere? Is it a command line application?

Thanks

 

 

From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
<mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx>  
<liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
<mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx> > On Behalf Of Bue 
Vester-Andersen
Sent: Sunday, March 22, 2020 1:27 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx 
<mailto:liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] SV: testing my changes on table

 

Hello Ikrami,

 

I would say that the most important thing is to have good yaml tests before you 
start modifying the tables.

 

For each grade, you should have a yaml file containing the following tests:

1.      All characters defined by the table, both directly and indirectly.
2.      All the main features of the table, e.g. contractions, computer Braille 
vs. literary Braille, the more the better.
3.      Special features and issues that you have encountered during the 
development, e.g. problematic combinations of characters etc., the more the 
better.

 

Remember to test in both directions if your table supports both directions. If 
some features are meant to only work in one direction, test them in this 
direction.

 

Even if you know that something is currently failing, make the relevant tests 
and mark them with xfail: true. The more things you test this way the better.

 

Also, for each grade, especially grade 2, you should have a dictionary test, 
the bigger the better.

The ideal thing would of course be to only have “known to be good” Braille 
translations in the dictionary test, but it is really more important to have a 
base line to work from, no matter if the test actually contains some wrong 
translations to start with. When you make changes to your table, you can then 
see what problems you have solved, and also see if you have introduced new 
problems, which is very likely when one changes the details of a grade 2 table.

 

You need to get a good corpus of words for your dictionary tests, again, the 
bigger the better. One possibility is the Aspell dictionary for your language. 
You could use the full dictionary for internal testing and make an excerpt to 
go with the Liblouis package, e.g. every 10th word in the original corpus.

 

It can be a challenge to make a yaml file from a text file containing many 
thousand words. You don’t want to enter the tests manually. I don’t know how 
others have solved this, but for my own part, I made a quick and dirty Python 
script to make a yaml file from a text file and its current translation with 
Liblouis. Other suggestions for this problem would be welcome.

 

Like you, I have used the NVDA Unicode Braille input plug-in for entering 
Braille in my test files, but lately, I have started using a quicker method. 
There is another plug-in called PC Keyboard Braille input, which is used to 
enter Braille through the keys on the home row of the PC keyboard. Use this 
plug-in and switch the input Braille table in NVDA to Unicode, and you are good 
to go.

 

For experimenting and testing while you are working as well as debugging any 
problems, the lou_trace program is your friend. It works like the lou_translate 
program, but tells you what rules have been applied during the translation or 
back-translation. Use it whenever you think your table is doing something it 
shouldn’t be doing.

 

HTH Bue

 

 

 

 

Fra: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
<mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx>  
<liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
<mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx> > På vegne af 
ikrami.ahmad@xxxxxxxxx <mailto:ikrami.ahmad@xxxxxxxxx
Sendt: 20. marts 2020 19:15
Til: liblouis-liblouisxml@xxxxxxxxxxxxx 
<mailto:liblouis-liblouisxml@xxxxxxxxxxxxx
Emne: [liblouis-liblouisxml] testing my changes on table

 

Hi friends

So I am about to resume working on improving the Arabic Braille tables in 
Liblouise. I need to learn an effective way to test the changes I made to the 
table. A clear step by step instructions will be appreciated.

I used to test my changes through replacing the table I modify in NVDA screen 
reader and see how it reacts to my changes. However, I find out that this 
method is not really adequate enough, due to some limitations in NVDA itself. 
For example, the Arabic grade2 table functions properly in JAWS, but with nvda, 
it gives me an “unknown input” error message when I try to type in any 
character from my braille display.

I may rely on NVDA Unicode braille input to create my yaml tests, but I need to 
learn how to actually see the modifications I made to the table itself in terms 
of forward and backward translation.

Your help will be greatly appreciated.

 


--

Celebrating 150 years of creating change for blind and partially sighted 
people. 
To help us continue removing the barriers that can stop people with sight loss 
thriving, visit www.rnib.org.uk to donate. 

--


DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended recipient you 
should not use, disclose, distribute or copy any of the content of it or of any 
attachment; you are requested to notify the sender immediately of your receipt 
of the email and then to delete it and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by its 
staff are free from viruses or other contaminants.  However, it cannot accept 
any responsibility for any  such which are transmitted.

We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and any 
attachments are those of the author and do not necessarily represent those of 
RNIB.

RNIB Registered Charity Number: 226227

Website: https://www.rnib.org.uk
��u��*m���~�^�����޶�h�yhiحjwe�y,��k�7����z�(��m����&��謢��v�zm��剹h�+(�즉좸�

Other related posts: