[text analytics] add string-index-type support#13378
[text analytics] add string-index-type support#13378iscai-msft merged 8 commits intoAzure:masterfrom
Conversation
deyaaeldeen
left a comment
There was a problem hiding this comment.
Looks good!, left a few minor comments about formatting. Are we sure we can not come with a better name for the parameter?
sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_sentiment_async.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_detect_language_async.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_entities_async.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py
Outdated
Show resolved
Hide resolved
|
@deyaaeldeen in Python it doesn't really matter if we leave a trailing comma during imports, and for arrays taht span multiple lines it's actualy enouraged to leave a trailign comma. Which parameter are you saying we should come up with a better name for? |
|
@iscai-msft |
|
@deyaaeldeen this parameter isn't exposed to users at all for python, so naming doesn't matter since it's just for us. You should sync with @willmtemple to see if JS wants to expose string-index-type to users (at least initially) |
I would say it matters for whoever is maintaining the library, so even if we don't expose it, we should consider a name that indicates what the variable is storing in place. |
|
@iscai-msft I think code readability is also important and coming up with good names is generally a good thing. It is a nitpick though so I am happy with whatever call you make on this. |
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py
Outdated
Show resolved
Hide resolved
sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py
Outdated
Show resolved
Hide resolved
| result = client.recognize_pii_entities(["👩 SSN: 859-98-0987"]) | ||
| self.assertEqual(result[0].entities[0].offset, 7) | ||
| self.assertEqual(result[0].entities[0].length, 11) | ||
|
|
||
| @GlobalTextAnalyticsAccountPreparer() | ||
| @TextAnalyticsClientPreparer() |
There was a problem hiding this comment.
this tests are not specifically for PII. Looks like Python has files per group of tests, so consider moving this to a specific file and test it for different endpoints too
There was a problem hiding this comment.
I'll move this into another test file for offset and length tests
|
With this change, I think it is worth adding in the readme, and in the description of |
|
@maririos @deyaaeldeen I really don't have strong feelings, so I'll just change the internal name to |
9990bf1
…into return_none_for_offset_length_v3 * 'master' of https://github.com/Azure/azure-sdk-for-python: [text analytics] add string-index-type support (Azure#13378) [text analytics] fix error response if pii entities is called from v3.0 client (Azure#13383) Send spec (Azure#13143) Anomaly Detector 3.0.0b2 release (Azure#13351) azure-keyvault-administration generated code (Azure#12098) fixed bug in querying by page using continuation token (Azure#13298)
…into expose_parse_vault_id * 'master' of https://github.com/Azure/azure-sdk-for-python: (37 commits) [text analytics] add versionadded sphinx documentation (Azure#13450) [text analytics] add bing_id property to LinkedEntity class (Azure#13446) fix typing for paging methods (Azure#13410) [text analytics] add domain_filter param (Azure#13451) fix issue Azure#11658 for is_valid_resource_id (Azure#11709) added create_table_if_not_exists method to table service client (Azure#13385) [ServiceBus] Test and failure improvements (Azure#13345) Proper encoding and decoding of source URLs - Fixes special characters in source URL issue (Azure#13275) Switch retry (Azure#13264) [ServiceBus] ServiceBusClient close spawned children (Azure#13077) fixing version issue by not overwriting the version with the semantic… (Azure#13411) clean up reference and tests (Azure#13412) Consistent returns (Azure#13245) [text analytics] return None for offset and length for v3.0 (Azure#13382) edit all authentication files and add a test (Azure#13355) Add managed_identity_client_id argument to DefaultAzureCredential (Azure#13218) [text analytics] add string-index-type support (Azure#13378) [text analytics] fix error response if pii entities is called from v3.0 client (Azure#13383) Send spec (Azure#13143) Anomaly Detector 3.0.0b2 release (Azure#13351) ...
Defaults to Uniode code points for Python
Following talks with @johanste python is going to at least start out not exposing the string-index-type param to users
fixes #12032