All Projects → detectlanguage → detectlanguage-python

detectlanguage / detectlanguage-python

Licence: MIT license
Detect Language API Python Client

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to detectlanguage-python

Cld2
R Wrapper for Google's Compact Language Detector 2
Stars: ✭ 34 (-30.61%)
Mutual labels:  language-detection
Fasttext.js
FastText for Node.js
Stars: ✭ 127 (+159.18%)
Mutual labels:  language-detection
Malaya
Natural Language Toolkit for bahasa Malaysia, https://malaya.readthedocs.io/
Stars: ✭ 239 (+387.76%)
Mutual labels:  language-detection
Guess Language.el
Emacs minor mode that detects the language you're typing in. Automatically switches spell checker. Supports multiple languages per document.
Stars: ✭ 78 (+59.18%)
Mutual labels:  language-detection
Nlp Models Tensorflow
Gathers machine learning and Tensorflow deep learning models for NLP problems, 1.13 < Tensorflow < 2.0
Stars: ✭ 1,603 (+3171.43%)
Mutual labels:  language-detection
Go Lang Detector
A small library in golang, that detects the language of a text. (text categorization)
Stars: ✭ 134 (+173.47%)
Mutual labels:  language-detection
Geomate
GeoMate is a friend in need for all things geolocation. IP to geo lookup, automatic redirects (based on country, continent, language, etc), site switcher... You name it.
Stars: ✭ 19 (-61.22%)
Mutual labels:  language-detection
spacy-langdetect
A fully customisable language detection pipeline for spaCy
Stars: ✭ 86 (+75.51%)
Mutual labels:  language-detection
Padatious
A neural network intent parser
Stars: ✭ 124 (+153.06%)
Mutual labels:  language-detection
Hms Ml Demo
HMS ML Demo provides an example of integrating Huawei ML Kit service into applications. This example demonstrates how to integrate services provided by ML Kit, such as face detection, text recognition, image segmentation, asr, and tts.
Stars: ✭ 187 (+281.63%)
Mutual labels:  language-detection
Paasaa
Natural language detection for Elixir
Stars: ✭ 86 (+75.51%)
Mutual labels:  language-detection
React Native Localize
🌍 A toolbox for your React Native app localization
Stars: ✭ 1,682 (+3332.65%)
Mutual labels:  language-detection
Spark Nlp
State of the Art Natural Language Processing
Stars: ✭ 2,518 (+5038.78%)
Mutual labels:  language-detection
Google Translate Php
🌐 Free Google Translate API PHP Package. Translates totally free of charge.
Stars: ✭ 1,131 (+2208.16%)
Mutual labels:  language-detection
cnn-ld-tf
Convolutional Neural Network for Language Detection in Tensorflow
Stars: ✭ 12 (-75.51%)
Mutual labels:  language-detection
Cadscenario personalisation
This is a end to end Personalisation business scenario
Stars: ✭ 10 (-79.59%)
Mutual labels:  language-detection
Whatthelang
Lightning Fast Language Prediction 🚀
Stars: ✭ 130 (+165.31%)
Mutual labels:  language-detection
php-google-translate-for-free
Library for free use Google Translator. With attempts connecting on failure and array support.
Stars: ✭ 124 (+153.06%)
Mutual labels:  language-detection
pycld3
Python3 bindings for the Compact Language Detector v3 (CLD3)
Stars: ✭ 122 (+148.98%)
Mutual labels:  language-detection
L10n Swift
Localization of the application with ability to change language "on the fly" and support for plural form in any language.
Stars: ✭ 177 (+261.22%)
Mutual labels:  language-detection

Detect Language API Python Client

PyPI version Build Status

Detects language of given text. Returns detected language codes and scores.

Before using Detect Language API client you have to setup your personal API key. You can get it by signing up at https://detectlanguage.com

Installation

pip install detectlanguage

Configuration

import detectlanguage

detectlanguage.configuration.api_key = "YOUR API KEY"

# Enable secure mode (SSL) if you are passing sensitive data
# detectlanguage.configuration.secure = True

Usage

Language detection

detectlanguage.detect("Buenos dias señor")

Result

[{'isReliable': True, 'confidence': 12.04, 'language': 'es'}]

Simple language detection

If you need just a language code you can use simple_detect. It returns just the language code.

detectlanguage.simple_detect("Buenos dias señor")

Result

'es'

Batch detection

It is possible to detect language of several texts with one request. This method is faster than doing one request per text. To use batch detection just pass array of texts to detect method.

detectlanguage.detect(["Buenos dias señor", "Labas rytas"])

Result

Result is array of detections in the same order as the texts were passed.

[ [ {'isReliable': True, 'confidence': 12.04, 'language': 'es'} ],
  [ {'isReliable': True, 'confidence': 9.38, 'language': 'lt'} ] ]

Getting your account status

detectlanguage.user_status()

Result

{ 'status': 'ACTIVE', 'daily_requests_limit': 5000, 'daily_bytes_limit': 1048576,
  'bytes': 3151, 'plan': 'FREE', 'date': '2014-03-29', 'requests': 263,
  'plan_expires': None }

Getting list detectable languages

detectlanguage.languages()

Result

Array of language codes and names.

Contribution

You are welcome to patch and send GitHub pull requests.

Testing

pip install -r requirements.txt
pip install -r test-requirements.txt
nosetests

License

Detect Language API Python Client is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].