-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[text analytics] Add warnings #11053
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
Merged
iscai-msft
merged 12 commits into
Azure:feature/text_analytics_v3.0
from
iscai-msft:add_warnings
Apr 27, 2020
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
debc19d
adding warnings to result objects
iscai-msft a881587
added tests
iscai-msft 7a2ac11
added samples
iscai-msft 5ade091
fixed pylint
iscai-msft 881eacc
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-pytho…
iscai-msft 91df0a9
Merge branch 'feature/text_analytics_v3.0' of https://github.com/Azur…
iscai-msft e6320ad
Merge branch 'feature/text_analytics_v3.0' of https://github.com/Azur…
iscai-msft c959718
making warnings default to empty list
iscai-msft 44e968d
Merge branch 'feature/text_analytics_v3.0' of https://github.com/Azur…
iscai-msft 23eec45
implemented krista's comments
iscai-msft 3c34c3f
Merge branch 'feature/text_analytics_v3.0' of https://github.com/Azur…
iscai-msft 33efdb9
updated tests
iscai-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...zure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"documents": [{"id": "1", "text": "This won''t actually create a warning | ||
| :''(", "language": "en"}]}' | ||
| headers: | ||
| Accept: | ||
| - application/json | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '98' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - azsdk-python-ai-textanalytics/1.0.0b5 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) | ||
| Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) | ||
| method: POST | ||
| uri: https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0/sentiment?showStats=false | ||
| response: | ||
| body: | ||
| string: '{"documents":[{"id":"1","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":40,"text":"This | ||
| won''t actually create a warning :''("}],"warnings":[]}],"errors":[],"modelVersion":"2019-10-01"}' | ||
| headers: | ||
| apim-request-id: | ||
| - c1f122eb-deb0-4369-b857-2d91e3d0e348 | ||
| content-type: | ||
| - application/json; charset=utf-8 | ||
| csp-billing-usage: | ||
| - CognitiveServices.TextAnalytics.BatchScoring=1 | ||
| date: | ||
| - Fri, 24 Apr 2020 18:51:45 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| transfer-encoding: | ||
| - chunked | ||
| x-content-type-options: | ||
| - nosniff | ||
| x-envoy-upstream-service-time: | ||
| - '276' | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
46 changes: 46 additions & 0 deletions
46
...re-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_warnings.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| interactions: | ||
| - request: | ||
| body: '{"documents": [{"id": "1", "text": "Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmostdoesn''tseemtostopatanygivenpointintime.ThereasonforthistestistotryandseewhathappenswhenwesubmitaveryveryverylongtexttoLanguage.Thisshouldworkjustfinebutjustincaseitisalwaysgoodtohaveatestcase.ThisallowsustotestwhathappensifitisnotOK.Ofcourseitisgoingtobeokbutthenagainitisalsobettertobesure!", | ||
| "language": "en"}]}' | ||
| headers: | ||
| Accept: | ||
| - application/json | ||
| Accept-Encoding: | ||
| - gzip, deflate | ||
| Connection: | ||
| - keep-alive | ||
| Content-Length: | ||
| - '413' | ||
| Content-Type: | ||
| - application/json | ||
| User-Agent: | ||
| - azsdk-python-ai-textanalytics/1.0.0b5 Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) | ||
| Python/3.7.7 (Darwin-17.7.0-x86_64-i386-64bit) | ||
| method: POST | ||
| uri: https://westus2.ppe.cognitiveservices.azure.com/text/analytics/v3.0/keyPhrases?showStats=false | ||
| response: | ||
| body: | ||
| string: '{"documents":[{"id":"1","keyPhrases":["Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmost"],"warnings":[{"code":"LongWordsInDocument","message":"The | ||
| document contains very long words (longer than 64 characters). These words | ||
| will be truncated and may result in unreliable model predictions."}]}],"errors":[],"modelVersion":"2019-10-01"}' | ||
| headers: | ||
| apim-request-id: | ||
| - bbaeaafd-7ae8-46d9-88bb-a0eae6fdab85 | ||
| content-type: | ||
| - application/json; charset=utf-8 | ||
| csp-billing-usage: | ||
| - CognitiveServices.TextAnalytics.BatchScoring=1 | ||
| date: | ||
| - Fri, 24 Apr 2020 18:40:40 GMT | ||
| strict-transport-security: | ||
| - max-age=31536000; includeSubDomains; preload | ||
| transfer-encoding: | ||
| - chunked | ||
| x-content-type-options: | ||
| - nosniff | ||
| x-envoy-upstream-service-time: | ||
| - '4' | ||
| status: | ||
| code: 200 | ||
| message: OK | ||
| version: 1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.