IInk SDK Web REST Raw Content recognizer example

Considering this request body.

rest-rawcontent2-quadratic-example.json
{
  "scaleX": 0.265,
  "scaleY": 0.265,
  "contentType": "Raw Content",
  "configuration": {
    "raw-content": {
      "recognition": {
        "types": [
          "text",
          "math",
          "shape"
        ]
      },
      "classification": {
        "types": [
          "text",
          "math",
          "shape",
          "decoration",
          "drawing"
        ]
      }
    },
    "export": {
      "jiix": {
        "bounding-box": false,
        "strokes": false,
        "ranges": false,
        "text": {
          "characters": false,
          "words": false
        },
        "shape": {
          "candidates": false
        }
      }
    }
  },
  "strokes": [
    {
      "x": [
        32.9759064,
        32.9759064,
        32.9759064,
        32.9639053,
        32.9639053,
        32.9639053,
        32.9499054,
        32.9499054,
        32.9399071,
// Open the file to see the full content (62,301 lines)

This request corresponds to the extraction and recognition of the following ink:

Following is the result if you ask for application/vnd.myscript.jiix output.

For the sake of simplicity, the ranges, strokes, characters, words, shape primitives and bounding-boxes details are hidden in the following jiix output. Follow this link if you want to see more details on what can be computed in raw content recognition.

rest-rawcontent2-quadratic-output.json
{
  "version": "3",
  "id": "MainBlock",
  "type": "Raw Content",
  "bounding-box": {
    "x": 4.81461763,
    "y": 4.36820698,
    "width": 39.6299667,
    "height": 47.4560661
  },
  "range": [
    {
      "from": {
        "stroke": 0
      },
      "to": {
        "stroke": 135
      }
    }
  ],
  "elements": [
    {
      "type": "Text",
      "bounding-box": {
        "x": 7.19011402,
        "y": 6.05959177,
        "width": 29.5268021,
        "height": 17.4720039
      },
      "range": [
        {
          "from": {
            "stroke": 0
          },
          "to": {
            "stroke": 112
          }
        },
        {
          "from": {
            "stroke": 125
          },
          "to": {
            "stroke": 125
          }
        }
      ],
      "label": "The root of the quadratic equation\n$a x ^{2} + b x + c = 0$\nis given by the quadratic formula\n$x = \\frac{- b \\pm \\sqrt{\\Delta}}{2 a}$ where Δ is the\ndiscriminant $\\Delta = b ^{2} - 4 a c$",
      "lines": [
        {
// Open the file to see the full content (1,297 lines)
{
 "version": "3",
 "id": "MainBlock",
 "type": "Raw Content",
 "elements": [ {
   "type": "Text",
   "label": "The root of the quadratic equation\n$a x ^{2} + b x + c = 0$\nis given by the quadratic formula\n$x = \\frac{- b \\pm \\sqrt{\\Delta}}{2 a}$ where Δ is the\ndiscriminant $\\Delta = b ^{2} - 4 a c$",
   "lines": [ {
     "type": "Line",
     "label": "The root of the quadratic equation",
     "spans": [ {
       "type": "Text",
       "label": "The root of the quadratic equation"
      } ]
    }, {
     "type": "Line",
     "label": "$a x ^{2} + b x + c = 0$",
     "spans": [ {
       "type": "Math",
       "label": "a x ^{2} + b x + c = 0"
      } ]
    }, {
     "type": "Line",
     "label": "is given by the quadratic formula",
     "spans": [ {
       "type": "Text",
       "label": "is given by the quadratic formula"
      } ]
    }, {
     "type": "Line",
     "label": "$x = \\frac{- b \\pm \\sqrt{\\Delta}}{2 a}$ where Δ is the",
     "spans": [ {
       "type": "Math",
       "label": "x = \\frac{- b \\pm \\sqrt{\\Delta}}{2 a}"
      }, {
       "type": "Text",
       "label": "where Δ is the"
      } ]
    }, {
     "type": "Line",
     "label": "discriminant $\\Delta = b ^{2} - 4 a c$",
     "spans": [ {
       "type": "Text",
       "label": "discriminant"
      }, {
       "type": "Math",
       "label": "\\Delta = b ^{2} - 4 a c"
      } ]
    } ]
  }, {
   "type": "Math",
   "label": "$\\Delta > 0$",
   "lines": [ {
     "type": "Line",
     "label": "$\\Delta > 0$",
     "spans": [ {
       "type": "Math",
       "label": "\\Delta > 0"
      } ]
    } ]
  }, {
   "type": "Math",
   "label": "$\\Delta < 0$",
   "lines": [ {
     "type": "Line",
     "label": "$\\Delta < 0$",
     "spans": [ {
       "type": "Math",
       "label": "\\Delta < 0"
      } ]
    } ]
  }, {
   "type": "Math",
   "label": "$\\Delta = 0$",
   "lines": [ {
     "type": "Line",
     "label": "$\\Delta = 0$",
     "spans": [ {
       "type": "Math",
       "label": "\\Delta = 0"
      } ]
    } ]
  }, {
   "type": "Shape",
   "elements": [ {
     "shape": {
      "kind": "rectangle",
      "primitives": [ ... ]
     }
    }, {
     "shape": {
      "kind": "line",
      "primitives": [ ... ]
     }
    }, {
     "shape": {
      "kind": "line",
      "primitives": [ ... ]
     }
    }, {
     "shape": {
      "kind": "arc of ellipse",
      "primitives": [ ... ]
     }
    }, {
     "shape": {
      "kind": "arc of ellipse",
      "primitives": [ ... ]
     }
    }, {
     "shape": {
      "kind": "arc of ellipse",
      "primitives": [... ]
     }
    }, {
     "shape": {
      "kind": "rectangle",
      "primitives": [... ]
     }
    }, {
     "shape": {
      "kind": "curved arrow",
      "primitives": [ ...  ]
     }
    } ]
  }, {
   "type": "Drawing"
  } ]
}