Skip to content

Commit f026b1e

Browse files
authored
Merge pull request Azure#7 from josuhazure/josuh_aspect
Reverting 3.0-preview change + resolving comments for aspect
2 parents b324a5e + 5bef0e7 commit f026b1e

4 files changed

Lines changed: 26 additions & 36 deletions

File tree

specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@
565565
"required": [
566566
"id",
567567
"sentiment",
568-
"confidenceScores",
568+
"documentScores",
569569
"sentences"
570570
],
571571
"properties": {
@@ -590,7 +590,7 @@
590590
"statistics": {
591591
"$ref": "#/definitions/DocumentStatistics"
592592
},
593-
"confidenceScores": {
593+
"documentScores": {
594594
"description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.",
595595
"$ref": "#/definitions/SentimentConfidenceScorePerLabel"
596596
},
@@ -681,17 +681,12 @@
681681
"SentenceSentiment": {
682682
"type": "object",
683683
"required": [
684-
"text",
685684
"sentiment",
686-
"confidenceScores",
685+
"sentenceScores",
687686
"offset",
688687
"length"
689688
],
690689
"properties": {
691-
"text": {
692-
"type": "string",
693-
"description": "The sentence text."
694-
},
695690
"sentiment": {
696691
"type": "string",
697692
"description": "The predicted Sentiment for the sentence.",
@@ -705,7 +700,7 @@
705700
"modelAsString": false
706701
}
707702
},
708-
"confidenceScores": {
703+
"sentenceScores": {
709704
"description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.",
710705
"$ref": "#/definitions/SentimentConfidenceScorePerLabel"
711706
},
@@ -1124,4 +1119,4 @@
11241119
"x-ms-skip-url-encoding": true
11251120
}
11261121
}
1127-
}
1122+
}

specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
},
3838
"sentences": [
3939
{
40-
"text": "Hello world.",
4140
"sentiment": "neutral",
4241
"sentenceScores": {
4342
"positive": 0.070910170674324,
@@ -48,7 +47,6 @@
4847
"length": 12
4948
},
5049
{
51-
"text": "This is some input text that I love.",
5250
"sentiment": "positive",
5351
"sentenceScores": {
5452
"positive": 0.998519241809845,
@@ -70,7 +68,6 @@
7068
},
7169
"sentences": [
7270
{
73-
"text": "It's incredibly sunny outside!",
7471
"sentiment": "neutral",
7572
"sentenceScores": {
7673
"positive": 0.0499138832092285,
@@ -81,7 +78,6 @@
8178
"length": 30
8279
},
8380
{
84-
"text": "I'm so happy.",
8581
"sentiment": "positive",
8682
"sentenceScores": {
8783
"positive": 0.9954571723937988,
@@ -103,7 +99,6 @@
10399
},
104100
"sentences": [
105101
{
106-
"text": "Pike place market is my favorite Seattle attraction.",
107102
"sentiment": "positive",
108103
"sentenceScores": {
109104
"positive": 0.9965128302574158,

specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/TextAnalytics.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
"/sentiment": {
334334
"post": {
335335
"summary": "Sentiment",
336-
"description": "The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.",
336+
"description": "The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of granularity, start from the a document level, down to sentence and key terms (aspects) and opinions.",
337337
"operationId": "Sentiment",
338338
"consumes": [
339339
"application/json",
@@ -513,7 +513,7 @@
513513
},
514514
"targetRef": {
515515
"type": "string",
516-
"description": "The JSON pointer indicating the linked object."
516+
"description": "A JSON pointer reference indicating the target object."
517517
}
518518
}
519519
},
@@ -762,7 +762,7 @@
762762
"length": {
763763
"type": "integer",
764764
"format": "int32",
765-
"description": "The length of the sentence by Unicode standard."
765+
"description": "The length of the sentence."
766766
},
767767
"aspects": {
768768
"type": "array",
@@ -812,7 +812,7 @@
812812
"length": {
813813
"type": "integer",
814814
"format": "int32",
815-
"description": "The length of the aspect by Unicode standard."
815+
"description": "The length of the aspect."
816816
},
817817
"text": {
818818
"type": "string",
@@ -859,7 +859,7 @@
859859
"length": {
860860
"type": "integer",
861861
"format": "int32",
862-
"description": "The length of the opinion by Unicode standard."
862+
"description": "The length of the opinion."
863863
},
864864
"text": {
865865
"type": "string",
@@ -1003,12 +1003,12 @@
10031003
"offset": {
10041004
"type": "integer",
10051005
"format": "int32",
1006-
"description": "Start position (in Unicode characters) for the entity text."
1006+
"description": "Start position for the entity text."
10071007
},
10081008
"length": {
10091009
"type": "integer",
10101010
"format": "int32",
1011-
"description": "Length (in Unicode characters) for the entity text."
1011+
"description": "Length for the entity text."
10121012
},
10131013
"confidenceScore": {
10141014
"type": "number",
@@ -1140,12 +1140,12 @@
11401140
"offset": {
11411141
"type": "integer",
11421142
"format": "int32",
1143-
"description": "Start position (in Unicode characters) for the entity match text."
1143+
"description": "Start position for the entity match text."
11441144
},
11451145
"length": {
11461146
"type": "integer",
11471147
"format": "int32",
1148-
"description": "Length (in Unicode characters) for the entity match text."
1148+
"description": "Length for the entity match text."
11491149
}
11501150
}
11511151
},

specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.1/examples/SuccessfulSentimentRequest.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
{
4646
"sentiment": "positive",
4747
"confidenceScores": {
48-
"positive": 1,
49-
"negative": 0
48+
"positive": 1.0,
49+
"negative": 0.0
5050
},
5151
"offset": 6,
5252
"length": 10,
@@ -63,8 +63,8 @@
6363
{
6464
"sentiment": "positive",
6565
"confidenceScores": {
66-
"positive": 1,
67-
"negative": 0
66+
"positive": 1.0,
67+
"negative": 0.0
6868
},
6969
"offset": 0,
7070
"length": 5,
@@ -145,8 +145,8 @@
145145
{
146146
"sentiment": "positive",
147147
"confidenceScores": {
148-
"positive": 1,
149-
"negative": 0
148+
"positive": 1.0,
149+
"negative": 0.0
150150
},
151151
"offset": 71,
152152
"length": 5,
@@ -163,8 +163,8 @@
163163
{
164164
"sentiment": "positive",
165165
"confidenceScores": {
166-
"positive": 1,
167-
"negative": 0
166+
"positive": 1.0,
167+
"negative": 0.0
168168
},
169169
"offset": 81,
170170
"length": 8,
@@ -285,8 +285,8 @@
285285
{
286286
"sentiment": "negative",
287287
"confidenceScores": {
288-
"positive": 0,
289-
"negative": 1
288+
"positive": 0.0,
289+
"negative": 1.0
290290
},
291291
"offset": 73,
292292
"length": 5,
@@ -303,8 +303,8 @@
303303
{
304304
"sentiment": "negative",
305305
"confidenceScores": {
306-
"positive": 0,
307-
"negative": 1
306+
"positive": 0.0,
307+
"negative": 1.0
308308
},
309309
"offset": 87,
310310
"length": 8,

0 commit comments

Comments
 (0)