Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Microsoft provided a service to check for profanity. The purpose of this module is to make it easier to use Microsoft's content moderation service.

You will need to have an API key to use Microsoft's content moderator service. Set an environment variable called AZURE_CONTENT_MODERATION_SERVICE_KEY with your API key.

Once you set this key you can use the "azure_content_moderator.profanity_service" service to call getResults. This method will take a string argument that will be sent to Microsoft's content moderator service and return a JSON result.

The JSON result will show several categories with a number between 0 to 8. The number means how high the text scored in the given category.

For example, the following text "I hate you" would score a 2 on the hate category.

The second method to note is the isAppropriate method. This method will take the results from the getResults method and return TRUE or FALSE based on what the categories numbers are. By default isAppropriate will return FALSE meaning the text is not appropriate if any of the categories scores more then a 0. The condition on what number needs to be scored for isAppropriate to return TRUE or FALSE can be configured in the settings form. Which can be found here /admin/config/azure_content_moderator.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.x-dev Dev Dec 19, 2024