Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Guess the natural language of a text

Project description

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 MSI binary packages provided on the download page.

Prerequisites

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

Project details


Release history Release notifications

This version
History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5

History Node

0.5a5

History Node

0.5a4

History Node

0.5a3

History Node

0.5a2

History Node

0.5a1

History Node

0.4a7

History Node

0.4a6

History Node

0.4a5

History Node

0.4a4

History Node

0.4a3

History Node

0.4a2

History Node

0.4a1

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
guess_language-spirit-0.5.3.tar.bz2 (81.9 kB) Copy SHA256 hash SHA256 Source None Mar 11, 2017

Supported by

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