lingua-rs Python binding. An accurate natural language detection library, suitable for long and short text alike.
pip install linguars
import linguars
detector = linguars.LanguageDetector()
print(detector.detect('我们中出了一个叛徒'))
print(detector.confidence('我们中出了一个叛徒'))
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.