Skip to main content

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 unittsets) are unchanged, so for more information see the project’s website or wiki.

Metadata

Release files for langdetect 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langdetect 1.0.5
File Size Uploaded Provenance Actions
langdetect-1.0.5.zip 993.7 kB Without provenance Details for langdetect-1.0.5.zip

Release files / langdetect-1.0.5.zip

Download URL langdetect-1.0.5.zip
Size 993.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b6eb72f4774fd735e797379b66a760c3b43d8ecad00db0695ac91bb7d20597c8
BLAKE2b-256 checksum
How to use checksums
c218f01433f13d45fc873ddf51e07cb2c533e5af0c478057f634488cb1486913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for langdetect 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page