# PurgoMalum

> Filter profanity out of text with PurgoMalum, a free profanity filter: mask swear words with a character or your own text, add words of your own, or check whether a text is clean before it is posted.

App · 2 actions. Web page: https://docs.lodol.com/docs/integrations/purgomalum

## Actions

### Check text for profanity

Check whether a text contains swear words or other profanity, to hold a post for review or branch a workflow. Common disguises such as sh1t and $hit count too.

**Inputs**

- Text (`text`, text, required): The text to check, such as a comment or a message, up to about 10,000 characters.
- Extra words to filter (`extra_words_to_filter`, list): Up to 10 more words or phrases to treat as profanity, such as a competitor's name. Letters and spaces only.

**Outputs**

- `contains_profanity` (true/false): Whether the text contains profanity
- `text` (text): The text that was checked

**Example output**

```json
{
  "contains_profanity": true,
  "text": "This is some shit text"
}
```

### Clean up profanity

Mask the swear words and other profanity in a text, such as a comment before it is posted. Each word is filled with a character, or replaced whole with text you choose. Common disguises such as sh1t and $hit are caught too.

**Inputs**

- Text (`text`, text, required): The text to check, such as a comment or a message, up to about 10,000 characters.
- Replacement character (`replacement_character`, text): The character that fills each masked word, one for each letter. One of: `*` (Asterisks (****)), `_` (Underscores (____)), `-` (Dashes (----)), `~` (Tildes (~~~~)), `=` (Equal signs (====)), `|` (Pipes (||||)). Default: `*`.
- Replacement text (`replacement_text`, text): Text that replaces each masked word whole instead, such as [removed]. Up to 20 letters, numbers, spaces or _ ~ ! - = | ' " * { } [ ] ( ).
- Extra words to filter (`extra_words_to_filter`, list): Up to 10 more words or phrases to treat as profanity, such as a competitor's name. Letters and spaces only.

**Outputs**

- `had_profanity` (true/false): Whether anything was masked
- `original_text` (text): The text as it was given
- `text` (text): The text with its profanity masked, without leading or trailing spaces

**Example output**

```json
{
  "had_profanity": true,
  "original_text": "This is some shit text",
  "text": "This is some **** text"
}
```
