TextModerationOperations Class
TextModerationOperations operations.
- Inheritance
-
builtins.objectTextModerationOperations
Constructor
TextModerationOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Methods
| detect_language |
This operation will detect the language of given input content. Returns the ISO 639-3 code for the predominant language comprising the submitted text. Over 110 languages supported. |
| screen_text |
Detect profanity and match against custom and shared blacklists. Detects profanity in more than 100 languages and match against custom and shared blacklists. |
detect_language
This operation will detect the language of given input content. Returns the ISO 639-3 code for the predominant language comprising the submitted text. Over 110 languages supported.
detect_language(text_content_type, text_content, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- text_content_type
- str
The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'
- text_content
- <xref:Generator>
Content to screen.
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
DetectedLanguage or ClientRawResponse if raw=true
Return type
Exceptions
screen_text
Detect profanity and match against custom and shared blacklists.
Detects profanity in more than 100 languages and match against custom and shared blacklists.
screen_text(text_content_type, text_content, language=None, autocorrect=False, pii=False, list_id=None, classify=False, custom_headers=None, raw=False, callback=None, **operation_config)
Parameters
- text_content_type
- str
The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'
- text_content
- <xref:Generator>
Content to screen.
- callback
- <xref:Callable>[<xref:Bytes>, <xref:response=None>]
When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.
- operation_config
Operation configuration overrides.
Returns
Screen or ClientRawResponse if raw=true
Return type
Exceptions
Attributes
models
models = <module 'azure.cognitiveservices.vision.contentmoderator.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.12\\x64\\lib\\site-packages\\azure\\cognitiveservices\\vision\\contentmoderator\\models\\__init__.py'>
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ