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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6+ Windows x86-64

rjieba-0.1.3-cp36-abi3-manylinux2010_x86_64.whl (3.7 MB view details)

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

rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.6+ macOS 11.0+ ARM64

rjieba-0.1.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: rjieba-0.1.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.12

File hashes

Hashes for rjieba-0.1.3.tar.gz
Algorithm Hash digest
SHA256 205f2770e80264d17258525ce63186324d2aa8e6d751a1f643e3b1a1aff1ddc7
MD5 560804ff24fade0b6db3e67d08bbc19c
BLAKE2b-256 637ea91cf9d3e892dda3be0e0b7cb6358aaeaf3342fcf2d3c468c9dbea66d645

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.3-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.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.8

File hashes

Hashes for rjieba-0.1.3-cp36-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 97b976cfd7a160c084345605643da35e1eddfcff797ee055324a01a6f3aa99a8
MD5 eb83eacca5582ff90bfdca8319c81bf4
BLAKE2b-256 34a7583abeb7c7b5da27d5188f849bc10f1d832987885a09671c3b6672794812

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.3-cp36-abi3-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.6+, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.8.7

File hashes

Hashes for rjieba-0.1.3-cp36-abi3-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 203d60bb528906fd7bf8957c2aa9acf614170e3a0568c4af22887ae4f40755a1
MD5 6b1564da1954a7313ab5f91d02b509d7
BLAKE2b-256 274e1ae906fb4ec93403f7e81f5a6abb89fc1ca76830b7c986201895fdf58a66

See more details on using hashes here.

File details

Details for the file rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: CPython 3.6+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 705e571b238f340c170f1adc4993a069388345b7c82cd41010ac195783f8cfbc
MD5 8ee713115e4445fd132e90a5c41fbdab
BLAKE2b-256 6c5bb56a4d7ff1a2efd8a4b947b081c43db196feb285bb594c73e7830793add7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.3-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.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for rjieba-0.1.3-cp36-abi3-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 99820301eb33d6608289a0d3392ef2caddf9be8f5a934f7ce4666b6b506dfc2c
MD5 1b1218c862e12ee245540335494bd058
BLAKE2b-256 bc98b83f3484e437d6e9a9903026cba7b38223f201bcec34b9e38dd875adcb57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rjieba-0.1.3-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.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.12

File hashes

Hashes for rjieba-0.1.3-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 fffdc04d141cb73ef19ea0bfe1787049823ea7239ea5ad123eab4a6461dac421
MD5 fd572db9c5e973649af673819f7640e3
BLAKE2b-256 6e69d3a6a17e088c8a024ea8766226d6719b9de9aa17b4e50d3aba51a109f1d1

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