Skip to content

Commit

Permalink
Add text analytics v3.2-preview.2 API (Azure#15736)
Browse files Browse the repository at this point in the history
* Add text analytics v3.2-preview.2 API

* CR comments

* Make project and deployment names required parameters

* Fix projectName and deploymentName

Rename projectName and deploymentName in input to project-name and deployment-name

Co-authored-by: Omar Elhariry <omelhari@microsoft.com>
Co-authored-by: Kareem Yousef <kayousef@microsoft.com>
  • Loading branch information
3 people committed Oct 20, 2021
1 parent fbf20b0 commit 11cb5c6
Show file tree
Hide file tree
Showing 13 changed files with 4,395 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"ApiVersion": "v3.2-preview.2",
"Endpoint": "{Endpoint}",
"jobId": "{Job ID}",
"input": {
"displayName": "Extracting Location & US Region",
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "I had a wonderful trip to Seattle last week."
},
{
"id": "2",
"language": "en",
"text": "I'm flying to NYC tomorrow. See you there."
}
]
},
"tasks": {
"entityRecognitionTasks": [
{
"parameters": {
"model-version": "latest"
}
}
]
}
}
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{endpoint}/text/analytics/v3.2-preview.2/analyze/jobs/{jobId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"ApiVersion": "v3.2-preview.2",
"Endpoint": "{Endpoint}",
"jobId": "{Job ID}"
},
"responses": {
"200": {
"headers": {},
"body": {
"createdDateTime": "2020-10-01T15:00:45Z",
"displayName": "Extracting Location & US Region",
"expirationDateTime": "2020-10-03T15:01:03Z",
"jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18",
"lastUpdateDateTime": "2020-10-01T15:01:03Z",
"status": "succeeded",
"tasks": {
"completed": 2,
"failed": 0,
"inProgress": 0,
"total": 2,
"entityRecognitionTasks": [
{
"taskName": "Recognize Entities (2020-04-01)",
"lastUpdateDateTime": "2020-10-01T15:01:03Z",
"status": "succeeded",
"results": {
"documents": [
{
"entities": [
{
"category": "Event",
"confidenceScore": 0.61,
"length": 4,
"offset": 18,
"text": "trip"
},
{
"category": "Location",
"confidenceScore": 0.82,
"length": 7,
"offset": 26,
"subcategory": "GPE",
"text": "Seattle"
},
{
"category": "DateTime",
"confidenceScore": 0.8,
"length": 9,
"offset": 34,
"subcategory": "DateRange",
"text": "last week"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"category": "Location",
"confidenceScore": 0.52,
"length": 3,
"offset": 14,
"subcategory": "GPE",
"text": "NYC"
},
{
"category": "DateTime",
"confidenceScore": 0.8,
"length": 8,
"offset": 18,
"subcategory": "Date",
"text": "tomorrow"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-04-01"
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"ApiVersion": "v3.2-preview.2",
"Endpoint": "{Endpoint}",
"input": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Pike place market is my favorite Seattle attraction."
}
]
}
},
"responses": {
"200": {
"headers": {},
"body": {
"documents": [
{
"entities": [
{
"category": "Organization",
"confidenceScore": 0.84,
"length": 9,
"offset": 0,
"text": "Microsoft"
},
{
"category": "Person",
"confidenceScore": 0.85,
"length": 10,
"offset": 25,
"text": "Bill Gates"
},
{
"category": "Person",
"confidenceScore": 0.9,
"length": 10,
"offset": 40,
"text": "Paul Allen"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"category": "Location",
"confidenceScore": 0.55,
"length": 7,
"offset": 33,
"subcategory": "GPE",
"text": "Seattle"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-04-01"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"ApiVersion": "v3.2-preview.2",
"Endpoint": "{Endpoint}",
"input": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Pike place market is my favorite Seattle attraction."
}
]
}
},
"responses": {
"200": {
"headers": {},
"body": {
"documents": [
{
"entities": [
{
"dataSource": "Wikipedia",
"id": "Bill Gates",
"language": "en",
"matches": [
{
"confidenceScore": 0.52,
"length": 10,
"offset": 25,
"text": "Bill Gates"
}
],
"name": "Bill Gates",
"url": "https://en.wikipedia.org/wiki/Bill_Gates"
},
{
"dataSource": "Wikipedia",
"id": "Paul Allen",
"language": "en",
"matches": [
{
"confidenceScore": 0.54,
"length": 10,
"offset": 40,
"text": "Paul Allen"
}
],
"name": "Paul Allen",
"url": "https://en.wikipedia.org/wiki/Paul_Allen"
},
{
"dataSource": "Wikipedia",
"id": "Microsoft",
"language": "en",
"matches": [
{
"confidenceScore": 0.49,
"length": 9,
"offset": 0,
"text": "Microsoft"
}
],
"name": "Microsoft",
"url": "https://en.wikipedia.org/wiki/Microsoft"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"dataSource": "Wikipedia",
"id": "Pike Place Market",
"language": "en",
"matches": [
{
"confidenceScore": 0.86,
"length": 17,
"offset": 0,
"text": "Pike place market"
}
],
"name": "Pike Place Market",
"url": "https://en.wikipedia.org/wiki/Pike_Place_Market"
},
{
"dataSource": "Wikipedia",
"id": "Seattle",
"language": "en",
"matches": [
{
"confidenceScore": 0.27,
"length": 7,
"offset": 33,
"text": "Seattle"
}
],
"name": "Seattle",
"url": "https://en.wikipedia.org/wiki/Seattle"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-02-01"
}
}
}
}
Loading

0 comments on commit 11cb5c6

Please sign in to comment.