[MathDOM] How to read and evaluate MathML files?
Brought to you by:
scoder
From: Roman S. <sa...@we...> - 2007-03-02 11:12:33
|
Hello list currently I am working on my Bachelors Thesis on storing characteristics (mathematical formulas), containing several parameters as variables, in an ontology. To instantiate the variable the parameters (real-values) are extracted from different concepts in the ontology. I decided to encode the characteristics via MathML and to store them as XMLLiterals which are to be found as datatype properties in the ontology. The project I am working with uses a Java written GUI that enables the user to instantiate the ontology without writing any OWL but with using drag´n drop and wysiwyg mechanisms. One of my tasks is to implement a feature which enables the user to type in formulas (e.g (x + 5*y) * 42) without using MathML. These formulas should be encoded in MathML and they should be stored in the ontology. On the other hand the program has to be able to instantiate the variables of the given formulas and eventually calculate and return the result. My task is not to write a MathML parser but to implement an exisiting one. Unfortunately I could not find anything that matches my requirements (written in Java). MathDom looks very promising to me and with Jython I might be able to use it as a part of my program. Unfortunately I am not very familiar with Python and I could not find a helpful documentation (sorry, if there is one). I would really appreciate if you could show me how to read exisiting MathML streams and to return Java (or Python) expressions. Thank you, Roman |