diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/InkRecognizer.json b/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/InkRecognizer.json new file mode 100644 index 000000000000..e43649726685 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/InkRecognizer.json @@ -0,0 +1,572 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Ink Recognizer Client", + "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" + }, + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/inkrecognizer/v1.0-preview", + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "paths": { + "/recognize": { + "put":{ + "tags": [ + "InkRecognizer" + ], + "operationId": "InkRecognizer_Recognize", + "x-ms-examples": { + "Identify a word written in ink" : { + "$ref": "./examples/InkWordRecognition.json" + } + }, + "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.", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "description": "The collection of stroke objects to send for analysis", + "schema": { + "$ref": "#/definitions/analysisRequest" + } + }, + { + "name": "x-ms-client-request-id", + "in": "header", + "description": "The request id used to uniquely identify each request during troubleshooting. This is an optional parameter useful for correlating logs and other artifacts.", + "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" + + } + + } + } + } + } + }, + "definitions": { + "drawingAttributesPattern": { + "type": "object", + "description": "The properties to use when rendering ink", + "properties": { + "width": { + "type": "number", + "description" : "The width of the stylus used to draw the stroke" + }, + "color": { + "type": "object", + "description" : "This shows the components of the color in rgba format", + "properties": { + "r" : { + "type" : "number", + "description" : "The red component of the color" + }, + "g" : { + "type" : "number", + "description" : "The green component of the color" + }, + "b" : { + "type" : "number", + "description" : "The blue component of the color" + }, + "a" : { + "type" : "number", + "description" : "The alpha component of the color" + } + } + }, + "height": { + "type": "number", + "description" : "The height of the stylus used to draw the stroke" + }, + "fitToCurve": { + "type": "boolean", + "description" : " This indicates whether Bezier smoothing is used to render the stroke" + }, + "rasterOp": { + "type": "string", + "enum": [ + "noOperation", + "copyPen", + "maskPen" + ], + "x-ms-enum" : { + "name" : "rasterOp", + "modelAsString": true + } + }, + "ignorePressure": { + "type": "boolean", + "description" : " This indicates whether the thickness of a rendered Stroke changes according the amount of pressure applied." + }, + "tip": { + "type": "string", + "description" : "This specifies the tip to be used to draw a stroke", + "enum": [ + "ellipse", + "rectangle" + ], + "x-ms-enum" : { + "name" : "tip", + "modelAsString": true + } + } + } + }, + "pointDetailsPattern" : { + "type": "object", + "description" : "This holds all the properties of one point", + "properties" : { + "x" : { + "type": "number", + "description" : "This represents the x coordinate of the point" + }, + "y" : { + "type": "number", + "description" : "This represents the y coordinate of the point" + } + }, + "required" : [ "x", "y"] + }, + + "shapePattern": { + "type": "string", + "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" + ], + "x-ms-enum" : { + "name" : "shape", + "modelAsString": true + } + }, + "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.", + "type": "string", + "enum": [ + "container", + "leaf" + ] + }, + "categoryPattern": { + "type": "string", + "description" : "The category of a recognition unit represents the type of content for that unit.", + "enum": [ + "writingRegion", + "paragraph", + "listItem", + "line", + "inkBullet", + "inkDrawing", + "inkWord", + "unknown" + ], + "x-ms-enum" : { + "name" : "category", + "modelAsString": true + } + }, + "containerCategoryPattern": { + "type": "string", + "description" : "The category of recognition units that represent types that have children recognition units.", + "enum": [ + "writingRegion", + "paragraph", + "listItem", + "line" + ], + "x-ms-enum" : { + "name" : "container", + "modelAsString": true + } + }, + "leafCategoryPattern": { + "type": "string", + "description" : "The category of recognition units that represent types that don't have children recognition units.", + "enum": [ + "inkDrawing", + "inkBullet", + "inkWord", + "unknown" + ], + "x-ms-enum" : { + "name" : "leaf", + "modelAsString": true + } + }, + "alternatePattern": { + "type": "array", + "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" + }, + "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.", + "type" : "array", + "items" : { + "$ref" : "#/definitions/pointDetailsPattern" + } + }, + "rotationAngle": { + "description" : "The angular orientation of an object relative to the horizontal axis", + "type": "number" + }, + "confidence": { + "type": "number", + "description" : "A number between 0 and 1 which indicates the confidence level in the result" + }, + "recognizedString": { + "type": "string", + "description" : "The recognized string from an inkWord or the name of a recognized shape in an inkDrawing object" + } + }, + "required": [ + "category", + "recognizedString" + ], + "type": "object" + } + }, + + "recognitionUnit": { + "items": { + "properties": { + "id": { + "type": "integer", + "description" : "The identifier of the recognition unit. This id is used to indicate parent/child relationship between different recognition units." + }, + "category": { + "$ref": "#/definitions/categoryPattern" + }, + "alternates": { + "$ref": "#/definitions/alternatePattern" + }, + "center": { + "description" : "The coordinates (x,y) of the center of the recognition unit.", + "$ref" : "#/definitions/pointDetailsPattern" + }, + "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.", + "type" : "array", + "items" : { + "$ref" : "#/definitions/pointDetailsPattern" + } + }, + "childIds": { + "description" : "An array of integers representing the identifier of each child of the current recognition unit.", + "type" : "array", + "items" : { + "type" :"integer" + } + }, + "class": { + "$ref": "#/definitions/classPattern" + }, + "parentId": { + "type": "integer", + "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." + }, + "boundingRectangle": { + "description" : "The bounding rectangle of the recognized unit represented by the coordinates of the top left corner (x,y) along with width (w) and height (h) 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.) ", + "type" : "object", + "properties" : { + "topX" : { + "type" : "number", + "description" : "This represents the top left x coordinate" + }, + "topY" : { + "type" : "number", + "description" : "This represents the top left y coordinate" + }, + "width" : { + "type" : "number", + "description" : "This represents width of the bounding rectangle" + }, + "height" : { + "type" : "number", + "description" : "The represents the height of the bounding rectangle" + } + } + }, + "rotatedBoundingRectangle": { + "description" : "This property provides 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.", + "type": "array", + "items" : { + "$ref" : "#/definitions/pointDetailsPattern" + } + }, + "strokeIds": { + "description" : "This is an array of integers representing the list of stroke Identifier integers from the input request body that belong to this recognition unit.", + "type" : "array", + "items" : { + "type" :"integer" + } + }, + "recognizedText": { + "type": "string", + "description" : "The string represents the text that was recognized. It can be an empty string if the recognizer cannot determine the text." + }, + "confidence": { + "type": "number", + "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." + }, + "rotationAngle": { + "type": "number", + "description" :"This represents the angle at which the unit is rotated in degrees with respect to the positive X axis." + }, + "recognizedObject": { + "$ref": "#/definitions/shapePattern" + } + }, + "required": [ + "category", + "parentId", + "strokeIds", + "class", + "id" + ], + "type": "object", + "description" : "This represents the recognized entity" + }, + "type": "array", + "description" : "The list of recognition units based on the analysis of the ink strokes." + }, + "stroke": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "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." + }, + "language": { + "type": "string", + "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." + }, + "points": { + "type" : "string", + "description" : "A string of comma separated floating point values that represent the x and y coordinates of points that are part of the stroke. (X1,Y1, X2,Y2…). 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" + + }, + "drawingAttributes": { + "$ref": "#/definitions/drawingAttributesPattern" + }, + "kind": { + "type": "string", + "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" + ], + "x-ms-enum" : { + "name" : "kind", + "modelAsString": true + } + } + }, + "required": [ + "points", + "id" + ] + }, + + "analysisResponse": { + "type": "object", + "description" : "This shows the expected contents of a response from the service", + "properties": { + "unit": { + "type": "string", + "description" : "This represents the physical units 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" + ], + "x-ms-enum" : { + "name" : "unit", + "modelAsString": true + } + }, + + "unitMultiple": { + "description" : " This is a scaling factor to be applied to the point coordinates when interpreting them in the physical units specified.", + "type": "number" + }, + "language": { + "type": "string", + "description": "This is the language used for recognizing handwriting from the ink strokes in the request. Set this to the user’s preferred language." + }, + "recognitionUnits": { + "$ref": "#/definitions/recognitionUnit" + } + + }, + "required": [ + "recognitionUnits" + ] + }, + "errorModel" : { + "type" : "object", + "properties" : { + "code": { + "type": "string", + "description" : "This represents the error code" + }, + "message": { + "type": "string", + "description" : "This represents the error message" + }, + "target" : { + "type" : "string", + "description" : "This represents the target of the error message" + }, + "details" : { + "type" : "array", + "description" : "This gives details of the reason(s) for the error", + "items" : { + "properties" : { + "code": { + "type": "string", + "description" : "This represents the error code" + }, + "message": { + "type": "string", + "description" : "This represents the error message" + }, + "target" : { + "type" : "string", + "description" : "This represents the target of the error message" + } + } + } + } + }, + "required" : [ + "code", "message" + ] + }, + "analysisRequest": { + "type": "object", + "description" : "This shows the expected contents of a request", + "required": [ + "strokes", + "language" + ], + "properties": { + + "applicationType": { + "type": "string", + "description" : "This describes the domain of the client application", + "enum": [ + "drawing", + "writing", + "mixed" + ], + "x-ms-enum" : { + "name" : "application", + "modelAsString": true + } + }, + + "unit": { + "type": "string", + "description" : "This represents the physical units 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" + ] + }, + "unitMultiple": { + "description" : " This is a scaling factor to be applied to the point coordinates when interpreting them in the physical units specified.", + "type": "number" + }, + "language": { + "type": "string", + "example": "en-US", + "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." + }, + "strokes": { + "type": "array", + "items": { + "$ref": "#/definitions/stroke" + }, + "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." + } + } + } + }, + "parameters": { + "Endpoint": { + "name": "Endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + } + } +} + diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/examples/InkWordRecognition.json b/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/examples/InkWordRecognition.json new file mode 100644 index 000000000000..c2b51e166345 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/preview/v1.0/examples/InkWordRecognition.json @@ -0,0 +1,232 @@ +{ + "parameters" : { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "body" : { + "language": "en-US", + "strokes": [ + { + "id": 1, + "kind": "inkWriting", + "points":"19.34498,28.21327,19.34498,27.93462,19.34498,27.65597,19.0157,27.65597,18.76874,27.44698,18.27483,27.44698,18.02787,27.44698,17.45164,27.44698,16.62845,27.65597,15.88758,27.93462,15.06439,28.49191,14.32351,28.97955,13.25337,29.53685,11.36003,31.41773,10.61916,32.46267,9.795967,33.50761,8.972776,34.83119,8.231905,35.87613,7.655672,37.19971,7.161757,38.24465,6.9148,39.35925,6.9148,40.12554,6.9148,40.89182,6.9148,41.72777,7.408715,42.2154,7.902629,42.49405,8.478863,42.77271,8.972776,43.05135,9.795967,43.05135,10.28988,43.05135,11.11307,42.77271,11.93626,42.2154,12.43018,41.72777,13.25337,41.17047,13.74728,40.12554,14.57047,39.0806,15.31134,37.75701,15.88758,36.15478,16.62845,34.27389,17.20468,32.46267,17.6986,30.30314,18.27483,28.21327,18.76874,26.12339,19.34498,23.96386,19.59193,21.87399,19.83889,19.9931,20.08585,18.46053,20.08585,17.13695,20.08585,16.02235,20.08585,14.97741,20.08585,14.48978,20.08585,13.93248,19.83889,13.65383,19.83889,13.65383,19.83889,13.65383,19.59193,13.65383,19.59193,13. 65383,19.34498,14.21113,19.34498,14.69876,19.0157,15.25606,19.0157,16.02235,18.76874,17.13695,18.76874,18.46053,18.52179,19.78412,18.27483,21.31669,18.02787,22.91892,18.02787,24.52116,17.6986,26.33238,17.45164,28.21327,17.20468,30.09415,16.95773,31.90537,16.62845,33.50761,16.62845,35.10984,16.62845,36.71207,16.62845,38.03566,16.95773,39.0806,17.20468,39.84688,17.45164,40.68283,18.02787,41.17047,18.52179,41.72777,19.34498,42.00642,19.83889,42.00642,20.90904,41.72777,21.73223,41.44912,22.4731,40.89182,23.54325,40.12554,24.36644,39.35925,25.10731,38.5233,25.9305,37.47836,26.75369,36.71207,27.24761,35.59748,27.49457,34.55254,27.74152,33.50761,28.0708,32.46267,28.0708,31.62672,28.0708,30.86044,28.0708,30.09415,27.74152,29.53685,27.49457,28.97955,27.24761,28.77056,26.75369,28.49191,26.42442,28.49191,25.9305,28.49191,25.43659,28.97955,25.10731,29.53685,24.6134,30.09415,24.03716,30.86044,23.79021,31.90537,23.29629,33.22896,23.04934,34.27389,22.72006,35.59748,22.72006,36.71207,22.4731,38.03566,22.72006,39.0806,22.72006,40.12554,23.04934,40.89182,23.29629,41.72777,23.79021,42.2154,24.36644,42.77271,24.86036,43.05135,25.68354,43.05135,26.42442,43.05135,27.24761,42.77271,28.31775,42.2154,29.3879,41.72777,30.45805,40.89182,31.44588,39.84688,32.8453,38.80195,33.83313,37.47836,35.15023,35.87613,36.22039,34.27389,37.29053,32.46267,39.43083,27.93462,40.50097,25.5661,41.24184,23.19757,41.81808,20.82905,42.55895,18.46053,42.88823,16.301,43.38214,14.48978,43.6291,11.84261,43.6291,10.72801,43.6291,10.24037,43.38214,9.96172,43.38214,9.96172,43.13519,9.96172,42.88823,10.72801,42.31199,12.60889,41.81808,14.21113,41.24184,16.02235,40.74793,18.18188,40.25402,20.5504,39.67778,23.19757,39.43083,25.84475,38.60764,31.13909,38.36068,33.78626,38.36068,36.43343,38.11372,38.80195,38.11372,40.89182,38.11372,43.05135,37.86677,45.14123,37.53749,48.62434,37.53749,49.94793,37.29053,51.27151,37.04358,52.31645,36.79662,53.08273,36.54966,53.64004,35.97342,53.84902,34.65633,53.64004,33.83313,53.08273,33.09226,52.5951,32.26907,51.75915,31.19892,50.71421,30.45805,49.66928,29.88182,48.83333,28.56471,47.02211,28.31775,46.18616,28.0708,45.69852,28.0708,45.14123,28.31775,44.37494,28.56471,43.53899,29.88182,42.2154,30.70501,41.44912,31.77516,40.68283,32.8453,39.56823,35.47952,37.75701,36.79662,36.92107,39.67778,35.38849,42.31199,34.0649,43.6291,33.50761,46.26331,32.74132,47.33346,32.46267,49.22679,32.18402,49.72071,31.90537,50.29694,31.90537,50.79086,31.90537,51.03782,31.90537,51.03782,31.90537,50.29694,31.90537,49.96766,32.18402,49.47375,32.46267,48.65057,32.74132,47.90969,33.22896,47.0865,33.78626,46.26331,34.27389,44.69925,35.87613,44.20533,36.71207,43.95837,37.75701,43.6291,38.5233,43.38214,39.84688,43.6291,40.12554,43.95837,40.40418,44.20533,40.68283,45.27548,40.40418,46.01635,40.12554,46.59258,39.56823,47.0865,38.80195,47.90969,38.03566,48.97984,36.15478,49.47375,35.10984,49.72071,34.27389,49.96766,33.50761,50.29694,32.46267,50.5439,31.90537,50.5439,31.90537,50.29694,32.18402,50.29694,32.74132,49.96766,33.22896,49.72071,34.83119,49.47375,35.87613,49.47375,37.75701,49.47375,38.5233,49.72071,39.0806,49.72071,39.35925,50.29694,39.56823,50.79086,39.56823,51.03782,39.35925,51.61405,38.80195,52.6842,37.47836,53.1781,36.71207,53.67202,35.87613,54.24826,35.10984,54.74217,34.55254,55.3184,33.50761,55.56536,33.22896,55.56536,32.95031,55.56536,32.95031,55.56536,33.78626,55.3184,34.27389,55.07145,35.38849,55.07145,36.15478,55.07145,36.92107,55.07145,37.47836,55.3184,38.03566,55.3184,38.24465,55.56536,38.5233,56.05928,38.5233,56.38855,38.24465,56.63551,38.03566,57.12943,37.75701,57.70565,36.71207,58.19957,36.15478,58.44653,35.10984,58.77581,34.55254,58.77581,34.27389,59.02276,34.0649,59.02276,33.78626,59.02276,33.78626,58.77581,34.27389,58.77581,34.55254,58.77581,35.10984,58.77581,35.38849,58.44653,36.71207,58.77581,37.47836,58.77581,38.03566,59.02276,38.80195,59.51667,39.56823,60.09291,39.84688,60.58682,39.84688,61.08074,39.56823,61.90393,39.35925,63.46799,38.24465,64.53814,37.19971,65.60828,36.15478,66.67844,34.55254,68.48946,31.41773,69.31265,29.53685,70.62975,25.5661,71.20598,23.47622,71.45294,21.87399,71.6999,20.5504,71.6999,18.18188,71.45294,17.34593,70.8767,16.57965,70.62975,16.301,70.3828,16.57965,69.88888,16.8583,68.81873,18.18188,68.24249,19.22682,67.17235,21.59534,66.43147,22.91892,65.85524,24.52116,65.60828,26.12339,64.7851,29.2582,64.53814,30.58179,64.29118,33.22896,64.53814,34.55254,64.53814,35.59748,64.7851,36.71207,65.85524,38.24465,66.43147,38.80195,67.99554,39.35925,68.81873,39.56823,69.5596,39.35925,70.62975,39.0806,73.01699,37.75701,74.33411,36.71207,76.72135,34.0649,78.03847,32.18402,79.35557,30.30314,80.67267,28.21327,82.81297,23.75487,83.88311,21.31669,85.20022,17.34593,85.69414,15.53471,86.02341,14.21113,86.27037,13.16619,86.27037,11.56396,86.27037,11.28531,86.27037,11.00666,86.02341,11.28531,86.02341,11.28531,86.02341,11.84261,85.44718,12.88754,85.44718,13.65383,84.95326,15.81336,84.70631,16.8583,84.37703,17.90323,83.88311,19.22682,83.30688,22.15264,82.81297,23.75487,81.98978,26.88968,81.49586,28.49191,81.00195,30.09415,80.67267,31.62672,80.17876,34.27389,79.9318,35.38849,79.60252,37.47836,79.60252,38.24465,79.60252,38.80195,79.9318,39.35925,80.42571,40.40418,81.00195,40.68283,82.31906,40.89182,83.05993,40.89182,83.88311,40.89182,84.95326,40.68283,86.76428,39.56823,87.58747,39.0806,89.15154,38.03566,89.72777,37.19971,90.22169,36.43343" + }, + { + "id": 2, + "kind": "inkWriting", + "points": "80.17876,20.27175,80.17876,20.27175,80.17876,20.27175,80.17876,20.27175,80.17876,20.5504,80.17876,20.5504,80.17876,20.5504,80.17876,20.5504,80.42571,20.5504,80.42571,20.5504,80.67267,20.5504,81.00195,20.5504,81.49586,20.5504,81.98978,20.5504,82.56602,20.5504,83.30688,20.5504,84.13007,20.5504,84.95326,20.27175,86.02341,20.27175,86.76428,20.27175,87.58747,20.27175,88.41067,19.9931,89.15154,19.9931,89.72777,19.9931,90.22169,19.78412,90.46864,19.78412,90.7156,19.78412,91.04487,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.29183,19.78412,91.53879,19.78412,91.53879,19.78412,91.78574,19.78412" + } + ] + } + }, + "responses" : { + "200" : { + "headers" : {}, + "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.889999389648438, + "topX": 6.9099998474121094, + "topY":9.9600000381469727, + "width":84.879997253417969 + }, + "category":"inkWord", + "class":"leaf", + "id":4, + "parentId":3, + "recognizedText":"default", + "rotatedBoundingRectangle":[ + { + "x":3.1800000667572021, + "y":15.670000076293945 + }, + { + "x":89.419998168945313, + "y":3.3299999237060547 + }, + { "x":95.430000305175781, + "y":45.330001831054688 + }, + { + "x":9.1899995803833008, + "y":57.669998168945313 + } + ], + "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.889999389648438, + "topX":6.9099998474121094, + "topY":9.9600000381469727, + "width":84.879997253417969 + }, + "category":"line", + "childIds":[4], + "class":"container", + "id":3, + "parentId":2, + "recognizedText":"default", + "rotatedBoundingRectangle":[ + { + "x":3.1800000667572021, + "y":15.670000076293945 + }, + { + "x":89.419998168945313, + "y":3.3299999237060547 + }, + { "x":95.430000305175781, + "y":45.330001831054688 + }, + { + "x":9.1899995803833008, + "y":57.669998168945313 + } + ], + "strokeIds":[1,2] + }, + { + "boundingRectangle":{ + "height":43.889999389648438, + "topX":6.9099998474121094, + "topY":9.9600000381469727, + "width":84.879997253417969 + }, + "category":"paragraph", + "childIds":[3], + "class": + "container", + "id":2, + "parentId":1, + "rotatedBoundingRectangle":[ + { + "x":3.1800000667572021, + "y":15.670000076293945 + }, + { + "x":89.419998168945313, + "y":3.3299999237060547 + }, + { "x":95.430000305175781, + "y":45.330001831054688 + }, + { + "x":9.1899995803833008, + "y":57.669998168945313 + } + ], + "strokeIds":[1,2] + }, + { + "boundingRectangle": { + "height":43.889999389648438, + "topX":6.9099998474121094, + "topY":9.9600000381469727, + "width":84.879997253417969 + }, + "category":"writingRegion", + "childIds":[2], + "class":"container", + "id":1, + "parentId":0, + "rotatedBoundingRectangle":[ + { + "x":3.1800000667572021, + "y":15.670000076293945 + }, + { + "x":89.419998168945313, + "y":3.3299999237060547 + }, + { "x":95.430000305175781, + "y":45.330001831054688 + }, + { + "x":9.1899995803833008, + "y":57.669998168945313 + } + ], + "strokeIds":[1,2] + } + ] + } + } + } +} + diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.csharp.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.csharp.md new file mode 100644 index 000000000000..a632ea692dda --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.csharp.md @@ -0,0 +1,14 @@ +## CSharp + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + sync-methods: None + license-header: MICROSOFT_MIT_NO_VERSION + azure-arm: false + namespace: Microsoft.Azure.CognitiveServices.InkRecognizer + output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/InkRecognizer/InkRecognizer/Generated + clear-output-folder: true +``` diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.go.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.go.md new file mode 100644 index 000000000000..633006836ac5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.go.md @@ -0,0 +1,27 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: inkrecognizer + clear-output-folder: true + +``` + +### Go multi-api + +```yaml $(go) && $(multiapi) +batch: + - tag: release_1_0 + +``` +### Tag: release_1_0 and go + +These settings apply only when `--tag=release_1_0 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +```yaml $(tag) == 'release_1_0' && $(go) +output-folder: $(go-sdk-folder)/services/preview/cognitiveservices/v1.0/$(namespace) +``` diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.md new file mode 100644 index 000000000000..c3206872d5b3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.md @@ -0,0 +1,84 @@ +# InkRecognizer + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for InkRecognizer. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the InkRecognizer. + +```yaml +tag: release_1_0 +add-credentials: true +openapi-type: data-plane +``` + +### Tag: release_1_0 + +These settings apply only when `--tag=release_1_0` is specified on the command line. + +```yaml $(tag) == 'release_1_0' +input-file: + - preview/v1.0/InkRecognizer.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_cognitiveservices_inkrecognizer'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## NodeJS + +See configuration in [readme.nodejs.md](./readme.nodejs.md) diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.nodejs.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.nodejs.md new file mode 100644 index 000000000000..7b15d029e429 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.nodejs.md @@ -0,0 +1,14 @@ +## Node.js + +These settings apply only when `--nodejs` is specified on the command line. +Please also specify `--node-sdk-folder=`. + +```yaml $(nodejs) +nodejs: + package-name: azure-cognitiveservices-inkrecognizer + output-folder: $(node-sdks-folder)/lib/services/cognitiveServicesInkRecognizer + azure-arm: false + generate-license-txt: true + generate-package-json: true + generate-readme-md: false +``` diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.python.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.python.md new file mode 100644 index 000000000000..e31876c8a9d6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.python.md @@ -0,0 +1,26 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml $(python) +python-mode: create +python: + license-header: MICROSOFT_MIT_NO_VERSION + add-credentials: true + payload-flattening-threshold: 2 + namespace: azure.cognitiveservices.inkrecognizer + package-name: azure-cognitiveservices-inkrecognizer + package-version: 0.2.0 + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-cognitiveservices-inkrecognizer/azure/cognitiveservices/inkrecognizer +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-cognitiveservices-inkrecognizer +``` diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.ruby.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.ruby.md new file mode 100644 index 000000000000..22b3b60b7fb5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.ruby.md @@ -0,0 +1,26 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_cognitiveservices_inkrecognizer +package-version: "0.16.0" +azure-arm: true +``` +### Ruby multi-api + +``` yaml $(ruby) && $(multiapi) +batch: + - tag: release_1_0 +``` + +### Tag: release_1_0 and ruby + +These settings apply only when `--tag=release_1_0 --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +``` yaml $(tag) == 'release_1_0' && $(ruby) +namespace: "Azure::CognitiveServices::InkRecognizer::V1_0" +output-folder: $(ruby-sdks-folder)/data/azure_cognitiveservices_inkrecognizer/lib +title: "InkRecognizerClient" +``` diff --git a/specification/cognitiveservices/data-plane/InkRecognizer/readme.typescript.md b/specification/cognitiveservices/data-plane/InkRecognizer/readme.typescript.md new file mode 100644 index 000000000000..dda74106e2c8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/InkRecognizer/readme.typescript.md @@ -0,0 +1,12 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + package-name: "@azure/cognitiveservices-inkrecognizer" + output-folder: "$(typescript-sdks-folder)/sdk/cognitiveservices/cognitiveservices-inkrecognizer" + azure-arm: false + generate-metadata: true +```