Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -149,7 +149,7 @@ csharp:
license-header: MICROSOFT_MIT_NO_VERSION
azure-arm: false
namespace: Microsoft.Azure.CognitiveServices.Language.TextAnalytics
output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Language/Microsoft.CognitiveServices.Language/Generated/TextAnalytics
output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Language/TextAnalytics/Generated/TextAnalytics
clear-output-folder: true
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"Key Phrases"
],
"summary": "The API returns a list of strings denoting the key talking points in the input text.",
"description": "We employ techniques from Microsoft Office's sophisticated Natural Language Processing toolkit. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages\">Text Analytics Documentation</a> for details about the languages that are supported by key phrase extraction.",
"description": "See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages\">Text Analytics Documentation</a> for details about the languages that are supported by key phrase extraction.",
"operationId": "Key Phrases",
"consumes": [
"application/json"
Expand Down Expand Up @@ -122,7 +122,7 @@
}
},
"x-ms-examples": {
"Successful Key Phrase request": {
"Successful Detect Language request": {
"$ref": "./examples//SuccessfulLanguagesRequest.json"
}
},
Expand All @@ -135,7 +135,7 @@
"Sentiment"
],
"summary": "The API returns a numeric score between 0 and 1.",
"description": "Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. Sentiment score is generated using classification techniques. The input features to the classifier include n-grams, features generated from part-of-speech tags, and word embeddings. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages\">Text Analytics Documentation</a> for details about the languages that are supported by sentiment analysis.",
"description": "Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. A score of 0.5 indicates the lack of sentiment (e.g. a factoid statement). See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages\">Text Analytics Documentation</a> for details about the languages that are supported by sentiment analysis.",
"operationId": "Sentiment",
"consumes": [
"application/json"
Expand Down Expand Up @@ -169,12 +169,59 @@
}
},
"x-ms-examples": {
"Successful Key Phrase request": {
"Successful Sentiment request": {
"$ref": "./examples//SuccessfulSentimentRequest.json"
}
},
"deprecated": false
}
},
"/v2.0/entities": {
"post": {
"tags": [
"Entities"
],
"summary": "The API returns a list of recognized entities in a given document.",
"description": "To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.",
"operationId": "Entities",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "input",
"in": "body",
"description": "Collection of documents to analyze.",
"required": true,
"schema": {
"$ref": "#/definitions/MultiLanguageBatchInput"
}
}
],
"responses": {
"200": {
"description": "A successful call results in a list of recognized entities returned for each valid document",
"schema": {
"$ref": "#/definitions/EntitiesBatchResult"
}
},
"default": {
"description": "Error Response",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"Successful Entities request": {
"$ref": "./examples//SuccessfulEntitiesRequest.json"
}
},
"deprecated": false
}
}
},
"definitions": {
Expand Down Expand Up @@ -441,6 +488,96 @@
"type": "string"
}
}
},
"EntitiesBatchResult": {
"type": "object",
"properties": {
"documents": {
"type": "array",
"items": {
"$ref": "#/definitions/EntitiesBatchResultItem"
},
"readOnly": true
},
"errors": {
"type": "array",
"items": {
"$ref": "#/definitions/ErrorRecord"
},
"readOnly": true
}
}
},
"EntitiesBatchResultItem": {
"type": "object",
"properties": {
"id": {
"description": "Unique document identifier.",
"type": "string",
"readOnly": true
},
"entities": {
"description": "Recognized entities in the document.",
"type": "array",
"items": {
"$ref": "#/definitions/EntityRecord"
},
"readOnly": true
}
}
},
"EntityRecord": {
"type": "object",
"properties": {
"name": {
"description": "Entity formal name.",
"type": "string"
},
"matches": {
"description": "List of instances this entity appears in the text.",
"type": "array",
"items": {
"$ref": "#/definitions/MatchRecord"
},
"readOnly": true
},
"wikipediaLanguage": {
"description": "Wikipedia language for which the WikipediaId and WikipediaUrl refers to.",
"type": "string"
},
"wikipediaId": {
"description": "Wikipedia unique identifier of the recognized entity.",
"type": "string"
},
"wikipediaUrl": {
"description": "URL for the entity's English Wikipedia page.",
"type": "string",
"readOnly": true
},
"bingId": {
"description": "Bing unique identifier of the recognized entity. Use in conjunction with the Bing Entity Search API to fetch additional relevant information.",
"type": "string"
}
}
},
"MatchRecord": {
"type": "object",
"properties": {
"text": {
"description": "Entity text as appears in the request.",
"type": "string"
},
"offset": {
"format": "int32",
"description": "Start position (in Unicode characters) for the entity match text.",
"type": "integer"
},
"length": {
"format": "int32",
"description": "Length (in Unicode characters) for the entity match text.",
"type": "integer"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"AzureRegion": "westus",
"input": {
"documents": [
{
"language": "en",
"id": "1",
"text": "Microsoft released Windows 10"
},
{
"language": "en",
"id": "2",
"text": "In 1975, Bill Gates III and Paul Allen founded the company."
}
]
}
},
"responses": {
"200": {
"headers": {},
"body": {
"documents": [
{
"id": "1",
"entities": [
{
"name": "Windows 10",
"matches": [
{
"text": "Windows 10",
"offset": 19,
"length": 10
}
],
"wikipediaLanguage": "en",
"wikipediaId": "Windows 10",
"wikipediaUrl": "https://en.wikipedia.org/wiki/Windows_10",
"bingId": "5f9fbd03-49c4-39ef-cc95-de83ab897b94"
},
{
"name": "Microsoft",
"matches": [
{
"text": "Microsoft",
"offset": 0,
"length": 9
}
],
"wikipediaLanguage": "en",
"wikipediaId": "Microsoft",
"wikipediaUrl": "https://en.wikipedia.org/wiki/Microsoft",
"bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85"
}
]
},
{
"id": "2",
"entities": [
{
"name": "Bill Gates",
"matches": [
{
"text": "Bill Gates III",
"offset": 9,
"length": 14
}
],
"wikipediaLanguage": "en",
"wikipediaId": "Bill Gates",
"wikipediaUrl": "https://en.wikipedia.org/wiki/Bill_Gates",
"bingId": "0d47c987-0042-5576-15e8-97af601614fa"
},
{
"name": "Paul Allen",
"matches": [
{
"text": "Paul Allen",
"offset": 28,
"length": 10
}
],
"wikipediaLanguage": "en",
"wikipediaId": "Paul Allen",
"wikipediaUrl": "https://en.wikipedia.org/wiki/Paul_Allen",
"bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7"
}
]
}
],
"errors": []
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {
"AzureRegion": "westus",
"input": {
"documents": [
{
"id": "1",
Expand Down Expand Up @@ -60,4 +61,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {
"AzureRegion": "westus",
"input": {
"documents": [
{
"id": "1",
Expand Down Expand Up @@ -72,4 +73,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"parameters": {
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {
"AzureRegion": "westus",
"input": {
"documents": [
{
"id": "1",
Expand Down Expand Up @@ -52,4 +53,4 @@
}
}
}
}
}