用于解析 Latex 或 MathML 字符串的 Java 或 scala 库 [英] Java or scala Library to parse latex or MathML string

查看:39
本文介绍了用于解析 Latex 或 MathML 字符串的 Java 或 scala 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将大量方程和数学公式存储到数据库中以进行模拟实验,我认为最好使用一些 mathML 或乳胶字符串...但是...

I need to store a lot of equation and mathematical formula into database for my simulation experimentations, and i think it's better to use some mathML or latex string... but ...

我提出了一些谷歌搜索请求,我很惊讶,因为我在 java 或 scala 中找不到任何 eval 库来将字符串乳胶或字符串 mathML 表达式转换为 java/scala 中的方程.我不想用求解器评估()非常复杂的方程,我的目标是真的"将简单方程(多项式、线性)存储并转换为 scala/java 语言.

I make some googling request, and i'm very surprised because i don't find any eval library in java or scala to transform string latex or string mathML expression into equation in java / scala. I don't want to eval() very complex equation with solver, my objective is "really" to store and transform simple equation (polynomial, linear) into scala/java language.

您有什么建议可以帮助我理解在用 java 或 scala 语言进行字符串评估后是否有其他解决方案可以轻松存储和解析方程或数学公式?

Do you have some advice to help me understand if there are other solution to store and parse easily equation or mathematic formula after string evaluation in java or scala language ?

更新 1:

最后我找到了一些读取 et eval() 字符串公式的 java 库......如果你找到任何东西,我可以用你的建议完成这个列表.

Finally i find some java library which read et eval() string formula ... If you find anything, i can complete this list with your proposal.

无需解析 MathML/Latex :

https://github.com/darius/expr(开源,年轻的图书馆?)

https://github.com/darius/expr (open-source, young library ?)

http://jeval.sourceforge.net/(开源,很老释放)

http://projects.congrace.de/exp4j/index.html(开源,2011 年最后一个版本,maven 存储库,由 @fas 开发)

http://projects.congrace.de/exp4j/index.html (open-source, last release 2011, maven repository, developped by @fas)

https://github.com/MarkyVasconcelos/Towel/wiki/Expression(开源,由 @marcos-vasconcelos 开发)

数学表达式解析器来自我的 Symja 项目 =>参考 stackOverflow 上的这篇文章(Java Math(s) Parsing API)

math expression parser from my Symja project => cf this post on stackOverflow (Java Math(s) Parsing API)

借助 MathML 的实验性解析

  • jscl-meditor - github 上的存储库 Java 符号计算库和数学编辑器(开源,2011 年最后一个版本,出色的前端和编辑器,ma​​thML 输入/输出(在这里查看教程),很大的可能性:多项式系统求解、向量和矩阵、分解、导数、积分(有理函数)、布​​尔代数、化简、java代码生成、几何代数)

  • jscl-meditor - depository on github Java symbolic computing library and mathematical editor (open-source, last release 2011, great front end and editor, mathML input/output (see tutorial here), great possibilities: polynomial system solving, vectors & matrices, factorization, derivatives, integrals (rational functions), boolean algebra, simplification, java code generation, geometric algebra)

JScience 看起来它对引入的 MathML 有一些实验性的支持.(参见这些帖子:使用JScience解析mathml文档MathML 和 Java)

JScience looks like it has some experimental support for MathML being introduced. (cf these post : Parsing mathml document using JScience and MathML and Java)

在这里上课:http://jscience.org/experimental/javadoc/org/w3c/dom/mathml/package-tree.html

谢谢

推荐答案

如果你想要像我认为你所要求的那样复杂的东西,唯一想到的是与 Java 生态系统兼容的是 Clojuratica,即便如此,您也必须以 Mathematica 格式存储公式.(并拥有 Mathematica 的副本.)

If you want something as sophisticated as I think you are asking for, the only thing that comes to mind that's Java-ecosystem compatible is Clojuratica, and even then you'd have to store the formulae in Mathematica format. (And have a copy of Mathematica.)

这篇关于用于解析 Latex 或 MathML 字符串的 Java 或 scala 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆