Math

Handwriting recognition results for Offscreeneditor

How can I get the calculation result of the handwritten formula in the offscreen-interactivity demo to achieve a handwritten calculation effect similar to the onscreen demo? Currently, I can only see that this formula can be recognized. I look forward to your answer.

image



image

Can I use the offscreen-interactivity demo to achieve the effect shown in the demo above?

Hello,


Thank you for contacting us.

With Offscreen interactivity, your application is responsible for the ink capture and rendering, so you cannot use iink SDK  to generate the strokes of the solver output (the strokes corresponding to the 4 digit in your example).

Nevertheless, you can get the solver result by using a MathSolverController.


For instance, the code snippet below, that you can insert in the contentChanged, of your IOffscreenEditorListenerimplementaion,  allows you to retrieve the math solver numerical computation output:


                blockIds.forEach { blockId ->
                    val itemIdHelper = itemIdHelper ?: return@forEach
                    val offscreenEditor = offscreenEditor ?: return@forEach

                    if (itemIdHelper.getBlockType(blockId) == "Math") {
                        offscreenEditor.mathSolverController.getAvailableActions(blockId)?.let { actions ->

                            if (actions.contains("numerical-computation")) {
                                val latexExport = offscreenEditor.mathSolverController.getActionOutput(
                                    blockId,
                                    "numerical-computation",
                                   MimeType.LATEX
                              )
                               Log.d(TAG, "Latex: $latexExport")
                            }
                       }
                    }
               }


Please note, that you can get the actionOutput either as LaTeX (as in above snippet) or JIIX.

With the ink example you have shared, you would get the LaTeX output "1+3=4" that you can  then use in your application.


Best regards,


Gwenaëlle




1 person likes this

THX! It is running successfully! I have another question, can the current solver of the iink SDK perform chemical equation calculations? For example, chemical equation trimming

Hello Sid20245666,

We don't have a chemical equation solver out of the box.

 It's seems that you are well advanced on your evaluation of our technology, maybe it's the good time to think about the next steps.

Can you reach our sales team: https://developer.myscript.com/contact/quote-on-device-hwr

Best regards,

Etienne



1 person likes this
Login or Signup to post a comment