<jupyter_start><jupyter_text>Azure Content Moderator API Reference: https://docs.microsoft.com/en-us/azure/cognitive-services/Content-Moderator/api-reference<jupyter_code>import requests
subscripiton_key = 'YOUR_SUBSCRIPTION_KEY'
endpoint = 'YOUR_ENDPOINT_URL'
request_url = f'{endpoint}/contentmoderator/moderate/v1.0/ProcessText/Screen'
headers = {
    'Content-Type': 'text/plain',
    'Ocp-Apim-Subscription-Key': subscripiton_key,
}
params = {
    'classify': True,
}
body = 'Is this a crap email <EMAIL>, phone: 6657789887, IP: 255.255.255.255, 1 Microsoft Way, Redmond, WA 98052'
response = requests.post(request_url, data=body, headers=headers, params=params)
response.json()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1332398316970547, 'fraction_numerical': 0.04207573632538569, 'mean_word_length': 6.4375, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 1, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '667882', 'license': 'MIT', 'n_tokens_mistral': 280, 'n_tokens_neox': 254, 'n_words': 44, 'path': 'evaluate-text-with-azure-cognitive-language-services/content-moderator.ipynb', 'repo_name': 'zkan/azure-ai-engineer-associate-workshop', 'size': '721'}