When using the Ruled-based pattern-matching algorithms, it is recommended that you specify the language of each text item you submit to the API. This helps ensure optimal accuracy and processing speed.
That said, there are situations where it is not possible to know what language a given text item was written in. In such cases, you can let the API automatically detect the language and perform profanity detection in the relevant language.
To do so, you just need to provide a list of target languages to the API. We recommend that you provide a list that is as short as possible. Including too many languages can decrease accuracy and speed.
Please note that submitting a text that contains only non-script tokens, such as whitespace, punctuation or emojis would result in the API defaulting to English. Also, sending a text in a language that is very different from the languages in your list, would result in the API fallbacking to your default language.
Was this page helpful?