Skip to main content

jieba-rs Python binding

Project description

rjieba-py

CI PyPI

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


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 details)

Uploaded Source

Built Distributions

rjieba-0.1.6-cp36-abi3-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.6+ Windows x86-64

rjieba-0.1.6-cp36-abi3-win32.whl (2.7 MB view details)

Uploaded CPython 3.6+ Windows x86

rjieba-0.1.6-cp36-abi3-manylinux2014_armv7l.whl (3.6 MB view details)

Uploaded CPython 3.6+

rjieba-0.1.6-cp36-abi3-manylinux2014_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.6+

rjieba-0.1.6-cp36-abi3-manylinux2010_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.12+ x86-64

rjieba-0.1.6-cp36-abi3-manylinux2010_i686.whl (3.7 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.12+ i686

rjieba-0.1.6-cp36-abi3-macosx_10_9_universal2.whl (5.7 MB view details)

Uploaded CPython 3.6+ macOS 10.9+ universal2 (ARM64, x86-64)

rjieba-0.1.6-cp36-abi3-macosx_10_7_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.6+ macOS 10.7+ x86-64

File details

Details for the file rjieba-0.1.6.tar.gz.

File metadata

  • Download URL: rjieba-0.1.6.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

Hashes for rjieba-0.1.6.tar.gz
Algorithm Hash digest
SHA256 1939f2d62b0f587a2816886165522cc4cba125bd43b5d8ed3f2eefbf7f907e93
MD5 abbf3e3c2bbb788255395d045ac3bcab
BLAKE2b-256 b4657b50ed66a7c15ee14ac45f1dffd6bf680ac65319a5f32c53f7c0bdeaf8f2

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-win_amd64.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b7f32fb668398952a8d18b61e9002146702f734862bbdde5b4956113c57d9b25
MD5 a815b20c98aed33b42e3f78efc7c5c54
BLAKE2b-256 c5da62865471875c509c186d29472c4b031a0b44d9b68a07b6bd8a4125c71475

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-win32.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-win32.whl
Algorithm Hash digest
SHA256 29f51b59679b1fb8dfdad37ff58e2f82eaaa5ce9e3897ec07cac87f369e74514
MD5 ac81b6d99c8cc824dcbf32016c4ea64c
BLAKE2b-256 291a37694ac3c57f6434a53d224a7246eeb205a9e91b3cba53b229aff7d2dd8e

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-manylinux2014_armv7l.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 77a6089b2de14cfc5a63b8b0f0b1159760604eea5816fc8b0eec65f05fcb665a
MD5 619bb7a9378feb4a3e9bc4f6a8e8f514
BLAKE2b-256 424035594cf46660d075675d1a17638728220cb0bf08be310133a2521a0bf083

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-manylinux2014_aarch64.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 909ce4b8d1c84f594129005cf1f2c132fe1a755847a307d70bb1af199635888a
MD5 200280207a607113a2dca6b7ab22b8e7
BLAKE2b-256 0b2dba7f584d3042d27e5a57363bc86366cbc84a028851ad9e4cd79b3ae042b5

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-manylinux2010_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 dbb86c7ce09e39272827029e86a3c5783d3b5d24f0c44eb7a32ab2a8347408b1
MD5 14b1c69d3ba4b5302d8baac69fd7fad0
BLAKE2b-256 5bea29d071537b9c6ba2ee3f1ac980830accf0647a42509fc709b795a6ca6ef9

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-manylinux2010_i686.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-manylinux2010_i686.whl
Algorithm Hash digest
SHA256 f1a64b000e05befc739d4f9db736beceabe31aeeb4e5ed47328e07fb2be36d46
MD5 4332312c034d13b78bfb2aaaf0a9908d
BLAKE2b-256 ff5aeaf82ad34e506a9618d33559ac4ad8fff8859771a08e09426c40551e5519

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-macosx_10_9_universal2.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6c0bfa771b58693015584e20123c6216d808082f86630906883aca8dc4127074
MD5 34d103bd8196c00c5481ae40e381caf9
BLAKE2b-256 9628e4dea27db9d08b7330b436d33401c4d536c93a5048501e9168a2dc81da59

See more details on using hashes here.

File details

Details for the file rjieba-0.1.6-cp36-abi3-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.6-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

Hashes for rjieba-0.1.6-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 52fcedbfe2c78efba7a9c916f66ce992467f1dca4e7cba6729d1055fb38dd8be
MD5 d15dc451d9380817db9eac9ece34f430
BLAKE2b-256 d9a4232dc2df069a2783789f3febab319feef43377444f535758daaa9b7548cb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page