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.6.tar.gz
(5.4 kB
view hashes)
Built Distributions
Close
Hashes for rjieba-0.1.6-cp36-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7f32fb668398952a8d18b61e9002146702f734862bbdde5b4956113c57d9b25 |
|
MD5 | a815b20c98aed33b42e3f78efc7c5c54 |
|
BLAKE2b-256 | c5da62865471875c509c186d29472c4b031a0b44d9b68a07b6bd8a4125c71475 |
Close
Hashes for rjieba-0.1.6-cp36-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29f51b59679b1fb8dfdad37ff58e2f82eaaa5ce9e3897ec07cac87f369e74514 |
|
MD5 | ac81b6d99c8cc824dcbf32016c4ea64c |
|
BLAKE2b-256 | 291a37694ac3c57f6434a53d224a7246eeb205a9e91b3cba53b229aff7d2dd8e |
Close
Hashes for rjieba-0.1.6-cp36-abi3-manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77a6089b2de14cfc5a63b8b0f0b1159760604eea5816fc8b0eec65f05fcb665a |
|
MD5 | 619bb7a9378feb4a3e9bc4f6a8e8f514 |
|
BLAKE2b-256 | 424035594cf46660d075675d1a17638728220cb0bf08be310133a2521a0bf083 |
Close
Hashes for rjieba-0.1.6-cp36-abi3-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 909ce4b8d1c84f594129005cf1f2c132fe1a755847a307d70bb1af199635888a |
|
MD5 | 200280207a607113a2dca6b7ab22b8e7 |
|
BLAKE2b-256 | 0b2dba7f584d3042d27e5a57363bc86366cbc84a028851ad9e4cd79b3ae042b5 |
Close
Hashes for rjieba-0.1.6-cp36-abi3-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbb86c7ce09e39272827029e86a3c5783d3b5d24f0c44eb7a32ab2a8347408b1 |
|
MD5 | 14b1c69d3ba4b5302d8baac69fd7fad0 |
|
BLAKE2b-256 | 5bea29d071537b9c6ba2ee3f1ac980830accf0647a42509fc709b795a6ca6ef9 |
Close
Hashes for rjieba-0.1.6-cp36-abi3-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a64b000e05befc739d4f9db736beceabe31aeeb4e5ed47328e07fb2be36d46 |
|
MD5 | 4332312c034d13b78bfb2aaaf0a9908d |
|
BLAKE2b-256 | ff5aeaf82ad34e506a9618d33559ac4ad8fff8859771a08e09426c40551e5519 |
Close
Hashes for rjieba-0.1.6-cp36-abi3-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c0bfa771b58693015584e20123c6216d808082f86630906883aca8dc4127074 |
|
MD5 | 34d103bd8196c00c5481ae40e381caf9 |
|
BLAKE2b-256 | 9628e4dea27db9d08b7330b436d33401c4d536c93a5048501e9168a2dc81da59 |
Close
Hashes for rjieba-0.1.6-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52fcedbfe2c78efba7a9c916f66ce992467f1dca4e7cba6729d1055fb38dd8be |
|
MD5 | d15dc451d9380817db9eac9ece34f430 |
|
BLAKE2b-256 | d9a4232dc2df069a2783789f3febab319feef43377444f535758daaa9b7548cb |