Text

Answered

Is Arabic Supported In Rest API ?

Hello I am trying to use rest API for arabic language recognition
As is see in your documentation it supported (https://developer.myscript.com/docs/interactive-ink/1.4/web/rest/architecture/)
 But i always get 500 response
Below is my request body
Can you tell me whats wrong ?

  

{
  "configuration": {
    "export": {
      "jiix": {
        "strokes": false
      },
      "text": {
        "chars": true,
        "words": true
      }
    },
    "text": {},
    "lang": "ar"
  },
  "contentType": "Text",
  "conversionState": "DIGITAL_EDIT",
  "strokeGroups": [
    {
      "strokes": [
        {
          "x": [
            99,
            98,
            99,
            98,
            98,
            98,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99
          ],
          "y": [
            125,
            125,
            125,
            125,
            126,
            126,
            127,
            128,
            129,
            130,
            131,
            132,
            133,
            133,
            133,
            133,
            133
          ],
          "t": [
            1622495330248,
            1622495330258,
            1622495330272,
            1622495330285,
            1622495330299,
            1622495330312,
            1622495330325,
            1622495330337,
            1622495330351,
            1622495330363,
            1622495330376,
            1622495330389,
            1622495330403,
            1622495330416,
            1622495330430,
            1622495330443,
            1622495330456
          ]
        },
        {
          "x": [
            91,
            91,
            91,
            92,
            92,
            92,
            93,
            94,
            95,
            96,
            97,
            97,
            97,
            97,
            97,
            97,
            97,
            97,
            96,
            96,
            95,
            94,
            93,
            92,
            91,
            91,
            90,
            90,
            89,
            89,
            89,
            89,
            89,
            89,
            89,
            89,
            89,
            89,
            88,
            87,
            87,
            87,
            87,
            87,
            87,
            87,
            87,
            87,
            87,
            86,
            86,
            85,
            84,
            83,
            82,
            81,
            80,
            79,
            78,
            78,
            78,
            77,
            77,
            77,
            77,
            77,
            76,
            76,
            76,
            76,
            76
          ],
          "y": [
            131,
            131,
            131,
            131,
            131,
            131,
            131,
            131,
            131,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            133,
            133,
            133,
            133,
            133,
            133,
            133,
            132,
            132,
            132,
            132,
            131,
            131,
            131,
            132,
            132,
            132,
            132,
            132,
            133,
            133,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            132,
            133,
            133,
            133,
            133,
            133,
            132,
            132,
            132,
            131,
            131,
            130,
            129,
            128,
            127,
            127,
            126,
            126,
            126
          ],
          "t": [
            1622495330812,
            1622495330821,
            1622495330835,
            1622495330848,
            1622495330861,
            1622495330874,
            1622495330887,
            1622495330900,
            1622495330913,
            1622495330926,
            1622495330939,
            1622495330952,
            1622495330965,
            1622495330978,
            1622495330991,
            1622495331004,
            1622495331017,
            1622495331031,
            1622495331043,
            1622495331057,
            1622495331070,
            1622495331083,
            1622495331096,
            1622495331109,
            1622495331122,
            1622495331135,
            1622495331148,
            1622495331161,
            1622495331174,
            1622495331187,
            1622495331200,
            1622495331214,
            1622495331227,
            1622495331240,
            1622495331253,
            1622495331266,
            1622495331279,
            1622495331292,
            1622495331305,
            1622495331318,
            1622495331331,
            1622495331344,
            1622495331358,
            1622495331371,
            1622495331384,
            1622495331397,
            1622495331410,
            1622495331423,
            1622495331436,
            1622495331449,
            1622495331462,
            1622495331475,
            1622495331489,
            1622495331501,
            1622495331514,
            1622495331527,
            1622495331541,
            1622495331554,
            1622495331567,
            1622495331580,
            1622495331593,
            1622495331606,
            1622495331619,
            1622495331632,
            1622495331645,
            1622495331658,
            1622495331671,
            1622495331684,
            1622495331698,
            1622495331711,
            1622495331724
          ]
        },
        {
          "x": [
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92
          ],
          "y": [
            126,
            127,
            127,
            127,
            127,
            127,
            127,
            128,
            128,
            128,
            128,
            128
          ],
          "t": [
            1622495331936,
            1622495331946,
            1622495331959,
            1622495331972,
            1622495331985,
            1622495331998,
            1622495332011,
            1622495332024,
            1622495332037,
            1622495332052,
            1622495332065,
            1622495332078
          ]
        },
        {
          "x": [
            83,
            83,
            83,
            84,
            85,
            86,
            87,
            88,
            89,
            89,
            89
          ],
          "y": [
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            127
          ],
          "t": [
            1622495332209,
            1622495332223,
            1622495332235,
            1622495332248,
            1622495332262,
            1622495332275,
            1622495332288,
            1622495332301,
            1622495332314,
            1622495332328,
            1622495332341
          ]
        },
        {
          "x": [
            83,
            83,
            83,
            83,
            83,
            83,
            83,
            83,
            83,
            83,
            83
          ],
          "y": [
            135,
            135,
            135,
            135,
            135,
            135,
            135,
            136,
            136,
            136,
            136
          ],
          "t": [
            1622495332498,
            1622495332511,
            1622495332520,
            1622495332534,
            1622495332547,
            1622495332559,
            1622495332573,
            1622495332586,
            1622495332600,
            1622495332613,
            1622495332626
          ]
        },
        {
          "x": [
            73,
            73,
            73,
            72,
            72,
            72,
            71,
            70,
            69,
            68,
            67,
            67,
            66,
            66
          ],
          "y": [
            131,
            131,
            131,
            131,
            132,
            133,
            133,
            134,
            135,
            136,
            136,
            137,
            137,
            137
          ],
          "t": [
            1622495332745,
            1622495332758,
            1622495332772,
            1622495332784,
            1622495332798,
            1622495332811,
            1622495332824,
            1622495332836,
            1622495332850,
            1622495332864,
            1622495332876,
            1622495332890,
            1622495332903,
            1622495332916
          ]
        },
        {
          "x": [
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99,
            99
          ],
          "y": [
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            127,
            126,
            126,
            126,
            126,
            126,
            126,
            125,
            126,
            126,
            126,
            126,
            126,
            126,
            126,
            126,
            126,
            126,
            126,
            126,
            127,
            128,
            129,
            130,
            131,
            132,
            132,
            133
          ],
          "t": [
            1622495333556,
            1622495333569,
            1622495333582,
            1622495333596,
            1622495333609,
            1622495333622,
            1622495333635,
            1622495333648,
            1622495333662,
            1622495333675,
            1622495333689,
            1622495333703,
            1622495333711,
            1622495333725,
            1622495333737,
            1622495333750,
            1622495333763,
            1622495333776,
            1622495333790,
            1622495333802,
            1622495333816,
            1622495333829,
            1622495333842,
            1622495333855,
            1622495333868,
            1622495333881,
            1622495333894,
            1622495333907,
            1622495333920,
            1622495333934,
            1622495333947,
            1622495333961,
            1622495333974,
            1622495333987,
            1622495334000,
            1622495334013
          ]
        },
        {
          "x": [
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            93,
            93,
            93,
            93,
            93,
            92,
            92,
            92,
            92,
            92,
            92,
            92,
            93,
            93,
            93,
            93,
            93,
            93,
            93,
            92
          ],
          "y": [
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            128,
            127,
            127,
            127,
            127,
            127,
            127,
            128,
            128,
            128
          ],
          "t": [
            1622495334459,
            1622495334474,
            1622495334483,
            1622495334497,
            1622495334510,
            1622495334523,
            1622495334536,
            1622495334549,
            1622495334562,
            1622495334575,
            1622495334588,
            1622495334601,
            1622495334614,
            1622495334627,
            1622495334641,
            1622495334654,
            1622495334667,
            1622495334680,
            1622495334693,
            1622495334706,
            1622495334719,
            1622495334732,
            1622495334745,
            1622495334757,
            1622495334771,
            1622495334784,
            1622495334797,
            1622495334810,
            1622495334824
          ]
        }
      ]
    }
  ],
  "width": 815,
  "height": 1153,
  "xDPI": 96,
  "yDPI": 96
}

 

 


Best Answer

Dear Malikghanim,


Indeed you are right, my mistake.


Currently, the arabic is a "non-interactive" language and can only be used via the REST API.


As indicated above, the non-interactive languages do not permit conversion (replace ink content with a typeset equivalent). In your case, your request is asking for conversion ("conversionState":"DIGITAL_EDIT"), which you understand is not possible.


Removing the corresponding line, your request shall then be properly processed (I tried on my side and it was fine).


Best regards,


Olivier


Thanks a lot Olivier, it works perfectly, great 

Answer

Dear Malikghanim,


Indeed you are right, my mistake.


Currently, the arabic is a "non-interactive" language and can only be used via the REST API.


As indicated above, the non-interactive languages do not permit conversion (replace ink content with a typeset equivalent). In your case, your request is asking for conversion ("conversionState":"DIGITAL_EDIT"), which you understand is not possible.


Removing the corresponding line, your request shall then be properly processed (I tried on my side and it was fine).


Best regards,


Olivier

Dear Olivier,

You are sending me the Ink of (Interactive Ink SDK) but I am talking about Rest API, Per the link I sent it's mentioned  that you are supporting Arabic
please see the screenshot Below

image

 

Dear Malikghanim,


thank you for contacting us and your question.


We invite you to refer to the list of supported languages: https://developer.myscript.com/docs/interactive-ink/1.4/overview/text-languages/


As you can see, the arabic is not supported at present.


We cannot commit if/when we will support it.


Best regards,


Olivier

please consider that if I change lang configration to "en_US" it works but the stokes written in arabic, I try also "ar_SA", "ar_JO" but without luck