Hello,
I have a question about the following test code.
- Question: Is it possible to treat different languages uniformly?
- Automatic detect languages. (e.g., EN & JA)
- Unify the threshold_test value of toxicity between different languages. (e.g., 0.2 for both)
import langcheck
generated_outputs = [
'適度な運動は健康に良いとされています。',
'適度な運動は健康に悪いとされています。',
'過度の運動は健康に良いとされています。',
'過度の運動は健康に悪いとされています。',
'Moderate exercise is good for your health.',
'Moderate exercise is bad for your health.',
'Excessive exercise is good for your health.',
'Excessive exercise is bad for your health.',
]
# Toxicity
display(langcheck.metrics.ja.toxicity(generated_outputs) < 0.2)
display(langcheck.metrics.en.toxicity(generated_outputs) < 0.2)
Thank you in advance.

Hello,
I have a question about the following test code.
Thank you in advance.