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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6+ Windows x86-64

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

Uploaded CPython 3.6+ Windows x86

rjieba-0.1.8-cp36-abi3-manylinux_2_24_ppc64le.whl (3.9 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.24+ ppc64le

rjieba-0.1.8-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.8-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.8-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.8-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.8-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.8-cp36-abi3-manylinux1_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.6+

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

Uploaded CPython 3.6+

rjieba-0.1.8-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.8-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.8.tar.gz.

File metadata

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

File hashes

Hashes for rjieba-0.1.8.tar.gz
Algorithm Hash digest
SHA256 21e2f4b7bc078842bc99521490f2f87b15de42b2a7697c76ed3c109fca130ae1
MD5 e72227de47eb112ce1dc298c6e24a1ec
BLAKE2b-256 f8c7ac935e9b2afa57bb141dc09da0c77931f0297351b48e7852c68ec718b5de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.8-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.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 32f2257473e9dfe5a387850d87ae97a717a32c063903f98c3bd8408488c4505b
MD5 141d5846c8b7d1e4a80a841754bb05a7
BLAKE2b-256 5d950291778f346083a46438709fb01cd0b9105c17b82a735c5ed5d945d7fd36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.8-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.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-win32.whl
Algorithm Hash digest
SHA256 8f782f833c24fbbe77413cb5e3841a29757052515377a8b58a184e129faaf85e
MD5 644e2ec63d316958659985d2b764a677
BLAKE2b-256 304d9da245bd2f7864cd4e02d75883114c6126b4d2c99692e1db4ccc64e1f6df

See more details on using hashes here.

File details

Details for the file rjieba-0.1.8-cp36-abi3-manylinux_2_24_ppc64le.whl.

File metadata

  • Download URL: rjieba-0.1.8-cp36-abi3-manylinux_2_24_ppc64le.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.6+, manylinux: glibc 2.24+ ppc64le
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux_2_24_ppc64le.whl
Algorithm Hash digest
SHA256 4e1e052a0e67e9261441158740256659c0f25adfe8f712c21190e5342088b972
MD5 8f4c8fd8d409a2b49e4e10358889110c
BLAKE2b-256 81f0b184eb36db839db1533d7d5a2d4bf573ef26c4043c943dc72476aeb8bd71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 c761f087b5bf8c7ebea2fa1fc6c557f5e9d2c0b419658ba91a668d4e7646795b
MD5 3b0dd5bdd222bd70811a78188f3ef0d2
BLAKE2b-256 38621c15e44861fae28dc882ebe8f96e4f4f34df09b8254dd296be1834448d02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 3d23b31c6db66b5d1c7fca70d2a6315f4a4e8e6dd76236fe2cc239243389c8ea
MD5 0109d492cd6160f618ced277f7d302ce
BLAKE2b-256 104b8b25d3b112164b5602a5fc91dc8ce12cbb496d2a65b2b74fb0458bf7e695

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 9cbe555b6cb89c6cf843401a8c1a1dd7ab7a17caca3310755ada3403d6db75a9
MD5 6f62d1bedb20190e22bf3baea5cfed12
BLAKE2b-256 3efdf1e89a3c41b5aecf543af8fba5078662c28be588a82956557d196db6bfb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 494bcbb124cb4fc55f61b3e83680e81b724e1fde72b5c7d2f5b6e9bf3c2e746b
MD5 250ae553a324b5ae23d475d1db8e3af2
BLAKE2b-256 8d5412ab52d22edc6d9ef9c501cec390fc3f1f9108d185651463756c36dc8216

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5b839f73836ba783cadd4799e67846525e85a98a79ed7492fcc5c536b7521293
MD5 c64e5287664c0f6ec5a49db16ce095d1
BLAKE2b-256 e90e401051793057c4676728dfc53cd4221c0c37997bc8352a7225488777cf94

See more details on using hashes here.

File details

Details for the file rjieba-0.1.8-cp36-abi3-manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.8-cp36-abi3-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.6+
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 51eb97d63ca44ba32b16b114c3f1855106b696b749fa6a40ba2f2549423fa8ac
MD5 f11f19295147b494e14dbfdf2010506f
BLAKE2b-256 fec3c33286f848245a6d0cc0a6df6dee68993202f87b743767a7469484607105

See more details on using hashes here.

File details

Details for the file rjieba-0.1.8-cp36-abi3-manylinux1_i686.whl.

File metadata

  • Download URL: rjieba-0.1.8-cp36-abi3-manylinux1_i686.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.6+
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-manylinux1_i686.whl
Algorithm Hash digest
SHA256 1aff475d2b72000e9f13e7e016747279df7331acc418cda1bf210fdaa2748ca8
MD5 84df57dc871b20d5a62c345078801570
BLAKE2b-256 4d23b3ab6072c162e4e927f50bd645e9bef480c465c021d2e774ddd1e99a3ac1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cad2ceec4faa8063a7b42596bc3108ebd4b061a46580d6ea96e9be43f2c2548a
MD5 47a22db441eeec4d04cce2c6f31fdc9c
BLAKE2b-256 d88fd374eeff27b324187710a7703c46af30fc6f995ef3ccc5f5394aeae1b1c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.8-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.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.8-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 0f619e0f20d7679ea8c78143a98f187c3dbb02c32db3144d1c6b6d99f5a422d0
MD5 42a689e52e5d9ac2aea1fd2bca4a8b9a
BLAKE2b-256 c67f4d4f44e4bb110491e8ea847209bba96808a1eec5fdd7267e6de3fd53bb7f

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