Skip to main content

Guess the natural language of a text

Project description

Example usage

>>> from guess_language import guess_language, UNKNOWN
>>> guess_language("I’ve been feeling déjà vu all morning.")
>>> guess_language("Tienes que seguir tu corazón.")
>>> guess_language("いいえ!忍者がいます")

If text is very short and PyEnchant is available, check against installed spelling dictionaries.

>>> guess_language("Hello, World!")


You can use the setup script:

$ ./ install

On Windows, you can use one of the MSI binary packages provided on the download page.


This is basically my branch of guess-language, ported to Python 3 and optimized for my own needs.

Project details

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page