安装:
pip install langid
代码示例:
>>> import langid >>> langid.classify("This is a test") ('en', -54.41310358047485)