Closed AndreG-P closed 3 years ago
Can you change the urls so that they are prefixed with /api/
also there should be a /_info
endpoint, so that the API can identify itself as API. Also the version number should be part of the URL. https://vmext-demo.formulasearchengine.com/api/v2/ See https://stackoverflow.com/questions/389169/best-practices-for-api-versioning otherwise MathSearch would break if the API ever was refactored.
Please close this issue once @physikerwelt implemented the frontend (#193)
Endpoints are online at: https://vmext-demo.formulasearchengine.com/swagger-ui.html#/math-controller
You need 2 endpoints.
POST /math/generateAnnotatedDependenyGraph: Input:
Output: Base dependency graph of the document (this represents the context)
POST /math/generateTranslatedComputedMoi: Input:
Output: A single MOI representation for the given formula include definiens, translations, semantic LaTeX etc.
Example
You have a document:
You generate a dependency graph from this document via: /math/generateAnnotatedDependencyGraph:
Next, you use this dependency graph to analyze the equation:
Because of the context (the dependency graph) we will find out that
(z)_n
is the pochhammer symbol and\Gamma(z)
the gamma funciton. Let's analyze it via /math/generateTranslatedComputedMoi which takes the latex expression and the dependency graph from above and returns this:As you can see, it does not have a position, not definiens because the equation does not exist in the given dependency graph. Also, you see
"result": "ERROR"
for Maples numerical test. This was because the JVM crashed. But we were able to recover from it and run the symbolic test anyway which returned successful.