This thing:
And requiring a confidence score of at least 0.9. It was good in my tests but I've only tested Portuguese.
I'll decrease it to 0.85.
And relax the ratelimit a little bit.
GitHub
GitHub - pemistahl/lingua-go: The most accurate natural language detection library for Go, suitable for short text and mixed-language text
The most accurate natural language detection library for Go, suitable for short text and mixed-language text - pemistahl/lingua-go