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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6+ Windows x86-64

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

Uploaded CPython 3.6+ Windows x86

rjieba-0.1.10-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.10-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.10-cp36-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (4.0 MB view details)

Uploaded CPython 3.6+ manylinux: glibc 2.17+ ppc64

rjieba-0.1.10-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.10-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.10-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.7 MB view details)

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

rjieba-0.1.10-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.10-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.10-cp36-abi3-macosx_10_7_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.6+ macOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for rjieba-0.1.10.tar.gz
Algorithm Hash digest
SHA256 92f12d6d8cafc2559fde61f059b631d5c62fff7ebb293cddbb2c51fe7bd61480
MD5 282e3ceb3878dca0ee01968c8c493516
BLAKE2b-256 f865652eaa90b4061759e7c5dfa12d1f4ee3d53638585d48dde3e19d214bd2e3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cd4442075e8b9fdab79b5b3945c3a569f8556386a4f179586ce0bb464cf39120
MD5 b5fcd5498eb01205592015592992e589
BLAKE2b-256 c47aaab67944292dd276e33c3a773b3a5a4cc8144b58db9a56a6cd956970f280

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-win32.whl
Algorithm Hash digest
SHA256 bff7cd8e4efae7c3d2e3ac1eba1efc95acbe6f2f32a67ff3a19bbf2c7e67912e
MD5 87f5264fe54610fa70143195f2661aea
BLAKE2b-256 b11dd01a5da7516a653acb53424ff44b7d5b1e98dcd3325b1e2c99d7252c0c63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4f6784db9cf52e19e582d9025bf9df74a373c50f700bd049bbde5d250e6614f6
MD5 ef829836a613f09390b293fd4d4b64c8
BLAKE2b-256 f2b48ba30c4d39c109c94c7e91463127734dbdcdd0909c24fce5de8474b47eeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 b47e32ccf3ba59217f76200b42c0e0836072a3b644ed86e986c58e2b1c09ab1e
MD5 8e0e0a134004ddc5c362c543f5213ebc
BLAKE2b-256 c3b4e907d8abd472bde9f169b5d0351a21a14cd854baeb328e7b6ff06dc0f0ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 723e04b6427b23f534a4e383a9d4790e56eb30ce2273041cce91f6e49f4e006d
MD5 25684a10213dd81e23b1b007e530510d
BLAKE2b-256 8a38bd1c209dd097c1f81da0cf7a530d1d7cda5d21e1b4bc64a9493510b30b93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f39617d0e295e299144bb28fd5460ffb06b16554d9519219241ed5e1b101cfe3
MD5 4d0826e833db30d29e566fed791ad16b
BLAKE2b-256 89529f03a119deed0cafc6be08f76c64edae9adafe337d1390433d9792847f5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2ed189c39770fa7b4b26ab0171aae9d4d51dbb8f40687a84e5a8698574b9ba5d
MD5 360728b82a58d4de56ae3c1905f8b6d4
BLAKE2b-256 bebfcc6dbce38324bc774ba03d530f0f5913cd9c8bf49d53e39748de462bc121

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6bdab7f5e45395ffc047f4ed486b16211a201c74aa4b2fd54e4d2219e33c41a2
MD5 676b74320464c4e2deb35ea59ed40045
BLAKE2b-256 c47d4fdafef062062db940d5ac1394699d935863f26547977525228021eb2ef9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 8ea5ecaf81179717de42333bda19b38e0fe157111d0edaec8f207801999d5709
MD5 2f84339f962c98e6c419619d82663337
BLAKE2b-256 11d5afec5f7c1438b2f5d6aae2839b1115f0f981f431a80ea582661ca4f8559d

See more details on using hashes here.

File details

Details for the file rjieba-0.1.10-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.10-cp36-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cb45c0172f42efd2980d92e966197bfc1fa2ee6601b387e2955bcf6fb0aac5df
MD5 bcc1991cfb38aa9dca42e6a503fc457d
BLAKE2b-256 395093d5ca5f312bc959e8fff39c23dc2b208699c44aa6e89d769d6cb3fc92dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.10-cp36-abi3-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.6+, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for rjieba-0.1.10-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 633970072eb8fa2994a6cff3306a6f46e5fceb4807a60f7b54efbd2a87df7a0f
MD5 1630dddc63bd4b0a30b4ecd07a36abd9
BLAKE2b-256 8e86600dc551c372c3acfbe339f44a70cd0041a9b585a70892d1a88f7fafb6d2

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