jieba-rs Python binding
Project description
rjieba-py
jieba-rs Python binding.
Installation
pip install rjieba
Usage
import rjieba
print(rjieba.cut('我们中出了一个叛徒'))
print(rjieba.tag('我们中出了一个叛徒'))
Performance
Running on MacBook Pro (15-inch, 2018) 2.2 GHz 6-Core Intel Core i7
In [1]: import jieba
In [2]: import cjieba
In [3]: import rjieba
In [4]: jieba.initialize()
Building prefix dict from the default dictionary ...
Loading model from cache /var/folders/8d/h3lyjgz14296j_lw7chgf5hc0000gp/T/jieba.cache
Loading model cost 0.695 seconds.
Prefix dict has been built successfully.
In [5]: cjieba.initialize()
In [6]: with open('../jieba-rs/examples/weicheng/src/weicheng.txt') as f:
...: txt = f.read()
...:
In [7]: %timeit list(jieba.cut(txt))
1.1 s ± 10.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [8]: %timeit cjieba.cut(txt)
225 ms ± 3.95 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
In [9]: %timeit rjieba.cut(txt)
106 ms ± 2.01 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
License
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.
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
Built Distributions
File details
Details for the file rjieba-0.1.5.tar.gz
.
File metadata
- Download URL: rjieba-0.1.5.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81f99c25eae733aab3b2405b35c53fdd1913f2620c53d5ce4a81b27e5bb8fc72 |
|
MD5 | fdc63eb26ab4181670d2254e1bb6961e |
|
BLAKE2b-256 | e5867fe508253086a74b3f6e94c9b60cab2ae6f744d61e0862d9ecb2f2bf8fae |
File details
Details for the file rjieba-0.1.5-cp36-abi3-win_amd64.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-win_amd64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.6+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 588e86521c6db33f3c618142cc4cbccf0882640b2f7813d66d4509b9beb53c6f |
|
MD5 | 1b67eca3951cfa976e30ceb9a9957d6c |
|
BLAKE2b-256 | 353211dd24e2a4256fa203aa8413918e3b7a065b410e7f945ffe78ee5fc8d465 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-win32.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-win32.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.6+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6cfc11861cc3550bec7297b256c7ec20ca38b535413a5f9ee7fdaed956973cd |
|
MD5 | 10fdb4ed149af917485a986000249622 |
|
BLAKE2b-256 | 23d4d56f8c70240267677d2b2ce40f2a2066434f683f6ea6bfbe493c3d5de670 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-manylinux2014_armv7l.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-manylinux2014_armv7l.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.6+
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc71017bc8fe563f2817ac8fb007ec20a52f399ba6fb9df9d0ac91c135f78037 |
|
MD5 | 5960773778e4178250f969dff73d095f |
|
BLAKE2b-256 | 4ae71e2ef091517e4fca846f1c5ae989960595b858ca52bbf656214cb6c30603 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-manylinux2014_aarch64.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-manylinux2014_aarch64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.6+
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b189cb755fd1e2343d94bec39f38796e3c69d014971b8b0692e0dd99049b41b |
|
MD5 | 51510b4dfd6fa186420168f037ceb4e4 |
|
BLAKE2b-256 | 964a4e99ea71594f160696ab3797b621848e1f7fefb391333207ea5faf854b50 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-manylinux2010_x86_64.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-manylinux2010_x86_64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.6+, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41e56b3025294f287017b8eb6746b661884c442d166373149bde7eb596177220 |
|
MD5 | e4cc17baf7ae097ee43b73cf3008973c |
|
BLAKE2b-256 | f79bca10ba323bed458b1d054efd6af6e83753b072bfd0141ab3b843f6584627 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-manylinux2010_i686.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-manylinux2010_i686.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.6+, manylinux: glibc 2.12+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cd9b7cf48e041dae8d9fee9e04a203396782e5b37c5f0c8ff7982cb83a9c301 |
|
MD5 | 984ef7aae627237afa316955f54cd249 |
|
BLAKE2b-256 | ebbdd393c9573ed7ed61258b573374c574cf412e43d490211fa4878753fd5db6 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-macosx_10_9_universal2.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-macosx_10_9_universal2.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.6+, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20c2f8b2257aae69d58f68af003cbd5d504cb308167eca6b54052ceae4eb935 |
|
MD5 | 1c7bbbdb0f61135c3ee47d77f130868c |
|
BLAKE2b-256 | a99e84cf2ae9112e759709dbeeb1e47908de156d84a60dd71e5e9a388ae2d717 |
File details
Details for the file rjieba-0.1.5-cp36-abi3-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: rjieba-0.1.5-cp36-abi3-macosx_10_7_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.6+, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61af5fcb4775554f86d0ebb67892c710a10f776f0f22bf389a6d9404299e7276 |
|
MD5 | 7e9f84e54a46463b4629acfa67ea681c |
|
BLAKE2b-256 | 0e186f785088ac9b260dde0e2f28a89b4d912d582a8991d42eb0b81a5156ca32 |