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
Python 3.2+ (or 2.7)
PyEnchant (optional)
lib3to2 (if installing for Python 2)
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)
| File | Size | Uploaded | |
|---|---|---|---|
| guess_language_spirit-0.5.4.tar.gz | 122.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|