Language detection library ported from Google's language-detection.
Project description
langdetect
Port of [language-detection](https://code.google.com/p/language-detection/) (version from 03/03/2014) library to Python.
Installation
$ pip install langdetect
Supported Python versions 2.6, 2.7, 3.x.
Basic usage
To detect the language of the text:
>>> from langdetect import detect >>> detect("War doesn't show who's right, just who's left.") 'en' >>> detect("Ein, zwei, drei, vier") 'de'
To find out the probabilities for the top languages:
>>> from langdetect import detect_langs >>> detect_langs("Otec matka syn.") [sk:0.572770823327, pl:0.292872522702, cs:0.134356653968]
More information
This library is a direct port of [language-detection](https://code.google.com/p/language-detection/) from Java to Python. All the classes and methods (even unit tests) are unchanged, so for more information see the project’s website or wiki.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langdetect-py-1.1.0.tar.gz
(987.8 kB
view hashes)
Built Distribution
Close
Hashes for langdetect_py-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52929bc3fede8cad07a13bd400a6be97d605cef10903c4ebc94c1de0e1f91afe |
|
MD5 | c5f92fe4c0e657e7af9c46153dafb73f |
|
BLAKE2b-256 | 05639f04126e0f96c2a0f8fb5a2d56dbc35b4c2d828ae3547c32c91bd5cc5173 |