python - 语言检测

标签 python

有没有人知道如何使用 python 确定文本的语言? 在 python 中是否有可用的模块?

我已经尝试过谷歌应用程序 (http://ajax.googleapis.com/ajax/services/language/detect),它工作正常,但我不能长期使用它来处理大量文本文件。

最佳答案

我从来没有尝试过这个,但看起来你可以用 NLTK 来做到这一点(自然语言工具包)。看这个blog post举个例子。

以下问题的答案也可能相关:NLTK and language detection

关于python - 语言检测,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8270305/

相关文章:

python - 如何在django中使用用户身份验证

python - 为什么我不能使用 transforms.ifft2?

python - 如何更改图例中散点标记的大小?

python - 如何将列表装置作为参数传递给 pytest.parametrize?

python - 根据某些属性的总和对 python 中的对象列表进行排序

python - Python : SyntaxError

python - Tensorflow 的介绍性 MNIST 示例导致异常

python - 如何聚合 pandas 系列的值

python - 使用Python提取csv(数据框)中的特定字符串数据

python - 跳出循环 - Python