Python bindings for the Lingua(LanguageDetect) Rust library
Project description
Lingua-py
Lingua-py is an Python wrapper for the Rust lingua crate with PyO3/Maturin.
Summary
Lingua is a NIF-based bridge for the lingua Rust language detection library.
Usage
In imitation of Upstream, introduce basic usage.
Alternatively please see tests
section.
10.1 Basic usage
languages: list[Language] = [Language.English, Language.Japanese]
detector: LanguageDetector = LanguageDetectorBuilder.from_languages(
languages
).build()
expected: Language = Language.Japanese
actual: Language = detector.detect_language_of("これは何語ですか?")
assert actual == expected
pytest command
rye sync --no-lock
rye run python -m pytest -s -vv python/tests/small_usage/test_basic.py::test_basic
License
Apache License v2, and lingua-rs is also Apache License v2.
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
lingua_py-0.1.1a20.tar.gz
(22.6 kB
view hashes)
Built Distributions
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4749403d3e264def4f2b0c719e603e2a806046ab25500133c954d63dde0ff17a |
|
MD5 | 5ecff789fa9dabf3a77547af8152aaaf |
|
BLAKE2b-256 | 4d8e66ab438526e6dbb1e9592caa307157890bc20197b2466c7b90a33167a670 |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d5e10b2cc65396a957274840b3bbfe0e021fbca401261cfb456d26f6753d823 |
|
MD5 | 95b222eaaf31b217f3cce051f3acde08 |
|
BLAKE2b-256 | 836e2871a3b2611cccdd0f0b749e0944ef35ceaa007b921b00dbf5320d6778ce |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e44b82d9de9012aa40accbc680c0120ee278f4789710b3c79fbc241cceb45155 |
|
MD5 | 15b5d3b5b78b47a1881d50043b52a224 |
|
BLAKE2b-256 | 44d2885d890c35bee9547a8bac2be3cc27e20d662538b5b2fbf258da5415a029 |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397d5b175284c0cd288646a4665858958ead7052eeb46b8acb16f4abe73090f0 |
|
MD5 | b8c965309d7c68b20541d75196c46208 |
|
BLAKE2b-256 | f13c32fe3955872305734190fbce9fdc44cf2b4fb67871ae38ca4473c79cca06 |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a377a2bc054ec0f49907d6082f0c80c9edc54cbcf9d7a8a68a57de6182d3adec |
|
MD5 | e3175effdc0cd11d777dd7216cee264e |
|
BLAKE2b-256 | eac93a3fc248d2a0f7fd9d34055c02076b02a0abaf458c9f38a1c065d4af34db |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b956545e55e70733f7cdcc63350ac25116bce0545cae165ecf700f47e75ff07 |
|
MD5 | 37777c35431c4ec355593bc0aec9d702 |
|
BLAKE2b-256 | 795254ae9da58c4c28ceea07e98b93840bb7ce23704eb19c7c95c2e872d5f247 |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39e04c67bff754363e128e9495f41f0917e630efc23888dfcc1d0ddcf39cf21e |
|
MD5 | 28f4a102cb361ee8c813b4aa67ccb533 |
|
BLAKE2b-256 | 88867bd0616d37faf140504e1cbeca879937593aa9a2073268ef077e84828372 |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f29be58afd5f6a2ef628c6e9e95683c4af8ca14078a2ae1b1c8d378b9a2233b0 |
|
MD5 | daa9f6ea5964c07272d66131912e634a |
|
BLAKE2b-256 | d6a4ad68ceb06e79cea8b1120870e2281eaae4706f3d7dcf05e3c5237662a5f8 |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4960d454406c8536fb513e27352c0e349e8c806b83c1c4d148109c649b4d49d6 |
|
MD5 | 8952647594a69f67bd675481e0c8c279 |
|
BLAKE2b-256 | 6cc20c72aa7d3e0a8b82b3cb9c6a60ccd2060d220940de68a5ce903a3cc4ecbb |
Close
Hashes for lingua_py-0.1.1a20-cp311-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3623bad6be8f2a743805d622a6cd6a88b3fa72e459f8a43f0c20f5e38fd74b73 |
|
MD5 | 89895301753c6ea022768766d68dec4b |
|
BLAKE2b-256 | 6b7c42ae2341ec431585fd22575c91ee4349a878322fdb226d16ab35eb5b19b1 |