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.9999999999999999
>>> info.is_reliable
True
>>> 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.2.tar.gz
(5.4 kB
view hashes)
Built Distributions
Close
Hashes for whatlang_pyo3-0.2.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eecf3f881dce3e0209edc403ff3311224291430aa993de17c6eec340ce1533ce |
|
MD5 | ab2651affb46d4f1c921a18ec13fd9ba |
|
BLAKE2b-256 | b5a53c78da1bce2b7d06a56982c1f2cc6e9e36e715777dedc34ee52d558a7c69 |
Close
Hashes for whatlang_pyo3-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2bcde87a69918e1624b1def0be2ea338d2d8a4ee1838fd8ee3cdde23fc7d09c |
|
MD5 | 86bfe429a42bd18fbbb7276a88cac78b |
|
BLAKE2b-256 | 31c394303f093fcfe0b1e98aa08b81e070e05239edc51d583ae5ce9d8699d646 |
Close
Hashes for whatlang_pyo3-0.2.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 511851d417f42b9b83daa7d7ff2b724a3e78c230daa7ea69336e98870b8152ec |
|
MD5 | 048ccd77358f095e874bc0a21b0168b8 |
|
BLAKE2b-256 | 1afb2535b744f4784771cf43f550f63ed01121519b96add360d9fa98b8e22889 |
Close
Hashes for whatlang_pyo3-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2da9c4aecc036cb57d316517c6673193e3fe2383fe9816dcf93d7a20d58241f |
|
MD5 | 6d3353bb62085a74cc9c88ee2b2d3b27 |
|
BLAKE2b-256 | d5a32a86fb6e2fc6a4918a2a61ee3984defb9e9bf4d1421be2503827b6c40feb |
Close
Hashes for whatlang_pyo3-0.2.2-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da83659b4758d6c08a8f74b6739b7571b67e3c675e5f46258273a1919467ca5a |
|
MD5 | f878b43d365ca8ef6e17060eace540d2 |
|
BLAKE2b-256 | c78be3bc922be1cc8b497a911b30e11d67e56adb13126c54d65e217a302c3ac5 |
Close
Hashes for whatlang_pyo3-0.2.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57d6767f57850b3f1163f4763360510e095b8a9ccb0549e5723cd421f89c6801 |
|
MD5 | 04b166cbd44975d3a50f16f80567774e |
|
BLAKE2b-256 | a6d63f8d6468fcf6a0aac64f1024710dd1e4144dcfe760f0dfa30cde195db143 |
Close
Hashes for whatlang_pyo3-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0edfee6a56c57f14d1e4611b69ca002e0e005743b5efe3d6f7f902687ed0bd2a |
|
MD5 | 719789c62e55c909a4e5755f7b06b199 |
|
BLAKE2b-256 | 1fb858e0334484ea3f858e3b072f3bc1d696a513c970743d68ab83dda9dc22a9 |
Close
Hashes for whatlang_pyo3-0.2.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 782844b8f915758aa3d368a16f35032f8441e60cd2395531f7d776805594e862 |
|
MD5 | e012331a906e828aec868885d925bf94 |
|
BLAKE2b-256 | 6d30f15db09dfb070416ee169cc54ceb868f353e2a031a52d34ea9516b8f81c2 |
Close
Hashes for whatlang_pyo3-0.2.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f42300b6302740b8045635319ac02bddee8c6145a4abce55e5f8eab8331cb7c6 |
|
MD5 | 25b89269e46da0d1e7ca8eda6166d59a |
|
BLAKE2b-256 | f997935b20ebec409979a4990019baff953318694f6edb01b7fe96dcc8943924 |
Close
Hashes for whatlang_pyo3-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d76934faec1a4109f7999095bf0cb972869ec8f22eb64c813bac6e4ee5781db |
|
MD5 | ba9622ea93c2e16e9b7a053053597dfa |
|
BLAKE2b-256 | 8b5bc6e14bab4329518e0939a77d83372d9bc37f59eca69ea61ba3d4572e6a4d |
Close
Hashes for whatlang_pyo3-0.2.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15b1f089490684ddc7e278fb2470010e9870e218b7481de075ff8bb5ee846a3c |
|
MD5 | b322bd030c7edee07a90dd5a1199826d |
|
BLAKE2b-256 | 56dee65f75f9f7b6cda8a98fe061afa46b4dbe9814ae8424a53e5c1a63127208 |
Close
Hashes for whatlang_pyo3-0.2.2-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 921a616806d59d81fd1be8681a838834b2ba065d51a6bc62564340146488c0e9 |
|
MD5 | c9eb4fb3e2bace5ab56ad9782c5b378e |
|
BLAKE2b-256 | edb014ca499c685b36974f29c3cff3241d18866bdb2348d8103a92895e469498 |
Close
Hashes for whatlang_pyo3-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53bd471af9a40143d4a2d432bcb4bdaa3e7279f1341e6c4d2037a6eb4761ca03 |
|
MD5 | 6f29f7f8da590e78ada718a5b32ca20d |
|
BLAKE2b-256 | d799b050bea3b98e22486e01036a47f242b6bb77605674b12a433dcd389e747e |
Close
Hashes for whatlang_pyo3-0.2.2-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bca07ac4418156494608f8daa29926bacd86b7122c38b88f8f7f9cba0645d711 |
|
MD5 | 608869614f9b163961f2ee5713d30c62 |
|
BLAKE2b-256 | 5a02493007d69320e92460ccb79c6afd72ae69e56868a7ae5b3cb5cdaaebeab3 |