Skip to main content

Python clases for detecting languges.

Project description

What is this package

The languagedet package implements language detection using stopwords and trigrams. It has three clases:

  • languagedet.stopwords.StopWordsDetector: detects language using stopword lists.

  • languagedet.textcat.TextCatDetector: uses the libexttexcat library for language detection.

  • languagedet.mixed.MixedDetector: uses StopWordsDetector and if it fails then use TextCatDetector.

Intallation

This package depends on the libexttextcat library. To install it in Ubuntu:

$ sudo apt-get install build-essential python-dev libexttextcat-dev

Now you can install using pip:

$ pip install languagedet

Example

In [1]: from languagedet.mixed import MixedDetector

In [2]: det = MixedDetector()

In [3]: det.available
Out[3]:
['fr',
 'en',
 'de',
 'it',
 'da',
 'fi',
 'hu',
 'es',
 'ru',
 'nl',
 'pt',
 'no',
 'tr',
 'sv']

In [4]: det('biblioteca para la detectar idioma')
Out[4]: 'es'

Changelog

Version 0.1.1

  • Modified setup.py.

  • Added a README.txt.

  • Added a MANIFEST.in to include data files missing in version 0.1.

  • Removed dependencies form cython and setuptools-cython.

Version 0.1

  • Initial version.

  • Support for language detectión using stopwords and the exttextcat library.

Project details


Download files

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

Source Distribution

languagedet-0.1.1.tar.gz (44.1 kB view details)

Uploaded Source

File details

Details for the file languagedet-0.1.1.tar.gz.

File metadata

  • Download URL: languagedet-0.1.1.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for languagedet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 836bf86cd0add39db628702a5d46a29f90b36733dd01d021704a664233810558
MD5 d32cc3634980f05ca3b9326e75c43004
BLAKE2b-256 d3496bc919fd6b3fb000daa795b597bb1472f5cf9f4616e9f9d043a93d4d75ea

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page