No project description provided
Project description
Python Binding for WhatLang
WhatLang is a Python library for detecting the language of a text. It is based on the WhatLang Rust library.
Installation
pip install whatlang-pyo3
Usage
Detect language
>>> from whatlang import detect
>>> detect("This is written in English")
"Language: eng - Script: Latin - Confidence: 0.11450955767632877 - Is reliable: false"
>>> detect("Ceci est écrit en français")
"Language: fra - Script: Latin - Confidence: 0.14716934730038286 - Is reliable: false"
>>> info = detect("Ceci est écrit en français")
>>> info.lang
"fra"
>>> info.script
"Latin"
>>> info.confidence
0.14716934730038286
>>> info.is_reliable
False
>>> info.to_iso()
"Language: en - Script: Latin - Confidence: 0.11450955767632877 - Is reliable: false"
Detect script
>>> from whatlang import detect_script
>>> detect_script("This is written in English")
Name: Latin - Languages: spa, eng, por, ind, fra, deu, jav, vie, ita, tur, pol, ron, hrv, nld, uzb, hun, aze, ces, zul, swe, aka, sna, afr, fin, slk, tgl, tuk, dan, nob, cat, lit, slv, epo, lav, est, lat
>>> detect_script.name
"Latin"
>>> detect_script.langs
['spa', 'eng', 'por', 'ind', 'fra', 'deu', 'jav', 'vie', 'ita', 'tur', 'pol', 'ron', 'hrv', 'nld', 'uzb', 'hun', 'aze', 'ces', 'zul', 'swe', 'aka', 'sna', 'afr', 'fin', 'slk', 'tgl', 'tuk', 'dan', 'nob', 'cat', 'lit', 'slv', 'epo', 'lav', 'est', 'lat']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
whatlang_pyo3-0.2.3.tar.gz
(5.4 kB
view hashes)
Built Distributions
Close
Hashes for whatlang_pyo3-0.2.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86086d033a9414bea4f2e9e2eaa105dcf5848e3a46b5dccd2616f3b7daf3d4ce |
|
MD5 | 1d7d985d232f723fe32cda5d2ed22277 |
|
BLAKE2b-256 | b718b5373e0c33f80f09cece24478c667e17cb420dbba6dfab9fb2ef48002203 |
Close
Hashes for whatlang_pyo3-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ce1dccc207a03c6b7da321e50c855d4b835687d671995476f048ec447d6eee1 |
|
MD5 | f89d3ab9c79ed9e23e7b7b6a8021fc82 |
|
BLAKE2b-256 | 9373e7a4b9e68e0e4736eea27798ec70834865eaab99c0eac5e376fbd9448f0e |
Close
Hashes for whatlang_pyo3-0.2.3-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc09f6b2cb5cd895fe3b95f6fb20f145d96d8410199df7fb360e22f364c2da81 |
|
MD5 | ede569d5d76b1e900439635da09e6d78 |
|
BLAKE2b-256 | 4583a2eaf02f8e2fb926d5173a126d1f5664cd2cd0082b2cf1c8140636ce3f91 |
Close
Hashes for whatlang_pyo3-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d341f36db55d41ac14ea73d9db37d4aae696fd72d21709394f76b77a1818d186 |
|
MD5 | 0564012d6e24ea9e199a997b0d807502 |
|
BLAKE2b-256 | 36438a23449cda2f678e7d3b89a30dd666fe666992e903c88f0d54e249897423 |
Close
Hashes for whatlang_pyo3-0.2.3-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2284618d78ba7d142692e62c90ac458d2d20e95e12eab3a1c7e627b37d36c09 |
|
MD5 | 4998f5662bc21bcf837c3cfc8b114fb0 |
|
BLAKE2b-256 | db51111b2def266f753ec5613d35c3b73ab481d338ab028d976caef9592b672b |
Close
Hashes for whatlang_pyo3-0.2.3-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4949bf09907181c16a1b5615a6bddc324683d562deca88f7e4e2ef2f995e7ba9 |
|
MD5 | a13a90116d489fd33863ccbbb94b4cbe |
|
BLAKE2b-256 | 881a7e4d075a01a300497e80044c7e991560e0aab304eb638e060bd3cc9b21dc |
Close
Hashes for whatlang_pyo3-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b12fb6b76cb943eb529aa02b38d9a74036ed9a43d5f2304d78b6b8e136db3a24 |
|
MD5 | 8f7a125b768aba999f051152d5b7d5ab |
|
BLAKE2b-256 | 2e3db7f1629cc90a4b73e8eec9a4d39bca3a2eb537dbfff2ee688cf8233a85d3 |
Close
Hashes for whatlang_pyo3-0.2.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77dd441682d167df6e5f995f6bae563e03b3e42c21f54567b265edc79942dbc2 |
|
MD5 | d4cec895295bd4555ff51a6354b933f2 |
|
BLAKE2b-256 | 721ce7d312c7c86fa0dfda2dc2c84c85c31eddff27020a3ec6ed3fa51b6a0676 |
Close
Hashes for whatlang_pyo3-0.2.3-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01cf925a3412e34db6d9d598cd2cc00a24e3d27e75475b41f204491c15b205e |
|
MD5 | cc3092f0388d3d77d5f4f43fbc00a95d |
|
BLAKE2b-256 | 121c68654b97f6181006d32bc545c81587e2b162da9c6c53950a8933d5d7cdb5 |
Close
Hashes for whatlang_pyo3-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ca8e41908fc41c6257f61b6fbad8b77af791fbc4721582c4f7bcf1f828dfacd |
|
MD5 | ac15d9fa9632259dc6cbcf89ab272af2 |
|
BLAKE2b-256 | f5ea9e06d3d5629f5bf63b0215908cf0b57d810e88231c7843963ed10c7a826d |
Close
Hashes for whatlang_pyo3-0.2.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41129bcf40e024c486684649478a97d6993a7c71126e601102084b88c1cdf68b |
|
MD5 | e2602be1dcc70724b112dfa6a6a560c9 |
|
BLAKE2b-256 | b383793f1652cfcf012cc972f5a08d8bbc9099f5b899e52dc26118120e59212c |
Close
Hashes for whatlang_pyo3-0.2.3-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47ed35e197e049fc721e42d57ca804ba5d85653bd9b594b4d6123f719c248697 |
|
MD5 | f817addacd664bf21f24c6c5222fe03a |
|
BLAKE2b-256 | 491dd813f81af306be485630157e1c8463e0a9e833080eddcbad250fec1bcef1 |
Close
Hashes for whatlang_pyo3-0.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a928c252b80800147b81de0590cb9528c83cf97c5e814fb8e2bbb8d8c46bd4a |
|
MD5 | ef1579a0706f8fc8c81e34f396ce9070 |
|
BLAKE2b-256 | 6f46535f912c162c9352dd8ad73f80e529edba3b347a7e640f1370ffed856d27 |
Close
Hashes for whatlang_pyo3-0.2.3-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e8d20a28b41ad78ce6795db688ae476d249fcc28664a46dfb27f3a3e7a9c6b9 |
|
MD5 | 2c2ad865678ce798da858b508b57dffa |
|
BLAKE2b-256 | 0d77ced93b2447ca255d0e8defffbfd04df5672f2d69da32fbd02424da0d28da |