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.9.tar.gz (4.9 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6+ Windows x86-64

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

Uploaded CPython 3.6+ Windows x86

rjieba-0.1.9-cp36-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (4.1 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ s390x

rjieba-0.1.9-cp36-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.9 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ppc64le

rjieba-0.1.9-cp36-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (4.1 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ppc64

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

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ARMv7l

rjieba-0.1.9-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ARM64

rjieba-0.1.9-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.8 MB view details)

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

rjieba-0.1.9-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.whl (3.6 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.5+ i686

rjieba-0.1.9-cp36-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (5.7 MB view details)

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

rjieba-0.1.9-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.9.tar.gz.

File metadata

  • Download URL: rjieba-0.1.9.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.9.tar.gz
Algorithm Hash digest
SHA256 6b17b707a4d8afe9180537672f7921e6460d010e7d43faa51667b40f8f5c4845
MD5 9902dfc077f319b3db3ef7a922730287
BLAKE2b-256 70e1ace79f542263d91892cc1bee52a8816c0db14cfb9ef7f256e316a8b7125e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.9-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.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2e091c0bbb67c5d90fa35092a0d345e900d6f8961a13de2b59f366e20a878bc0
MD5 bf640ebbe7202345b21f624ca6c96268
BLAKE2b-256 cfc82b3e295092415157fa38362e7a5b1bfe7d86745a29d32c3bfb55b3b71d2a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.9-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.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-win32.whl
Algorithm Hash digest
SHA256 5218a4e8844bcac88528860950b047e072b9652784e37e50f23e37529dd5c93d
MD5 5a191f755b75ce79b0f96dc9eedd3b65
BLAKE2b-256 61f6dffca6a750583c00ce205f9b71c372c4393dc69a0eed390bb50ebd431056

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 b95f51a74441c4f57e9a862c09dfb3518cfd8d1dfdfadd7f989ba21e24589dad
MD5 74d2d9582a15772c563b6243f984d38d
BLAKE2b-256 d5f781e94f969648ff87c934e81fdcf47f434641db82d2d8ab4cda13cb5c6701

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 86a9c90934023015f3a88626d1c1bd496246bb8ac66cd6111be0daec54a0da81
MD5 0b74b1ceaf07a77b84ab1938146b46e8
BLAKE2b-256 75616a06abdad9d9bf440350884531b0c1434d3425e328257de372709427d98f

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 d0f2c91fdfb617a926d0fe14678e632f774b75e760beec669bd20cd6777c310e
MD5 9c9e016f93f1d4b8c4bb0198ee439311
BLAKE2b-256 e155d2cd1ba3964b076c4a67363f65a065fffcaca7671dd5059aa836f6e27ddc

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f548d31413b4c603af3586ed807e9ffc16e1b416af2b5eb84a84ea0a7cb8a7b3
MD5 00b651bbba8fa6ddf0bf5d03b2ece3c2
BLAKE2b-256 2ebd843d7373bcb76962787db4c2a923b6ab9a1d1a7f8ed9e519b0dcac1a4f24

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 427087b428a8d66047b2816e472714fc75a65aae085590a80a33c0bc4e0f9b12
MD5 2e8e03bcf10b20991bc654252b0a0ded
BLAKE2b-256 4f4fc15069e15762172528d67c5cb1a2f36c8b003f1ecfba73829f9d1b72c249

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.9-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.6+, manylinux: glibc 2.5+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f0e39d326236654a41919766511ee5910a4359d0ded9bb119f940c10090f4ecf
MD5 7a85c019b2e3391b0f4c76655be55dd7
BLAKE2b-256 f6df6faaef5ce01e292414adc3e63e24df31760e3002a5e83e9bf99b22d182ef

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

  • Download URL: rjieba-0.1.9-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.6+, manylinux: glibc 2.5+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 59bc6a25b0543c95b1bec9e007dc58dce1099994fef68f35cacd26890c3417c1
MD5 e422a8e90091b8879781904ce9a89b8e
BLAKE2b-256 e1db3ee73647b273c54824bb9c0e309dcf6c9e69897351883858092abb88e223

See more details on using hashes here.

File details

Details for the file rjieba-0.1.9-cp36-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 afba6cc19458f104fa0e0058a13d7f3cf8e6c98f69287b17e3925ba3448b086c
MD5 8e940146c1d401d03196841baaa73097
BLAKE2b-256 5cc88e2d18d94c908f3c895d782b92f8e65a50703ffb59fc3526520b67936834

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.9-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.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.9-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 d82d11d2e2067725e0bb4c06e9caf50f7ca10fbe475f9c28505f99e095547a1b
MD5 162d161c00002f04bfae1a84746100c0
BLAKE2b-256 8030b85d52bd6f1e57d20bdb08250ff5bce3cf990343343277a88ddf008cb0a5

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