Can you automatically detect the language of the text I want to moderate?
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.
Other frequent questions
- How does text moderation work?
- How do text classification models work?
- How do ruled-based pattern-matching algorithms work?
- How does Sightengine's text moderation differ from keyword filtering? How do you prevent users from circumventing word filters?
- Is it possible to customize the Text Moderation API to my needs?
- What languages does text moderation work with?
- What is the maximum text length?
- How does pricing for text moderation work?