Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language API for TA (2022-03-01-preview) #17281

Merged
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
1bcc20d
Add blockchain to latest profile
markcowl Aug 22, 2019
7b46097
Add additional types
markcowl Aug 22, 2019
d141546
WIP for language api spec for TA
Sep 27, 2021
45fff3b
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
Sep 28, 2021
382b4ab
Updated preview version number; finished up async definitions
Sep 28, 2021
478b59b
Finished first draft of full spec
Sep 30, 2021
b9c5551
Finished first draft of full spec, minus FHIR structuring in HC output
Oct 1, 2021
5541ae2
Removed features not included in 2021-11-01 preview
Oct 1, 2021
054c150
Update custom text tasks TODOs
kayousef Oct 6, 2021
61e358d
Moved common definitions to TA-specific definitions
Oct 6, 2021
31e30a8
Added custom text tasks to JobManifest
Oct 6, 2021
113da22
Merge branch 'abhahn/language-ta-20211101' of https://github.com/abha…
Oct 6, 2021
c2b44e5
Addressing feedback from PR comments and internal review
Oct 11, 2021
971c0c9
Addressed some PR comments
Oct 15, 2021
6603e9f
Updated some remaining references to documents
Oct 15, 2021
9603885
PR comments
Oct 15, 2021
00611d6
Updated a previous change
Oct 15, 2021
dae7e0c
Reverted references to 'records' back to 'documents'
Oct 21, 2021
3dec90a
Fixed merge conflict
Oct 22, 2021
ef4ca82
A few small updates to examples; removed base Task type to simplify s…
Oct 22, 2021
9de0612
PR comments
Oct 22, 2021
37afdf2
Addressed TODO items; removed LD-related objects (will be added in an…
Oct 25, 2021
b129a0c
Fixed anonymous types
Oct 25, 2021
6589b0e
Removed required field for body in POST request
Oct 25, 2021
61c4920
Fix prettier check
Oct 25, 2021
341d6c2
Merge branch 'master' of https://github.com/Azure/azure-rest-api-spec…
Oct 26, 2021
b2c0887
Added a few more details; experimental change for documents property
Oct 27, 2021
b6d9fb1
Ran prettier
Oct 27, 2021
b0fbc2e
Correction to AnalysisInput object
Oct 27, 2021
191433c
Merged changes from 2021-11-01-preview and moved new changes to 2022-…
Dec 1, 2021
225ad44
PR comments
Dec 1, 2021
6656695
Updates to the design for tasks
Dec 3, 2021
d484571
Fixed merge conflict
Dec 3, 2021
4276f71
Added custom entities task to examples
Dec 9, 2021
d20e7d2
Fixed merge conflict
Dec 9, 2021
d6ae3d5
Fixed merge conflict
Dec 9, 2021
87a8b00
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
Dec 13, 2021
e49956a
Merged with changes from 2021-11-01-preview branch
Dec 13, 2021
7b86031
Updates
Dec 13, 2021
5c8492c
Finished implementation of discriminator pattern and added some exmaples
Dec 14, 2021
70703d6
Updates
Jan 3, 2022
5c5e55f
Updates to objects, and addressing some PR comments
Jan 6, 2022
0c0b3ae
Prettier
Jan 6, 2022
c08b59f
Fixed semantic validation errors
Jan 6, 2022
6b4471f
Fixed model validation
Jan 6, 2022
02eafda
Another model validation fix
Jan 6, 2022
9044dc2
Debugging model validation errors
Jan 7, 2022
7b7fbf7
Using a different discriminator enum for output schemas
Jan 7, 2022
ea89ef1
Fixed some missing discriminator updates
Jan 7, 2022
c4cdc3e
More semantic validation fixes
Jan 7, 2022
f6b4fff
Fixed model validation errors; updated sample names
Jan 7, 2022
83538c0
Fixed linting errors and addressed some warnings in the linter output
Jan 7, 2022
5a6374b
Ran prettier on examples
Jan 7, 2022
12f8dbe
PR comments and some minor restructuring
Jan 12, 2022
2e719a3
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
Jan 12, 2022
b8cb4b6
Ran prettier
Jan 12, 2022
bf7d331
Removed a duplicate schema from CustomEntitiesTaskParameters
Jan 13, 2022
1ab4845
PR comments
Jan 14, 2022
b4b462e
PR comments
Jan 14, 2022
b1f3b5c
PR comments
Jan 14, 2022
b66d2c9
Added missing job task status 'partiallySucceeded'
Jan 14, 2022
0130ca6
Added preview folder for 2022-03-01-preview
Jan 18, 2022
5b069f7
Added delete and cancel operations for jobs
Jan 18, 2022
40fe511
Added some examples for delete and cancel; updated samples for new pr…
Jan 18, 2022
b14982a
Incorporating feedback from the API review
Jan 18, 2022
989e24f
fix naming consistency (#1)
mshaban93 Jan 19, 2022
6170ff0
Merge branch 'main' of https://github.com/abhahn/azure-rest-api-specs…
Feb 3, 2022
cb2c9d5
Fixed merge conflicts with main
Feb 3, 2022
b425996
Merge branch 'abhahn/language-ta-20220301' of https://github.com/abha…
Feb 3, 2022
64a41e3
Fixed more merge conflicts with the feature branch
Feb 4, 2022
cff0d92
Fixed one last merge conflict
Feb 4, 2022
d7c4aa2
naming fix (#2)
mshaban93 Feb 4, 2022
3605fef
Fixed a ref
Feb 4, 2022
5881d12
Merge branch 'abhahn/language-ta-20220301' of https://github.com/abha…
Feb 4, 2022
0d53d75
Ran prettier on all files
Feb 4, 2022
0643faa
Merge branch 'dev-cognitiveservices-Language-2022-03-01-preview' of h…
Mar 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"ApiVersion": "2022-03-01-preview",
"Endpoint": "{Endpoint}",
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2022-03-01-preview"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,43 @@
}
}
}
},
"/analyze-text/jobs/{jobId}:cancel": {
"post": {
"produces": [
"application/json"
],
"description": "Cancel a long-running Text Analysis job.",
"operationId": "AnalyzeText_CancelJob",
"summary": "Cancel a long-running Text Analysis job",
"parameters": [
{
"$ref": "#/parameters/JobId"
}
],
"responses": {
"202": {
"description": "Cancel Job request has been received.",
"headers": {
"Operation-Location": {
"type": "string"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "common.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Successful Job Delete Request": {
"$ref": ".//examples//SuccessfulAnalyzeTextJobsCancelRequest.json"
}
},
"x-ms-long-running-operation": true
}
}
},
"definitions": {
Expand Down Expand Up @@ -217,8 +254,8 @@
"Healthcare",
"ExtractiveSummarization",
"CustomEntityRecognition",
"CustomSingleClassification",
"CustomMultiClassification"
"CustomSingleLabelClassification",
"CustomMultiLabelClassification"
],
"x-ms-enum": {
"name": "AnalyzeTextLROTaskKind",
Expand Down Expand Up @@ -253,8 +290,8 @@
"HealthcareLROResults",
"ExtractiveSummarizationLROResults",
"CustomEntityRecognitionLROResults",
"CustomSingleClassificationLROResults",
"CustomMultiClassificationLROResults"
"CustomSingleLabelClassificationLROResults",
"CustomMultiLabelClassificationLROResults"
],
"x-ms-enum": {
"name": "AnalyzeTextLROResultsKind",
Expand Down Expand Up @@ -594,7 +631,7 @@
"documents"
]
},
"CustomSingleClassificationTaskParameters": {
"CustomSingleLabelClassificationTaskParameters": {
"type": "object",
"description": "Supported parameters for a Custom Single Classification task.",
"allOf": [
Expand All @@ -603,22 +640,22 @@
}
]
},
"CustomSingleClassificationLROTask": {
"CustomSingleLabelClassificationLROTask": {
"type": "object",
"description": "Use custom models to classify text into single label taxonomy",
"properties": {
"parameters": {
"$ref": "#/definitions/CustomSingleClassificationTaskParameters"
"$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters"
}
},
"allOf": [
{
"$ref": "#/definitions/AnalyzeTextLROTask"
}
],
"x-ms-discriminator-value": "CustomSingleClassification"
"x-ms-discriminator-value": "CustomSingleLabelClassification"
},
"CustomSingleClassificationResult": {
"CustomSingleLabelClassificationResult": {
"type": "object",
"properties": {
"documents": {
Expand All @@ -645,7 +682,7 @@
"SingleClassificationDocumentResult": {
"type": "object",
"properties": {
"classification": {
"class": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is what various clients will call this (since class is often a reserved/keyword). I don't think I thought about this in the REST API discussion. But we should be able to specify x-ms-client-name to rename/quantify the name in client libraries.

"$ref": "#/definitions/ClassificationResult"
}
},
Expand All @@ -655,7 +692,7 @@
}
],
"required": [
"classification"
"class"
]
},
"ClassificationResult": {
Expand All @@ -672,11 +709,11 @@
"confidenceScore": {
"type": "number",
"format": "double",
"description": "Confidence score between 0 and 1 of the recognized classification."
"description": "Confidence score between 0 and 1 of the recognized class."
}
}
},
"CustomMultiClassificationTaskParameters": {
"CustomMultiLabelClassificationTaskParameters": {
"type": "object",
"description": "Supported parameters for a Custom Multi Classification task.",
"allOf": [
Expand All @@ -685,22 +722,22 @@
}
]
},
"CustomMultiClassificationLROTask": {
"CustomMultiLabelClassificationLROTask": {
"type": "object",
"description": "Use custom models to classify text into multi label taxonomy",
"properties": {
"parameters": {
"$ref": "#/definitions/CustomMultiClassificationTaskParameters"
"$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters"
}
},
"allOf": [
{
"$ref": "#/definitions/AnalyzeTextLROTask"
}
],
"x-ms-discriminator-value": "CustomMultiClassification"
"x-ms-discriminator-value": "CustomMultiLabelClassification"
},
"CustomMultiClassificationResult": {
"CustomMultiLabelClassificationResult": {
"type": "object",
"properties": {
"documents": {
Expand All @@ -727,7 +764,7 @@
"MultiClassificationDocumentResult": {
"type": "object",
"properties": {
"classifications": {
"class": {
"type": "array",
"items": {
"$ref": "#/definitions/ClassificationResult"
Expand All @@ -740,7 +777,7 @@
}
],
"required": [
"classifications"
"class"
]
},
"HealthcareTaskParameters": {
Expand Down Expand Up @@ -2524,11 +2561,11 @@
],
"x-ms-discriminator-value": "CustomEntityRecognitionLROResults"
},
"CustomSingleClassificationLROResult": {
"CustomSingleLabelClassificationLROResult": {
"type": "object",
"properties": {
"results": {
"$ref": "#/definitions/CustomSingleClassificationResult"
"$ref": "#/definitions/CustomSingleLabelClassificationResult"
}
},
"allOf": [
Expand All @@ -2539,13 +2576,13 @@
"required": [
"results"
],
"x-ms-discriminator-value": "CustomSingleClassificationLROResults"
"x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults"
},
"CustomMultiClassificationLROResult": {
"CustomMultiLabelClassificationLROResult": {
"type": "object",
"properties": {
"results": {
"$ref": "#/definitions/CustomMultiClassificationResult"
"$ref": "#/definitions/CustomMultiLabelClassificationResult"
}
},
"allOf": [
Expand All @@ -2556,7 +2593,7 @@
"required": [
"results"
],
"x-ms-discriminator-value": "CustomMultiClassificationLROResults"
"x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults"
},
"EntityLinkingLROResult": {
"type": "object",
Expand Down