swagger: "2.0"
schemes:
  - https
host: azure.local
info:
  description: The service is used to perform ink layout and recognition of written words and shapes. Ink strokes passed to the service are recognized and organized into recognition results in the response
  title: Ink Recognizer Client
  version: "1.0"
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/InkRecognizer.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: cognitiveservices-InkRecognizer
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  apim_key:
    in: header
    name: Ocp-Apim-Subscription-Key
    type: apiKey
security:
  - apim_key: []
parameters:
  Endpoint:
    description: "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com)."
    in: path
    name: Endpoint
    required: true
    type: string
    x-ms-parameter-location: client
    x-ms-skip-url-encoding: true
paths:
  /recognize:
    put:
      description: Ink Recognition operation is used to perform ink layout and recognition of written words and shapes. It allows passing the ink strokes to the service to get the recognition results in the response.
      operationId: InkRecognizer_Recognize
      parameters:
        - description: The collection of stroke objects to send for analysis
          in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/analysisRequest"
        - description: The request id used to uniquely identify each request during troubleshooting. This is an optional parameter useful for correlating logs and other artifacts.
          in: header
          name: x-ms-client-request-id
          required: false
          type: string
          x-ms-client-request-id: true
      responses:
        "200":
          description: The results were processed successfully.
          schema:
            $ref: "#/definitions/analysisResponse"
        default:
          description: unexpected error
          schema:
            $ref: "#/definitions/errorModel"
      tags:
        - InkRecognizer
      x-ms-examples:
        Identify a word written in ink:
          parameters:
            Content-Type: application/json
            Endpoint: "{Endpoint}"
            Ocp-Apim-Subscription-Key: "{API key}"
            body:
              language: en-US
              strokes:
                - id: 1
                  kind: inkWriting
                  points:
                    - x: 19.34498
                      y: 28.21327
                    - x: 19.34498
                      y: 27.93462
                    - x: 19.34498
                      y: 27.65597
                    - x: 19.0157
                      y: 27.65597
                    - x: 18.76874
                      y: 27.44698
                    - x: 18.27483
                      y: 27.44698
                    - x: 18.02787
                      y: 27.44698
                    - x: 17.45164
                      y: 27.44698
                    - x: 16.62845
                      y: 27.65597
                    - x: 15.88758
                      y: 27.93462
                    - x: 15.06439
                      y: 28.49191
                    - x: 14.32351
                      y: 28.97955
                    - x: 13.25337
                      y: 29.53685
                    - x: 11.36003
                      y: 31.41773
                    - x: 10.61916
                      y: 32.46267
                    - x: 9.795967
                      y: 33.50761
                    - x: 8.972776
                      y: 34.83119
                    - x: 8.231905
                      y: 35.87613
                    - x: 7.655672
                      y: 37.19971
                    - x: 7.161757
                      y: 38.24465
                    - x: 6.9148
                      y: 39.35925
                    - x: 6.9148
                      y: 40.12554
                    - x: 6.9148
                      y: 40.89182
                    - x: 6.9148
                      y: 41.72777
                    - x: 7.408715
                      y: 42.2154
                    - x: 7.902629
                      y: 42.49405
                    - x: 8.478863
                      y: 42.77271
                    - x: 8.972776
                      y: 43.05135
                    - x: 9.795967
                      y: 43.05135
                    - x: 10.28988
                      y: 43.05135
                    - x: 11.11307
                      y: 42.77271
                    - x: 11.93626
                      y: 42.2154
                    - x: 12.43018
                      y: 41.72777
                    - x: 13.25337
                      y: 41.17047
                    - x: 13.74728
                      y: 40.12554
                    - x: 14.57047
                      y: 39.0806
                    - x: 15.31134
                      y: 37.75701
                    - x: 15.88758
                      y: 36.15478
                    - x: 16.62845
                      y: 34.27389
                    - x: 17.20468
                      y: 32.46267
                    - x: 17.6986
                      y: 30.30314
                    - x: 18.27483
                      y: 28.21327
                    - x: 18.76874
                      y: 26.12339
                    - x: 19.34498
                      y: 23.96386
                    - x: 19.59193
                      y: 21.87399
                    - x: 19.83889
                      y: 19.9931
                    - x: 20.08585
                      y: 18.46053
                    - x: 20.08585
                      y: 17.13695
                    - x: 20.08585
                      y: 16.02235
                    - x: 20.08585
                      y: 14.97741
                    - x: 20.08585
                      y: 14.48978
                    - x: 20.08585
                      y: 13.93248
                    - x: 19.83889
                      y: 13.65383
                    - x: 19.83889
                      y: 13.65383
                    - x: 19.83889
                      y: 13.65383
                    - x: 19.59193
                      y: 13.65383
                    - x: 19.59193
                      y: 13.65383
                    - x: 19.34498
                      y: 14.21113
                    - x: 19.34498
                      y: 14.69876
                    - x: 19.0157
                      y: 15.25606
                    - x: 19.0157
                      y: 16.02235
                    - x: 18.76874
                      y: 17.13695
                    - x: 18.76874
                      y: 18.46053
                    - x: 18.52179
                      y: 19.78412
                    - x: 18.27483
                      y: 21.31669
                    - x: 18.02787
                      y: 22.91892
                    - x: 18.02787
                      y: 24.52116
                    - x: 17.6986
                      y: 26.33238
                    - x: 17.45164
                      y: 28.21327
                    - x: 17.20468
                      y: 30.09415
                    - x: 16.95773
                      y: 31.90537
                    - x: 16.62845
                      y: 33.50761
                    - x: 16.62845
                      y: 35.10984
                    - x: 16.62845
                      y: 36.71207
                    - x: 16.62845
                      y: 38.03566
                    - x: 16.95773
                      y: 39.0806
                    - x: 17.20468
                      y: 39.84688
                    - x: 17.45164
                      y: 40.68283
                    - x: 18.02787
                      y: 41.17047
                    - x: 18.52179
                      y: 41.72777
                    - x: 19.34498
                      y: 42.00642
                    - x: 19.83889
                      y: 42.00642
                    - x: 20.90904
                      y: 41.72777
                    - x: 21.73223
                      y: 41.44912
                    - x: 22.4731
                      y: 40.89182
                    - x: 23.54325
                      y: 40.12554
                    - x: 24.36644
                      y: 39.35925
                    - x: 25.10731
                      y: 38.5233
                    - x: 25.9305
                      y: 37.47836
                    - x: 26.75369
                      y: 36.71207
                    - x: 27.24761
                      y: 35.59748
                    - x: 27.49457
                      y: 34.55254
                    - x: 27.74152
                      y: 33.50761
                    - x: 28.0708
                      y: 32.46267
                    - x: 28.0708
                      y: 31.62672
                    - x: 28.0708
                      y: 30.86044
                    - x: 28.0708
                      y: 30.09415
                    - x: 27.74152
                      y: 29.53685
                    - x: 27.49457
                      y: 28.97955
                    - x: 27.24761
                      y: 28.77056
                    - x: 26.75369
                      y: 28.49191
                    - x: 26.42442
                      y: 28.49191
                    - x: 25.9305
                      y: 28.49191
                    - x: 25.43659
                      y: 28.97955
                    - x: 25.10731
                      y: 29.53685
                    - x: 24.6134
                      y: 30.09415
                    - x: 24.03716
                      y: 30.86044
                    - x: 23.79021
                      y: 31.90537
                    - x: 23.29629
                      y: 33.22896
                    - x: 23.04934
                      y: 34.27389
                    - x: 22.72006
                      y: 35.59748
                    - x: 22.72006
                      y: 36.71207
                    - x: 22.4731
                      y: 38.03566
                    - x: 22.72006
                      y: 39.0806
                    - x: 22.72006
                      y: 40.12554
                    - x: 23.04934
                      y: 40.89182
                    - x: 23.29629
                      y: 41.72777
                    - x: 23.79021
                      y: 42.2154
                    - x: 24.36644
                      y: 42.77271
                    - x: 24.86036
                      y: 43.05135
                    - x: 25.68354
                      y: 43.05135
                    - x: 26.42442
                      y: 43.05135
                    - x: 27.24761
                      y: 42.77271
                    - x: 28.31775
                      y: 42.2154
                    - x: 29.3879
                      y: 41.72777
                    - x: 30.45805
                      y: 40.89182
                    - x: 31.44588
                      y: 39.84688
                    - x: 32.8453
                      y: 38.80195
                    - x: 33.83313
                      y: 37.47836
                    - x: 35.15023
                      y: 35.87613
                    - x: 36.22039
                      y: 34.27389
                    - x: 37.29053
                      y: 32.46267
                    - x: 39.43083
                      y: 27.93462
                    - x: 40.50097
                      y: 25.5661
                    - x: 41.24184
                      y: 23.19757
                    - x: 41.81808
                      y: 20.82905
                    - x: 42.55895
                      y: 18.46053
                    - x: 42.88823
                      y: 16.301
                    - x: 43.38214
                      y: 14.48978
                    - x: 43.6291
                      y: 11.84261
                    - x: 43.6291
                      y: 10.72801
                    - x: 43.6291
                      y: 10.24037
                    - x: 43.38214
                      y: 9.96172
                    - x: 43.38214
                      y: 9.96172
                    - x: 43.13519
                      y: 9.96172
                    - x: 42.88823
                      y: 10.72801
                    - x: 42.31199
                      y: 12.60889
                    - x: 41.81808
                      y: 14.21113
                    - x: 41.24184
                      y: 16.02235
                    - x: 40.74793
                      y: 18.18188
                    - x: 40.25402
                      y: 20.5504
                    - x: 39.67778
                      y: 23.19757
                    - x: 39.43083
                      y: 25.84475
                    - x: 38.60764
                      y: 31.13909
                    - x: 38.36068
                      y: 33.78626
                    - x: 38.36068
                      y: 36.43343
                    - x: 38.11372
                      y: 38.80195
                    - x: 38.11372
                      y: 40.89182
                    - x: 38.11372
                      y: 43.05135
                    - x: 37.86677
                      y: 45.14123
                    - x: 37.53749
                      y: 48.62434
                    - x: 37.53749
                      y: 49.94793
                    - x: 37.29053
                      y: 51.27151
                    - x: 37.04358
                      y: 52.31645
                    - x: 36.79662
                      y: 53.08273
                    - x: 36.54966
                      y: 53.64004
                    - x: 35.97342
                      y: 53.84902
                    - x: 34.65633
                      y: 53.64004
                    - x: 33.83313
                      y: 53.08273
                    - x: 33.09226
                      y: 52.5951
                    - x: 32.26907
                      y: 51.75915
                    - x: 31.19892
                      y: 50.71421
                    - x: 30.45805
                      y: 49.66928
                    - x: 29.88182
                      y: 48.83333
                    - x: 28.56471
                      y: 47.02211
                    - x: 28.31775
                      y: 46.18616
                    - x: 28.0708
                      y: 45.69852
                    - x: 28.0708
                      y: 45.14123
                    - x: 28.31775
                      y: 44.37494
                    - x: 28.56471
                      y: 43.53899
                    - x: 29.88182
                      y: 42.2154
                    - x: 30.70501
                      y: 41.44912
                    - x: 31.77516
                      y: 40.68283
                    - x: 32.8453
                      y: 39.56823
                    - x: 35.47952
                      y: 37.75701
                    - x: 36.79662
                      y: 36.92107
                    - x: 39.67778
                      y: 35.38849
                    - x: 42.31199
                      y: 34.0649
                    - x: 43.6291
                      y: 33.50761
                    - x: 46.26331
                      y: 32.74132
                    - x: 47.33346
                      y: 32.46267
                    - x: 49.22679
                      y: 32.18402
                    - x: 49.72071
                      y: 31.90537
                    - x: 50.29694
                      y: 31.90537
                    - x: 50.79086
                      y: 31.90537
                    - x: 51.03782
                      y: 31.90537
                    - x: 51.03782
                      y: 31.90537
                    - x: 50.29694
                      y: 31.90537
                    - x: 49.96766
                      y: 32.18402
                    - x: 49.47375
                      y: 32.46267
                    - x: 48.65057
                      y: 32.74132
                    - x: 47.90969
                      y: 33.22896
                    - x: 47.0865
                      y: 33.78626
                    - x: 46.26331
                      y: 34.27389
                    - x: 44.69925
                      y: 35.87613
                    - x: 44.20533
                      y: 36.71207
                    - x: 43.95837
                      y: 37.75701
                    - x: 43.6291
                      y: 38.5233
                    - x: 43.38214
                      y: 39.84688
                    - x: 43.6291
                      y: 40.12554
                    - x: 43.95837
                      y: 40.40418
                    - x: 44.20533
                      y: 40.68283
                    - x: 45.27548
                      y: 40.40418
                    - x: 46.01635
                      y: 40.12554
                    - x: 46.59258
                      y: 39.56823
                    - x: 47.0865
                      y: 38.80195
                    - x: 47.90969
                      y: 38.03566
                    - x: 48.97984
                      y: 36.15478
                    - x: 49.47375
                      y: 35.10984
                    - x: 49.72071
                      y: 34.27389
                    - x: 49.96766
                      y: 33.50761
                    - x: 50.29694
                      y: 32.46267
                    - x: 50.5439
                      y: 31.90537
                    - x: 50.5439
                      y: 31.90537
                    - x: 50.29694
                      y: 32.18402
                    - x: 50.29694
                      y: 32.74132
                    - x: 49.96766
                      y: 33.22896
                    - x: 49.72071
                      y: 34.83119
                    - x: 49.47375
                      y: 35.87613
                    - x: 49.47375
                      y: 37.75701
                    - x: 49.47375
                      y: 38.5233
                    - x: 49.72071
                      y: 39.0806
                    - x: 49.72071
                      y: 39.35925
                    - x: 50.29694
                      y: 39.56823
                    - x: 50.79086
                      y: 39.56823
                    - x: 51.03782
                      y: 39.35925
                    - x: 51.61405
                      y: 38.80195
                    - x: 52.6842
                      y: 37.47836
                    - x: 53.1781
                      y: 36.71207
                    - x: 53.67202
                      y: 35.87613
                    - x: 54.24826
                      y: 35.10984
                    - x: 54.74217
                      y: 34.55254
                    - x: 55.3184
                      y: 33.50761
                    - x: 55.56536
                      y: 33.22896
                    - x: 55.56536
                      y: 32.95031
                    - x: 55.56536
                      y: 32.95031
                    - x: 55.56536
                      y: 33.78626
                    - x: 55.3184
                      y: 34.27389
                    - x: 55.07145
                      y: 35.38849
                    - x: 55.07145
                      y: 36.15478
                    - x: 55.07145
                      y: 36.92107
                    - x: 55.07145
                      y: 37.47836
                    - x: 55.3184
                      y: 38.03566
                    - x: 55.3184
                      y: 38.24465
                    - x: 55.56536
                      y: 38.5233
                    - x: 56.05928
                      y: 38.5233
                    - x: 56.38855
                      y: 38.24465
                    - x: 56.63551
                      y: 38.03566
                    - x: 57.12943
                      y: 37.75701
                    - x: 57.70565
                      y: 36.71207
                    - x: 58.19957
                      y: 36.15478
                    - x: 58.44653
                      y: 35.10984
                    - x: 58.77581
                      y: 34.55254
                    - x: 58.77581
                      y: 34.27389
                    - x: 59.02276
                      y: 34.0649
                    - x: 59.02276
                      y: 33.78626
                    - x: 59.02276
                      y: 33.78626
                    - x: 58.77581
                      y: 34.27389
                    - x: 58.77581
                      y: 34.55254
                    - x: 58.77581
                      y: 35.10984
                    - x: 58.77581
                      y: 35.38849
                    - x: 58.44653
                      y: 36.71207
                    - x: 58.77581
                      y: 37.47836
                    - x: 58.77581
                      y: 38.03566
                    - x: 59.02276
                      y: 38.80195
                    - x: 59.51667
                      y: 39.56823
                    - x: 60.09291
                      y: 39.84688
                    - x: 60.58682
                      y: 39.84688
                    - x: 61.08074
                      y: 39.56823
                    - x: 61.90393
                      y: 39.35925
                    - x: 63.46799
                      y: 38.24465
                    - x: 64.53814
                      y: 37.19971
                    - x: 65.60828
                      y: 36.15478
                    - x: 66.67844
                      y: 34.55254
                    - x: 68.48946
                      y: 31.41773
                    - x: 69.31265
                      y: 29.53685
                    - x: 70.62975
                      y: 25.5661
                    - x: 71.20598
                      y: 23.47622
                    - x: 71.45294
                      y: 21.87399
                    - x: 71.6999
                      y: 20.5504
                    - x: 71.6999
                      y: 18.18188
                    - x: 71.45294
                      y: 17.34593
                    - x: 70.8767
                      y: 16.57965
                    - x: 70.62975
                      y: 16.301
                    - x: 70.3828
                      y: 16.57965
                    - x: 69.88888
                      y: 16.8583
                    - x: 68.81873
                      y: 18.18188
                    - x: 68.24249
                      y: 19.22682
                    - x: 67.17235
                      y: 21.59534
                    - x: 66.43147
                      y: 22.91892
                    - x: 65.85524
                      y: 24.52116
                    - x: 65.60828
                      y: 26.12339
                    - x: 64.7851
                      y: 29.2582
                    - x: 64.53814
                      y: 30.58179
                    - x: 64.29118
                      y: 33.22896
                    - x: 64.53814
                      y: 34.55254
                    - x: 64.53814
                      y: 5.59748
                    - x: 64.7851
                      y: 36.71207
                    - x: 65.85524
                      y: 38.24465
                    - x: 66.43147
                      y: 38.80195
                    - x: 67.99554
                      y: 39.35925
                    - x: 68.81873
                      y: 39.56823
                    - x: 69.5596
                      y: 39.35925
                    - x: 70.62975
                      y: 39.0806
                    - x: 73.01699
                      y: 37.75701
                    - x: 74.33411
                      y: 36.71207
                    - x: 76.72135
                      y: 34.0649
                    - x: 78.03847
                      y: 32.18402
                    - x: 79.35557
                      y: 30.30314
                    - x: 80.67267
                      y: 28.21327
                    - x: 82.81297
                      y: 23.75487
                    - x: 83.88311
                      y: 21.31669
                    - x: 85.20022
                      y: 17.34593
                    - x: 85.69414
                      y: 15.53471
                    - x: 86.02341
                      y: 14.21113
                    - x: 86.27037
                      y: 13.16619
                    - x: 86.27037
                      y: 11.56396
                    - x: 86.27037
                      y: 11.28531
                    - x: 86.27037
                      y: 11.00666
                    - x: 86.02341
                      y: 11.28531
                    - x: 86.02341
                      y: 11.28531
                    - x: 86.02341
                      y: 11.84261
                    - x: 85.44718
                      y: 12.88754
                    - x: 85.44718
                      y: 13.65383
                    - x: 84.95326
                      y: 15.81336
                    - x: 84.70631
                      y: 16.8583
                    - x: 84.37703
                      y: 17.90323
                    - x: 83.88311
                      y: 19.22682
                    - x: 83.30688
                      y: 22.15264
                    - x: 82.81297
                      y: 23.75487
                    - x: 81.98978
                      y: 26.88968
                    - x: 81.49586
                      y: 28.49191
                    - x: 81.00195
                      y: 30.09415
                    - x: 80.67267
                      y: 31.62672
                    - x: 80.17876
                      y: 34.27389
                    - x: 79.9318
                      y: 35.38849
                    - x: 79.60252
                      y: 37.47836
                    - x: 79.60252
                      y: 38.24465
                    - x: 79.60252
                      y: 38.80195
                    - x: 79.9318
                      y: 39.35925
                    - x: 80.42571
                      y: 40.40418
                    - x: 81.00195
                      y: 40.68283
                    - x: 82.31906
                      y: 40.89182
                    - x: 83.05993
                      y: 40.89182
                    - x: 83.88311
                      y: 40.89182
                    - x: 84.95326
                      y: 40.68283
                    - x: 86.76428
                      y: 39.56823
                    - x: 87.58747
                      y: 39.0806
                    - x: 89.15154
                      y: 38.03566
                    - x: 89.72777
                      y: 37.19971
                    - x: 90.22169
                      y: 36.43343
                - id: 2
                  kind: inkWriting
                  points:
                    - x: 80.17876
                      y: 20.27175
                    - x: 80.17876
                      y: 20.27175
                    - x: 80.17876
                      y: 20.27175
                    - x: 80.17876
                      y: 20.27175
                    - x: 80.17876
                      y: 20.5504
                    - x: 80.17876
                      y: 20.5504
                    - x: 80.17876
                      y: 20.5504
                    - x: 80.17876
                      y: 20.5504
                    - x: 80.42571
                      y: 20.5504
                    - x: 80.42571
                      y: 20.5504
                    - x: 80.67267
                      y: 20.5504
                    - x: 81.00195
                      y: 20.5504
                    - x: 81.49586
                      y: 20.5504
                    - x: 81.98978
                      y: 20.5504
                    - x: 82.56602
                      y: 20.5504
                    - x: 83.30688
                      y: 20.5504
                    - x: 84.13007
                      y: 20.5504
                    - x: 84.95326
                      y: 20.27175
                    - x: 86.02341
                      y: 20.27175
                    - x: 86.76428
                      y: 20.27175
                    - x: 87.58747
                      y: 20.27175
                    - x: 88.41067
                      y: 19.9931
                    - x: 89.15154
                      y: 19.9931
                    - x: 89.72777
                      y: 19.9931
                    - x: 90.22169
                      y: 19.78412
                    - x: 90.46864
                      y: 19.78412
                    - x: 90.7156
                      y: 19.78412
                    - x: 91.04487
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.29183
                      y: 19.78412
                    - x: 91.53879
                      y: 19.78412
                    - x: 91.53879
                      y: 19.78412
                    - x: 91.78574
                      y: 19.78412
          responses:
            "200":
              body:
                recognitionUnits:
                  - alternates:
                      - category: inkWord
                        recognizedString: defaults
                      - category: inkWord
                        recognizedString: defiant
                      - category: inkWord
                        recognizedString: defaulter
                      - category: inkWord
                        recognizedString: default's
                      - category: inkWord
                        recognizedString: defaults'
                      - category: inkWord
                        recognizedString: defaulted
                      - category: inkWord
                        recognizedString: descant
                      - category: inkWord
                        recognizedString: decant
                      - category: inkWord
                        recognizedString: defat
                    boundingRectangle:
                      height: 43.88999938964844
                      topX: 6.909999847412109
                      topY: 9.960000038146973
                      width: 84.87999725341797
                    category: inkWord
                    class: leaf
                    id: 4
                    parentId: 3
                    recognizedText: default
                    rotatedBoundingRectangle:
                      - x: 3.180000066757202
                        y: 15.670000076293945
                      - x: 89.41999816894531
                        y: 3.3299999237060547
                      - x: 95.43000030517578
                        y: 45.33000183105469
                      - x: 9.1899995803833
                        y: 57.66999816894531
                    strokeIds:
                      - 1
                      - 2
                  - alternates:
                      - category: inkWord
                        recognizedString: defaults
                      - category: inkWord
                        recognizedString: defiant
                      - category: inkWord
                        recognizedString: defaulter
                      - category: inkWord
                        recognizedString: default's
                      - category: inkWord
                        recognizedString: defaults'
                      - category: inkWord
                        recognizedString: defaulted
                      - category: inkWord
                        recognizedString: descant
                      - category: inkWord
                        recognizedString: decant
                      - category: inkWord
                        recognizedString: defat
                    boundingRectangle:
                      height: 43.88999938964844
                      topX: 6.909999847412109
                      topY: 9.960000038146973
                      width: 84.87999725341797
                    category: line
                    childIds:
                      - 4
                    class: container
                    id: 3
                    parentId: 2
                    recognizedText: default
                    rotatedBoundingRectangle:
                      - x: 3.180000066757202
                        y: 15.670000076293945
                      - x: 89.41999816894531
                        y: 3.3299999237060547
                      - x: 95.43000030517578
                        y: 45.33000183105469
                      - x: 9.1899995803833
                        y: 57.66999816894531
                    strokeIds:
                      - 1
                      - 2
                  - boundingRectangle:
                      height: 43.88999938964844
                      topX: 6.909999847412109
                      topY: 9.960000038146973
                      width: 84.87999725341797
                    category: paragraph
                    childIds:
                      - 3
                    class: container
                    id: 2
                    parentId: 1
                    rotatedBoundingRectangle:
                      - x: 3.180000066757202
                        y: 15.670000076293945
                      - x: 89.41999816894531
                        y: 3.3299999237060547
                      - x: 95.43000030517578
                        y: 45.33000183105469
                      - x: 9.1899995803833
                        y: 57.66999816894531
                    strokeIds:
                      - 1
                      - 2
                  - boundingRectangle:
                      height: 43.88999938964844
                      topX: 6.909999847412109
                      topY: 9.960000038146973
                      width: 84.87999725341797
                    category: writingRegion
                    childIds:
                      - 2
                    class: container
                    id: 1
                    parentId: 0
                    rotatedBoundingRectangle:
                      - x: 3.180000066757202
                        y: 15.670000076293945
                      - x: 89.41999816894531
                        y: 3.3299999237060547
                      - x: 95.43000030517578
                        y: 45.33000183105469
                      - x: 9.1899995803833
                        y: 57.66999816894531
                    strokeIds:
                      - 1
                      - 2
                  - boundingRectangle:
                      height: 43.88999938964844
                      topX: 6.909999847412109
                      topY: 9.960000038146973
                      width: 84.87999725341797
                    category: root
                    childIds:
                      - 1
                    class: container
                    id: 0
                    parentId: -1
                    rotatedBoundingRectangle:
                      - x: 6.909999847412109
                        y: 9.960000038146973
                      - x: 91.7899957275305
                        y: 9.960000038146973
                      - x: 6.909999847412109
                        y: 53.84999393463135
                      - x: 91.78999572753905
                        y: 53.84999393463135
                    strokeIds:
                      - 1
                      - 2
              headers: {}
definitions:
  alternatePattern:
    description: The list of alternates for the core recognition result. In case of handwriting related recognition units, this list includes other words that are close possibilities to the results provided as 'recognizedText'.
    items:
      properties:
        category:
          $ref: "#/definitions/leafCategoryPattern"
        confidence:
          description: A number between 0 and 1 which indicates the confidence level in the result
          type: number
        points:
          description: Array of point objects that represent points that are relevant to the type of recognition unit. For example, for leaf node of inkDrawing category that represents a triangle, points would include the x,y coordinates of the vertices of the recognized triangle. The points represent the coordinates of points used to create the perfectly drawn shape that is closest to the original input. They may not exactly match.
          items:
            $ref: "#/definitions/pointDetailsPattern"
          type: array
        recognizedString:
          description: The recognized string from an inkWord or the name of a recognized shape in an inkDrawing object
          type: string
        rotationAngle:
          description: The angular orientation of an object relative to the horizontal axis
          type: number
      required:
        - category
        - recognizedString
      type: object
    type: array
  analysisRequest:
    description: This shows the expected contents of a request
    properties:
      applicationType:
        description: This describes the domain of the client application
        enum:
          - drawing
          - writing
          - mixed
        type: string
        x-ms-enum:
          modelAsString: true
          name: application
      inkPointValueAttributes:
        items:
          $ref: "#/definitions/inkPointValueAttribute"
        type: array
      inputDeviceKind:
        description: This identifies the kind of device used as the writing instrument
        enum:
          - digitizer
          - pen
          - lightPen
          - touchScreen
          - touchPad
          - whiteBoard
          - 3dDigitizer
          - stereoPlotter
          - articulatedArm
          - armature
        type: string
        x-ms-enum:
          modelAsString: true
          name: inputDevice
      language:
        description: The IETF BCP 47 language code (for ex. en-US, en-GB, hi-IN etc.) of the expected language for the handwritten content in the ink strokes. The response will include results from this language.
        example: en-US
        type: string
      strokes:
        description: This is the array of strokes sent for recognition. Best results are produced when the order of strokes added in the array matches the order in which the user created them. Changing the stroke order may produce unexpected results.
        items:
          $ref: "#/definitions/stroke"
        type: array
      unit:
        description: This is the physical unit of the ink strokes. It is up to the application developer to decide how to convert the device specific units to physical units before calling the service. The conversion factor can be different based on the type of the device used.
        enum:
          - mm
          - cm
          - in
        type: string
        x-ms-enum:
          modelAsString: true
          name: unit
      unitMultiple:
        description: " This is a scaling factor to be applied to the point coordinates when interpreting them in the physical units specified."
        type: number
    required:
      - strokes
      - language
    type: object
  analysisResponse:
    description: This shows the expected contents of a response from the service
    properties:
      language:
        description: This is the language used for recognizing handwriting from the ink strokes in the request.
        type: string
      recognitionUnits:
        $ref: "#/definitions/recognitionUnit"
      unit:
        description: This is the physical unit of the ink strokes. It is up to the application developer to decide how to convert the device specific units to physical units before calling the service. The conversion factor can be different based on the type of the device used.
        enum:
          - mm
          - cm
          - in
        type: string
        x-ms-enum:
          modelAsString: true
          name: unit
      unitMultiple:
        description: " This is a scaling factor to be applied to the point coordinates when interpreting them in the physical units specified."
        type: number
    required:
      - recognitionUnits
    type: object
  categoryPattern:
    description: The category of a recognition unit represents the type of content for that unit.
    enum:
      - root
      - writingRegion
      - paragraph
      - line
      - inkBullet
      - inkDrawing
      - inkWord
      - unknown
    type: string
    x-ms-enum:
      modelAsString: true
      name: category
  classPattern:
    description: The class represents the type of the recognition unit. A recognition unit can be a leaf node or a container node. Container nodes typically have leaf nodes as children.
    enum:
      - container
      - leaf
    type: string
  containerCategoryPattern:
    description: The category of recognition units that represent types that have children recognition units.
    enum:
      - root
      - writingRegion
      - paragraph
      - line
    type: string
    x-ms-enum:
      modelAsString: true
      name: container
  drawingAttributesPattern:
    description: The properties to use when rendering ink
    properties:
      color:
        description: This shows the components of the color in rgba format
        properties:
          a:
            description: The alpha component of the color
            type: number
          b:
            description: The blue component of the color
            type: number
          g:
            description: The green component of the color
            type: number
          r:
            description: The red component of the color
            type: number
        type: object
      fitToCurve:
        description: " This indicates whether Bezier smoothing is used to render the stroke"
        type: boolean
      height:
        description: The height of the stylus used to draw the stroke
        type: number
      ignorePressure:
        description: " This indicates whether the thickness of a rendered Stroke changes according the amount of pressure applied."
        type: boolean
      rasterOp:
        enum:
          - noOperation
          - copyPen
          - maskPen
        type: string
        x-ms-enum:
          modelAsString: true
          name: rasterOp
      tip:
        description: This specifies the tip to be used to draw a stroke
        enum:
          - ellipse
          - rectangle
        type: string
        x-ms-enum:
          modelAsString: true
          name: tip
      width:
        description: The width of the stylus used to draw the stroke
        type: number
    type: object
  errorModel:
    properties:
      code:
        description: This represents the error code
        type: string
      details:
        description: This gives details of the reason(s) for the error
        items:
          properties:
            code:
              description: This represents the error code
              type: string
            message:
              description: This represents the error message
              type: string
            target:
              description: This represents the target of the error message
              type: string
        type: array
      message:
        description: This represents the error message
        type: string
      target:
        description: This represents the target of the error message
        type: string
    required:
      - code
      - message
    type: object
  inkPoint:
    description: An object containing the properties of an point in the path of an ink stroke. The main properties are the x and y values. Other include tip pressure, x tilt etc. For the coordinate values, it is recommended to have a precision of 8 digits after the decimal to obtain most accurate recognition results. The origin (0,0) of the canvas is assumed to be at the top left corner of the canvas
    properties:
      barrelPressure:
        description: The force exerted directly by the user on a transducer sensor, such as a pressure-sensitive button on the barrel of a stylus. This may not be used for recognition.
        type: number
      barrelSwitch:
        description: A non-tip button located on the barrel of a stylus. Its function is typically mapped to a system secondary button. This may not be used for recognition.
        type: boolean
      eraser:
        description: The control is used for erasing objects. It is typically located opposite the writing end of a stylus. This may not be used for recognition.
        type: boolean
      height:
        description: The height of the tip of the writing instrument. This is used by touch screen devices to report the height of the finger contact on the writing surface. This may not be used for recognition.
        type: number
      inverted:
        description: A value that indicates that the currently sensed position originates from the end of a stylus opposite the tip switch. This may not be used for recognition.
        type: boolean
      secondaryTip:
        description: A secondary switch used in conjunction with the tip switch to indicate pressure above a certain threshold applied with the stylus. This may not be used for recognition.
        type: boolean
      timestamp:
        description: The time relative to the absolute time the transducer last became active. This may not be used for recognition.
        type: number
      tipPressure:
        description: The force exerted against the tablet surface by the transducer, typically a stylus. This may not be used for recognition.
        type: number
      tipSwitch:
        description: A switch located on the tip of a stylus indicating contact of the stylus with a surface. This may not be used for recognition.
        type: boolean
      width:
        description: The width of the tip of the writing instrument. This is used by touch screen devices to report the width of the finger contact on the writing surface. This may not be used for recognition.
        type: number
      x:
        description: The x coordinate of the pen location on the writing surface.
        type: number
      xTilt:
        description: The plane angle between the Y-Z plane and the plane containing the transducer axis and the Y axis. This may not be used for recognition.
        type: number
      y:
        description: The y coordinate of the pen location on the writing surface.
        type: number
      yTilt:
        description: The angle between the X-Z and transducer-X planes. A positive Y Tilt is toward the user. This may not be used for recognition.
        type: number
      z:
        description: The z coordinate of the pen location on the writing space. This may not be used for recognition.
        type: number
    required:
      - x
      - y
    type: object
  inkPointValueAttribute:
    description: A container for the attributes of a value contained in the ink point object.
    properties:
      logicalMaximum:
        description: The maximum value for the attribute
        type: number
      logicalMinimum:
        description: The minimum value for the attribute
        type: number
      name:
        description: The name of the point attribute.
        type: string
    type: object
  leafCategoryPattern:
    description: The category of recognition units that represent types that don't have children recognition units.
    enum:
      - inkDrawing
      - inkBullet
      - inkWord
      - unknown
    type: string
    x-ms-enum:
      modelAsString: true
      name: leaf
  pointDetailsPattern:
    description: This holds all the properties of one point
    properties:
      x:
        description: This represents the x coordinate of the point
        type: number
      y:
        description: This represents the y coordinate of the point
        type: number
    required:
      - x
      - y
    type: object
  recognitionUnit:
    description: The list of recognition units based on the analysis of the ink strokes.
    items:
      description: This identifies the recognized entity
      properties:
        alternates:
          $ref: "#/definitions/alternatePattern"
        boundingRectangle:
          description: "The bounding rectangle of the recognition unit represented by the coordinates of the top left corner (topX,topY) along with width and height of the rectangle. Note that this rectangle is not rotated. So for  rotated objects such as slanted handwriting, it will cover the entire object. The unit will be matched to the one specified in the original request (mm by default.) "
          properties:
            height:
              description: The is the height of the bounding rectangle
              type: number
            topX:
              description: This is the top left x coordinate
              type: number
            topY:
              description: This is the top left y coordinate
              type: number
            width:
              description: This is width of the bounding rectangle
              type: number
          type: object
        category:
          $ref: "#/definitions/categoryPattern"
        center:
          $ref: "#/definitions/pointDetailsPattern"
          description: The coordinates (x,y) of the center of the recognition unit.
        childIds:
          description: An array of integers representing the identifier of each child of the current recognition unit.
          items:
            type: integer
          type: array
        class:
          $ref: "#/definitions/classPattern"
        confidence:
          description: A number between 0 and 1 which indicates the confidence level in the result.
          type: number
        id:
          description: The identifier of the recognition unit. This id is used to indicate parent/child relationship between different recognition units.
          type: integer
        parentId:
          description: The id of the parent node in the tree structure of the recognition results. parent = 0 indicates that there is no dedicated parent node for this unit.
          type: integer
        points:
          description: Array of point objects that represent points that are relevant to the type of recognition unit. For example, for a leaf node of inkDrawing category that represents a triangle, points would include the x, y coordinates of the vertices of the recognized triangle. The points represent the coordinates used to create the perfectly drawn shape that is closest to the original input. They may not exactly match.
          items:
            $ref: "#/definitions/pointDetailsPattern"
          type: array
        recognizedObject:
          $ref: "#/definitions/shapePattern"
        recognizedText:
          description: The string contains the text that was recognized. It can be an empty string if the recognizer cannot determine the text.
          type: string
        rotatedBoundingRectangle:
          description: This is the rotated bounding rectangle that covers the entire recognized object along the angle of rotation of the object. Note that this is NOT the same as rotating the boundingRectangle by the rotation angle.
          items:
            $ref: "#/definitions/pointDetailsPattern"
          type: array
        rotationAngle:
          description: This is the angle at which the unit is rotated in degrees with respect to the positive X axis.
          type: number
        strokeIds:
          description: This is an array of integers representing the list of stroke Identifiers from the input request body that belong to this recognition unit.
          items:
            type: integer
          type: array
      required:
        - category
        - parentId
        - strokeIds
        - class
        - id
      type: object
    type: array
  shapePattern:
    description: The category should be used to determines the field to read the recognition result. Recognized Object represents the shape that was recognized for the node with category as inkDrawing. For handwriting related nodes, recognizedText contains the actual recognition result.
    enum:
      - drawing
      - square
      - rectangle
      - circle
      - ellipse
      - triangle
      - isoscelesTriangle
      - equilateralTriangle
      - rightTriangle
      - quadrilateral
      - diamond
      - trapezoid
      - parallelogram
      - pentagon
      - hexagon
      - blockArrow
      - heart
      - starSimple
      - starCrossed
      - cloud
      - line
      - curve
      - polyLine
    type: string
    x-ms-enum:
      modelAsString: true
      name: shape
  stroke:
    properties:
      drawingAttributes:
        $ref: "#/definitions/drawingAttributesPattern"
      id:
        description: This is treated as a unique identifier for each stroke within a request. If the id is repeated within the same request, the service will return an error.
        type: integer
      kind:
        description: This is an optional property which influences the decision about what the stroke kind is between inkWriting and inkDrawing. This property should be set ONLY if the type of user content is known ahead of time. Not setting this value implies the kind is not known ahead of time. Kind represents the type of content the stroke is a part of.
        enum:
          - inkDrawing
          - inkWriting
        type: string
        x-ms-enum:
          modelAsString: true
          name: kind
      language:
        description: The IETF BCP 47 language code (for ex. en-US, en-GB, hi-IN etc.) of the expected language for the handwritten content in this stroke. The response will include results from this language.
        type: string
      points:
        items:
          $ref: "#/definitions/inkPoint"
        type: array
    required:
      - points
      - id
    type: object
x-ms-parameterized-host:
  hostTemplate: "{Endpoint}/inkrecognizer/v1.0-preview"
  parameters:
    - $ref: "#/parameters/Endpoint"
