[brailleblaster] Re: [john.gardner@xxxxxxxx: [Blindmath] LEAN Math]

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Thu, 26 Apr 2012 14:11:02 +0100

May be this will help on using jython within a Java application http://www.jython.org/jythonbook/en/1.0/JythonAndJavaIntegration.html#using-jython-within-java-applications


Michael Whapples
On 26/04/2012 13:22, John J. Boyer wrote:
jython sounds like the way to go. So we just place the jython jar in
dist/lib and the Python scripts somewhere in the src tree. I imagine the
scripts are called through methods in the jar. Where should they go in
the distribution?

Thaniks,
John

On Thu, Apr 26, 2012 at 10:18:43AM +0100, Michael Whapples wrote:
Hello,
There are multiple ways of including Python scripts with a Java application.

If one uses jython, the Java implementation of Python, then it should be
no harder than just including the jython jar file. Also no bindings
would need to be created as jython allows Java and Python scripts to
interact. One down side to jython is that it normally trails the
official Python implementation by a little and so may not have all new
language features. Also some say it is slow, however for small things it
may not be too bad and it might be a way to allow people to script
BrailleBlaster.

John G mentioned not needing to distribute a Python runtime, well that
is sort of true but not strictly as far as I know. One can bundle the
appropriate parts of the Python runtime with a Python script, so
removing the need to require the user to install Python. However as I
said this strictly speaking still means a Python runtime is being used,
it may just be the python DLL, but its still a runtime like those who
work in visual C need to distribute visual C runtimes. This would need
Java to C and C to Python bindings for the script and probably will not
offer a general scripting solution like jython can. There are some
libraries to help with binding Java to Python (they still go through the
C layer).

The final option is that one can require the user to manually install
Python, butg that probably really is not the route to go for BrailleBlaster.

Michael Whapples
On 26/04/2012 02:26, John J. Boyer wrote:
Wouldn't using Python make it necessary to provide the Python runtime as
well as the Java runtime? Or can Python be compiled into a standalone
binary library? This would still raise the problem of porting. I've
found that the easy way is likely to be the hard way quite soon. So I
favor a Java implementation of LEAN. Besides, we have to consider SWT
compatibibility. Much of the work could be done by liblouis and
liblouisutdml.

John

On Thu, Apr 26, 2012 at 01:43:58AM +0100, Michael Whapples wrote:
The XSLT is part of another idea of mine, a way of having a plugin for
web browsers which enable the browser to show LEAN when the page
contains MathML. XSLT is fine there as you go one way (MathML to LEAN),
however BrailleBlaster may want to go both ways.

One could use jython to include the python version John G is writing,
but that might not be the most efficient way although it would save some
effort in not creating a Java version as well.

Michael Whapples
On 26/04/2012 01:19, John J. Boyer wrote:
As you know, I would prefer to do everything in Java except for the
liblouis and liblouisutdml libraries and a few other things like
hunspell. XSLT sounds interesting, but I'm not sure it's the best
approach for BrailleBlaster.

John

On Thu, Apr 26, 2012 at 12:50:01AM +0100, Michael Whapples wrote:
I have been speaking with John G about producing an implementation in
other languages (eg. javascript, XSLT or Java). The only issue with an
XSLT implementation would be that it would only go MathML to LEAN but
not the other way, but XSLT has the great advantage that it can be used
in many different languages such as Python, Java, javascript and
probably many more.

In general though, I would recommend it as a math notation for most
people (those who are doing a large amount of maths may still prefer
LaTeX, but they probably would be doing the whole document in LaTeX). I
will be very interested to see how it works in practice and hopefully if
people feel improvements can be made they will be able to be
incorporated.

Michael Whapples
On 25/04/2012 23:15, John J. Boyer wrote:
The forwarded mesage contains a link to a preprint of a paper on the
LEAN (Linear Editing and Authoring Notation). This is a very compact
mathematical notation based on Unicode and was developed by John
Gardner
of ViewPlus Technologies and co-authors. It may be used for authoring
math in BrailleBlaster. Translating LEAN to Braille should be a
relatively straightforward matter of developing semantic-action files
and liblouis tables. One big question is how LEAN can be integrated
into
BrailleBlaster, since the current implementation is in Python. I'm sure
Michael will have something to say about this. The paper is a good read
and gives an overview of currently-used math notations before
describing
LEAN.

John

----- Forwarded message from John Gardner<john.gardner@xxxxxxxx>
-----

Subject: [Blindmath] LEAN Math
From: "John Gardner"<john.gardner@xxxxxxxx>
Date: Tue, 24 Apr 2012 11:05:33 -0700
To: "'Blind Math list for those interested in mathematics'"
        <blindmath@xxxxxxxxxx>
List-Archive:<http://nfbnet.org/pipermail/blindmath_nfbnet.org>

Hello all, I recently promised to post a preprint on LEAN Math.  I did.
It
is at:
http://www.access2science.com/jagqn/More%20Accessible%20Math%20preprint.htm
LEAN is Linear Editing and Authoring Notation and is described in that
paper.  There will soon be a MS Word macro permitting one to flip
MathType
equations to/from LEAN notation similarly to the way you can now flip
to/from Latex.  LEAN and other Unicode symbols are all pronounceable
using
screen reader speak dictionaries.LEAN was specifically designed to work
well
with current technology screen readers, and I believe that most blind
people
will find LEAN to be very intuitive, making MathML reading in audio
very
straightforward.  And authoring math as well.  More on that in a few
weeks.

I should acknowledge many useful conversations with Michael Whapples on
this
topic.  Michael's intuition has undoubtedly made LEAN better than it
was
when I first started.

John Gardner




_______________________________________________
Blindmath mailing list
Blindmath@xxxxxxxxxx
http://nfbnet.org/mailman/listinfo/blindmath_nfbnet.org
To unsubscribe, change your list options or get your account info for
Blindmath:
http://nfbnet.org/mailman/options/blindmath_nfbnet.org/john.boyer%40abilitiessoft.com

----- End forwarded message -----



Other related posts: