Math

How can I set up a recognizer to only recognize the content of mathematical formulas and not other recognitions?

How can I set up a recognizer to only recognize the content of mathematical formulas and not other recognitions? 
{
  "raw-content": {
    "configuration": {
      "analyzer": {
        "bundle": "raw-content2",
        "name": "standard"
      },
      "math": {
        "bundle": "math2",
        "name": "standard"
      }
    },
    "classification": {
      "types": ["text", "drawing",  "math"]
    },
    "recognition": {
      "types": [   "text", "math" ]
    }
  },
  "math": {
    "solver": {
      "options": "algebraic",
      "angle-unit": "rad",
      "number-format": "decimal",
      "numerical-computation": [
        "at-right-of-equal-sign",
        "at-question-mark"
      ],
      "enable-syntactic-correction": false,
      "display-implicit-multiply": false,
      "auto-variable-management": {
        "enable": true,
        "scoping-policy": "closest"
      }
    }
  },

  "export": {
    "jiix": {
      "text": {
        "chars": true,
        "words": true
      },
      "bounding-box": true,
      "strokes": false,
      "glyphs": false,
      "primitives": false,
      "ids": true,
      "math": {
        "result": true
      }
    }
  }}

 

How do I configure the part_conf and viewmodel code level?
1 Comment

Hello,

 Without knowing the full use case, you can indicate to a raw content recognizer the classification categories, and the recognition categories.

https://developer.myscript.com/docs/interactive-ink/4.1/android/advanced/recognizers/#raw-content-recognizer

So if in  the configuration

 "classification": {
      "types": ["text", "drawing",  "math"]
    },
    "recognition": {
      "types": [   "text", "math" ]
    }

you changed to

 "classification": {
      "types": [ "math"]
    },
    "recognition": {
      "types": [    "math" ]
    }

it will allow the engine to classify math only, and to recognize the math. This is a strong configuration, if your end user is writing text, or draw something, it will force the engine to find math inside this drawing, that can lead to have garbage.

So, it depends of your UX, but keeping "drawing" in the classification can be a good idea in order to avoid this garbage.


Best regards,

Etienne

Login or Signup to post a comment
  • Support
  • Forums
  • Math
  • How can I set up a recognizer to only recognize the content of mathematical formulas and not other recognitions?