Skip to content

This project provides various tools for processing content MathML with Java.

License

Notifications You must be signed in to change notification settings

gipplab/MathMLTools

Repository files navigation

Made With Java

MathML Tools

Maven License DOI Travis Code Coverage Code Quality
MavenCentral License DOI Build Status Test Coverage Maintainability

MMLTools Logo

MathML Tools is an open source project for processing content MathML within Java. It provides tools to load, store, check validity and automatically repair and enhance documents for the new MathML 3.0 standard. Furthermore, we provide Java adapters to convert LaTeX to MathML, full compatibility for our developed gold standard, programming language independent libraries of useful XPath and XQuery strings, and distance measure algorithms to compare two MathML documents.

Install Instructions

Since this is an open API, there is nothing to install. If you want to use the API for you own project you can use maven central as explained in section Maven Central below. If you want to download the sources, run tests and change something in the code, follow the guide in section Local Installation below.

Maven Central

The project is structured into specialized packages (maven-modules) that you can easily and separately include into your projects. For example, if you just want to process MathML documents, the core module perfectly fits your needs. We use maven for our build process and the entire project is available on Maven central (see the maven badge above). Note that specialized modules automatically imports the core module. For example, if you wish to use our similarity module in your project, you only need to add the following snippet to your dependencies pom:

<dependency>
    <groupId>com.formulasearchengine.mathmltools</groupId>
    <artifactId>mathml-similarity</artifactId>
    <version>2.0.1</version>
</dependency>

Local Install

To download the project and run the tests you need git and mvn installed. First download the sources into a directory.

mkdir mathtools
cd mathtools
git clone https://github.com/ag-gipp/MathMLTools.git .

Now you can install the project locally via maven, which automatically runs the tests.

mvn clean install

Don't panic if you see error messages. We have written tests that expects exceptions. If this process finished without errors you should see something like this in the end of the log.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] MathML Tools ....................................... SUCCESS [  3.234 s]
[INFO] MathML Libraries ................................... SUCCESS [  1.493 s]
[INFO] MathML Utilities ................................... SUCCESS [  6.425 s]
[INFO] MathML Core ........................................ SUCCESS [02:31 min]
[INFO] MathML Converters .................................. SUCCESS [ 41.476 s]
[INFO] MathML Similarity .................................. SUCCESS [  7.930 s]
[INFO] MathML Gold Standard ............................... SUCCESS [  0.710 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Project Structure

  • MathML Converters (mathml-converters): Collection of tools for converting LaTeX to MathML. Also includes the canonicalization tool.

  • MathML Core (mathml-core): To load, store, check validity, repair and manipulate MathML documents.

  • MathML Gold Standard (mathml-gold): Process the MathMLBen gold standard within Java.

  • MathML Libraries (mathml-libs): Collection of XPath and XQuery strings for content MathML (includes Java pojos).

  • MathML Similarity (mathml-similarity): Collection of distance measurements for MathML documents.

  • MathML Utilities (mathml-utils): Useful utility functions and definitions (always included in the other modules above).