Skip to content

Commit b324a5e

Browse files
authored
Merge pull request Azure#6 from josuhazure/josuh_aspect
Adding sentence text + changing documentScores to confidenceScores
2 parents d2e2d6d + 1f0958b commit b324a5e

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@
565565
"required": [
566566
"id",
567567
"sentiment",
568-
"documentScores",
568+
"confidenceScores",
569569
"sentences"
570570
],
571571
"properties": {
@@ -590,7 +590,7 @@
590590
"statistics": {
591591
"$ref": "#/definitions/DocumentStatistics"
592592
},
593-
"documentScores": {
593+
"confidenceScores": {
594594
"description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.",
595595
"$ref": "#/definitions/SentimentConfidenceScorePerLabel"
596596
},
@@ -681,12 +681,17 @@
681681
"SentenceSentiment": {
682682
"type": "object",
683683
"required": [
684+
"text",
684685
"sentiment",
685-
"sentenceScores",
686+
"confidenceScores",
686687
"offset",
687688
"length"
688689
],
689690
"properties": {
691+
"text": {
692+
"type": "string",
693+
"description": "The sentence text."
694+
},
690695
"sentiment": {
691696
"type": "string",
692697
"description": "The predicted Sentiment for the sentence.",
@@ -700,7 +705,7 @@
700705
"modelAsString": false
701706
}
702707
},
703-
"sentenceScores": {
708+
"confidenceScores": {
704709
"description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.",
705710
"$ref": "#/definitions/SentimentConfidenceScorePerLabel"
706711
},
@@ -1119,4 +1124,4 @@
11191124
"x-ms-skip-url-encoding": true
11201125
}
11211126
}
1122-
}
1127+
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
},
3838
"sentences": [
3939
{
40+
"text": "Hello world.",
4041
"sentiment": "neutral",
4142
"sentenceScores": {
4243
"positive": 0.070910170674324,
@@ -47,6 +48,7 @@
4748
"length": 12
4849
},
4950
{
51+
"text": "This is some input text that I love.",
5052
"sentiment": "positive",
5153
"sentenceScores": {
5254
"positive": 0.998519241809845,
@@ -68,6 +70,7 @@
6870
},
6971
"sentences": [
7072
{
73+
"text": "It's incredibly sunny outside!",
7174
"sentiment": "neutral",
7275
"sentenceScores": {
7376
"positive": 0.0499138832092285,
@@ -78,6 +81,7 @@
7881
"length": 30
7982
},
8083
{
84+
"text": "I'm so happy.",
8185
"sentiment": "positive",
8286
"sentenceScores": {
8387
"positive": 0.9954571723937988,
@@ -99,6 +103,7 @@
99103
},
100104
"sentences": [
101105
{
106+
"text": "Pike place market is my favorite Seattle attraction.",
102107
"sentiment": "positive",
103108
"sentenceScores": {
104109
"positive": 0.9965128302574158,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,7 @@
724724
"SentenceSentiment": {
725725
"type": "object",
726726
"required": [
727+
"text",
727728
"sentiment",
728729
"confidenceScores",
729730
"offset",
@@ -732,6 +733,10 @@
732733
"opinions"
733734
],
734735
"properties": {
736+
"text": {
737+
"type": "string",
738+
"description": "The sentence text."
739+
},
735740
"sentiment": {
736741
"type": "string",
737742
"description": "The predicted Sentiment for the sentence.",

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
},
3333
"sentences": [
3434
{
35+
"text": "Great atmosphere.",
3536
"sentiment": "positive",
3637
"confidenceScores": {
3738
"positive": 1.0,
@@ -73,6 +74,7 @@
7374
]
7475
},
7576
{
77+
"text": "Close to plenty of restaurants, hotels, and transit!",
7678
"sentiment": "neutral",
7779
"confidenceScores": {
7880
"positive": 0.13,
@@ -130,6 +132,7 @@
130132
]
131133
},
132134
{
135+
"text": "Staff are friendly and helpful.",
133136
"sentiment": "positive",
134137
"confidenceScores": {
135138
"positive": 1.0,
@@ -183,6 +186,7 @@
183186
},
184187
"sentences": [
185188
{
189+
"text": "Bad atmosphere.",
186190
"sentiment": "negative",
187191
"confidenceScores": {
188192
"positive": 0.0,
@@ -225,6 +229,7 @@
225229
"warnings": []
226230
},
227231
{
232+
"text": "Not close to plenty of restaurants, hotels, and transit!",
228233
"sentiment": "negative",
229234
"confidenceScores": {
230235
"positive": 0.02,
@@ -267,6 +272,7 @@
267272
"warnings": []
268273
},
269274
{
275+
"text": "Staff are not friendly and helpful.",
270276
"sentiment": "negative",
271277
"confidenceScores": {
272278
"positive": 0.0,
@@ -317,4 +323,4 @@
317323
}
318324
}
319325
}
320-
}
326+
}

0 commit comments

Comments
 (0)