Skip to main content

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.

Metadata

Release files for rjieba 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rjieba 0.1.3
File Size Uploaded
rjieba-0.1.3.tar.gz 4.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for rjieba 0.1.3
File
rjieba-0.1.3-cp36-abi3-win_amd64.whl CPython 3.6 abi3 Windows x86-64 Details
rjieba-0.1.3-cp36-abi3-manylinux2010_x86_64.whl CPython 3.6 abi3 Linux glibc 2.12+ x86-64 Details
rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl CPython 3.6 abi3 macOS 11.0+ ARM64 Details
rjieba-0.1.3-cp36-abi3-macosx_10_9_universal2.whl CPython 3.6 abi3 macOS 10.9+ universal2 (ARM64, x86-64) Details
rjieba-0.1.3-cp36-abi3-macosx_10_7_x86_64.whl CPython 3.6 abi3 macOS 10.7+ x86-64 Details

Total release size: 19.3 MB

Release files / rjieba-0.1.3.tar.gz

Download URL rjieba-0.1.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
205f2770e80264d17258525ce63186324d2aa8e6d751a1f643e3b1a1aff1ddc7
BLAKE2b-256 checksum
How to use checksums
637ea91cf9d3e892dda3be0e0b7cb6358aaeaf3342fcf2d3c468c9dbea66d645
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / rjieba-0.1.3-cp36-abi3-win_amd64.whl

Download URL rjieba-0.1.3-cp36-abi3-win_amd64.whl
Size 2.7 MB
Tags CPython 3.6 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
97b976cfd7a160c084345605643da35e1eddfcff797ee055324a01a6f3aa99a8
BLAKE2b-256 checksum
How to use checksums
34a7583abeb7c7b5da27d5188f849bc10f1d832987885a09671c3b6672794812
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / rjieba-0.1.3-cp36-abi3-manylinux2010_x86_64.whl

Download URL rjieba-0.1.3-cp36-abi3-manylinux2010_x86_64.whl
Size 3.7 MB
Tags CPython 3.6 Linux glibc 2.12+ x86-64 abi3
SHA-256 checksum
How to use checksums
203d60bb528906fd7bf8957c2aa9acf614170e3a0568c4af22887ae4f40755a1
BLAKE2b-256 checksum
How to use checksums
274e1ae906fb4ec93403f7e81f5a6abb89fc1ca76830b7c986201895fdf58a66
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl

Download URL rjieba-0.1.3-cp36-abi3-macosx_11_0_arm64.whl
Size 4.3 MB
Tags CPython 3.6 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
705e571b238f340c170f1adc4993a069388345b7c82cd41010ac195783f8cfbc
BLAKE2b-256 checksum
How to use checksums
6c5bb56a4d7ff1a2efd8a4b947b081c43db196feb285bb594c73e7830793add7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / rjieba-0.1.3-cp36-abi3-macosx_10_9_universal2.whl

Download URL rjieba-0.1.3-cp36-abi3-macosx_10_9_universal2.whl
Size 5.7 MB
Tags CPython 3.6 abi3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
99820301eb33d6608289a0d3392ef2caddf9be8f5a934f7ce4666b6b506dfc2c
BLAKE2b-256 checksum
How to use checksums
bc98b83f3484e437d6e9a9903026cba7b38223f201bcec34b9e38dd875adcb57
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / rjieba-0.1.3-cp36-abi3-macosx_10_7_x86_64.whl

Download URL rjieba-0.1.3-cp36-abi3-macosx_10_7_x86_64.whl
Size 2.8 MB
Tags CPython 3.6 abi3 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
fffdc04d141cb73ef19ea0bfe1787049823ea7239ea5ad123eab4a6461dac421
BLAKE2b-256 checksum
How to use checksums
6e69d3a6a17e088c8a024ea8766226d6719b9de9aa17b4e50d3aba51a109f1d1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

0.2.1

29 release files

0.1.9

12 release files

0.1.7

15 release files

0.1.6

9 release files

0.1.5

9 release files

0.1.4

6 release files

This release

0.1.3 This release

6 release files

0.1.2

16 release files

0.1.1

16 release files

0.1.0

13 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page