New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move math tables from Liblouis to Liblouisutdml #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! We might argue that
- tables need to go into a separate directory and
- we should mention this in the doc somewhere
Why put tables in a separate directory? |
I though they are logically a separate thing from sem files, hence they should be in a separate directory. Maybe it is not so important. |
I think it would just complicate things. sem and cfg files are also different kinds. |
OK, fine, we can put them in the same directory |
What the status of UEB math with this change? I don't see any UEB tables in this project. Are they the ukmaths files (in which case the comment line really should be modified) or is en-ueb-math.ctb an integral part of liblouis' UEB files and can't be moved? If the later, how is UEB math referenced when using liblouisutdml? |
Hi Neil. No, to my knowledge no one has made a Liblouisutdml converter from MathML to UEB math yet. en-ueb-math.ctb was written by APH and it seems to me that this table is intended for translating formulas in a linear format, i.e. plain text. It is included in en-ueb-g1.ctb so it can't be moved. Any tables from Liblouis can be used with Liblouisutdml as long as Liblouisutdml knows where to find them. Liblouisutdml will just find the tables if Liblouis has been installed in a default location, and otherwise I believe there are some API functions to configure it. This is how it has always worked in the past and it still works this way, but with this PR I'm trying to reduce the dependencies to a miminum. |
Thanks for the feedback. I'm hoping to do a new MathPlayer build and there have been requests for UEB math, so I'd like so if I can make that happen. @egli (way back at the 3.1.0 release) said it contained improvements to UEB and Nemeth math, so I was hopeful this meant I could generate UEB math from MathML. Without a .sem file in Liblouisutdml, you are right that apparently no one has done this. Does anyone know the formats for these files? I can probably write a .sem file for MathML->UEB, at least as far as mimicking nemeth.sem. However, the likelihood of my making mistakes in the other files that are needed is 100%. |
I made the one for Dutch math so I kind of know the formats, yes. But of course I don't know UEB math (*). Maybe a good way to start is by writing a test suite. I made a test suite for Dutch braille here. The MathML files I generated from LibreOffice Math (hence the "StarMath" comments). There is also a testing framework in Liblouisutdml itself. If you want I could port my (DAISY Pipeline specific) test to Liblouisutdml. This way you would have an example for writing your own UEB tests. (*) P.S. For my own reference: looked up some documentation: |
Always a good idea to have tests to know whether something works! It would be great if you would port your DAISY tests to Liblouisutdml -- it is much easier for me to write UEB tests if I can start with something that works and modify that. Thanks. FYI: I don't think LibreOffice ever got past MathML 1.0, so it might not be a good way to generate MathML. You might want to try WIRIS (copy and paste into text editor will paste as MathML). |
b5c2fb3
to
1b79e1a
Compare
see #47 Also extended the test runner to support subdirectories.
1b79e1a
to
a4a2ed2
Compare
see liblouis/liblouis#601