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
rjieba-0.1.5.tar.gz
(5.4 kB
view hashes)
Built Distributions
Close
Hashes for rjieba-0.1.5-cp36-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 588e86521c6db33f3c618142cc4cbccf0882640b2f7813d66d4509b9beb53c6f |
|
MD5 | 1b67eca3951cfa976e30ceb9a9957d6c |
|
BLAKE2b-256 | 353211dd24e2a4256fa203aa8413918e3b7a065b410e7f945ffe78ee5fc8d465 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6cfc11861cc3550bec7297b256c7ec20ca38b535413a5f9ee7fdaed956973cd |
|
MD5 | 10fdb4ed149af917485a986000249622 |
|
BLAKE2b-256 | 23d4d56f8c70240267677d2b2ce40f2a2066434f683f6ea6bfbe493c3d5de670 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc71017bc8fe563f2817ac8fb007ec20a52f399ba6fb9df9d0ac91c135f78037 |
|
MD5 | 5960773778e4178250f969dff73d095f |
|
BLAKE2b-256 | 4ae71e2ef091517e4fca846f1c5ae989960595b858ca52bbf656214cb6c30603 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b189cb755fd1e2343d94bec39f38796e3c69d014971b8b0692e0dd99049b41b |
|
MD5 | 51510b4dfd6fa186420168f037ceb4e4 |
|
BLAKE2b-256 | 964a4e99ea71594f160696ab3797b621848e1f7fefb391333207ea5faf854b50 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41e56b3025294f287017b8eb6746b661884c442d166373149bde7eb596177220 |
|
MD5 | e4cc17baf7ae097ee43b73cf3008973c |
|
BLAKE2b-256 | f79bca10ba323bed458b1d054efd6af6e83753b072bfd0141ab3b843f6584627 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cd9b7cf48e041dae8d9fee9e04a203396782e5b37c5f0c8ff7982cb83a9c301 |
|
MD5 | 984ef7aae627237afa316955f54cd249 |
|
BLAKE2b-256 | ebbdd393c9573ed7ed61258b573374c574cf412e43d490211fa4878753fd5db6 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20c2f8b2257aae69d58f68af003cbd5d504cb308167eca6b54052ceae4eb935 |
|
MD5 | 1c7bbbdb0f61135c3ee47d77f130868c |
|
BLAKE2b-256 | a99e84cf2ae9112e759709dbeeb1e47908de156d84a60dd71e5e9a388ae2d717 |
Close
Hashes for rjieba-0.1.5-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61af5fcb4775554f86d0ebb67892c710a10f776f0f22bf389a6d9404299e7276 |
|
MD5 | 7e9f84e54a46463b4629acfa67ea681c |
|
BLAKE2b-256 | 0e186f785088ac9b260dde0e2f28a89b4d912d582a8991d42eb0b81a5156ca32 |