Skip to main content

Example usage

>>> from guess_language import guess_language
>>> guess_language("Ces eaux regorgent de renégats et de voleurs.")
'fr'
>>> guess_language("Tienes que seguir tu corazón.")
'es'
>>> guess_language("いいえ!忍者がいます")
'ja'
>>> not guess_language("??")
True

If your text is less than 20 characters long, you need PyEnchant and the appropriate dictionaries installed:

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

Installation

To install the package for Python 3, use:

$ ./setup.py install

To install the package for Python 2, use:

$ python2 setup.py install

To install with pip, use:

$ pip install guess_language-spirit

On Windows, you may use one of the binary packages provided on the releases page.

Prerequisites

This is a Python 3 version of guess-language with further improvements.

Release files for guess-language-spirit 0.5.4

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

Source distribution (sdist)

Source distribution for guess-language-spirit 0.5.4
File Size Uploaded
guess_language_spirit-0.5.4.tar.gz 122.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for guess-language-spirit 0.5.4
File Interpreter ABI Platform
guess_language_spirit-0.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 260.9 kB

Release files / guess_language_spirit-0.5.4.tar.gz

Download URL guess_language_spirit-0.5.4.tar.gz
Size 122.8 kB
Tags Source
SHA-256 checksum
How to use checksums
536e0f17b2a19da861481a72ebb28a775dfa329fe70f7b76a8dee5cd3201c702
BLAKE2b-256 checksum
How to use checksums
d43defef9e756ca7ddc10bf2d352cd0924a669d4a4d7cb22005e887d4be0c346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / guess_language_spirit-0.5.4-py3-none-any.whl

Download URL guess_language_spirit-0.5.4-py3-none-any.whl
Size 138.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
927efa53a75e2c3bcd6229ed17760f3a785576d72c6b6d59db37292953f9d104
BLAKE2b-256 checksum
How to use checksums
910153abc7a2968e5052dad0e20dd9c03da3588350a00d2e756aec17dd07fe13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.5.4 This release

2 release files

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5

1 release file

0.5a4

0.5a3

0.5a2

0.5a1

0.4a7

0.4a6

0.4a5

0.4a4

0.4a3

0.4a2

0.4a1

0.3.2

0.3.1

0.3.0

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