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

Uploaded Source

Built Distributions

rjieba-0.1.2-cp39-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

rjieba-0.1.2-cp39-cp39-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.9

rjieba-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

rjieba-0.1.2-cp38-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

rjieba-0.1.2-cp38-cp38-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.8

rjieba-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

rjieba-0.1.2-cp37-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.7 Windows x86-64

rjieba-0.1.2-cp37-cp37m-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.7m

rjieba-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

rjieba-0.1.2-cp36-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.6 Windows x86-64

rjieba-0.1.2-cp36-cp36m-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.6m

rjieba-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

rjieba-0.1.2-cp35-none-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.5 Windows x86-64

rjieba-0.1.2-cp35-cp35m-manylinux1_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.5m

rjieba-0.1.2-cp35-cp35m-macosx_10_7_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.5m macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: rjieba-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1b6ff9fd203c8beca7b70fab6aecded2c63b81d6cbe718a229aada1c3fda031f
MD5 bfe9e8f43e42a7fdda9b0a512083f6d1
BLAKE2b-256 ebb69b756e94b83cdff40b06f3fddf44fe2cde71c6b1dc26c2c66332780198b1

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp39-none-win_amd64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

File hashes

Hashes for rjieba-0.1.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 71a95df39cd5318ce6896d5bd789b28df1b22d6ce932165318022ba619345393
MD5 6f3b729f4e9a4f955d071480ba912c3a
BLAKE2b-256 ebfcf382fbd2ebfff5df8db5fc39c438cfa5b2d513e9761440410c173c06965b

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4f82a5a3253bebd38b31c6fc52f5930c20713361dd38e3830cd986fd5b500f24
MD5 bed6233b721c08106eb04e9dd1dc3732
BLAKE2b-256 3a3130e258a5c371b2c1c0543eb8513b0a0be879d6a3ae391aebe0385858f93a

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.9, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

File hashes

Hashes for rjieba-0.1.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 442af660702c345bf6a4500a8c33d91ab634137ae2831cc1e9bce223ed7865b5
MD5 e66cb3cb0b1c2b83d681232473faaea4
BLAKE2b-256 ad179e328d3400b268674ca6265853de9f885c4d0ce3512a78d4ce973af817eb

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp38-none-win_amd64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 82d081d1c0ef0b5d289ef0537ac723a2f5ea4b35c8629512371aa2d594edee80
MD5 70e097545075005e1b5cea7d3f3f9af6
BLAKE2b-256 317ca25e832a650aede49551cfa14bb57a9a12d5f7633d5b42b658f64be147ab

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c28a5ba4fbd155e856a95787da8e933e16ea2fac7e55fa6919e35285dac96da4
MD5 5f58845fe42440ca544fc364c2f0ccbb
BLAKE2b-256 0dcf0e0820ae8ba13177ef6e86714f11276adac5a006fb1c6765484d45f0ff8b

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.8, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 514998ecd5a58c41e70f2baef1008b494f7e151edaf161da740e191a9e561e37
MD5 43fb65aa4906686ba5d27b3b5205af56
BLAKE2b-256 acc5f3034088b19275f4c5b480b5ff0eac07ec39c0151a152f6ceeba5874f948

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp37-none-win_amd64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.9

File hashes

Hashes for rjieba-0.1.2-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 dc83dd826210797d686fe69bfc66959c02ef43f04df6ab2d866b390abb2191c6
MD5 0e34c3e9502e5d4d6707a8ce7a0d9568
BLAKE2b-256 d0813b18f88590d124ede0bb7554958a03e626db38985b7294d591c52b169e10

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 806768072a90551885f85ead78d05267d434f29963be209a7a755bea871dd86e
MD5 3978e020e58d3722044f2872681600c4
BLAKE2b-256 aa0955a9096c8046099b90ec2876fdfdb1861710121190513889663bb9125ff5

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.9

File hashes

Hashes for rjieba-0.1.2-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 815b5481494c66a1549290cf6d9fee84493f67defe79196506b162fc289dc863
MD5 7deda36cd516c012fdfc83e6c9d463f2
BLAKE2b-256 a38f738038f3723fd7b88d0489ca78ca60549bd0ff940265d6d0430cf8bd62c9

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp36-none-win_amd64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp36-none-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.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.8

File hashes

Hashes for rjieba-0.1.2-cp36-none-win_amd64.whl
Algorithm Hash digest
SHA256 ace08768111141e2ddf9a5fcfe7298c0434d547b6b94a5b4bf3bad53a0b249a0
MD5 e3c6429b3b26ccc5b1371da844b9266a
BLAKE2b-256 4109872ec1adaa8e7403bded63416bd2d56722bbc2d7f18866fba2184d198ad4

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 65cc6c0df7c921efa7484d01f748f5c8b2bf76625d4cf557e82b365426de2637
MD5 a831f4a961c116b647b0897e0ad628f5
BLAKE2b-256 c7a5d6bcc462ab810ef180a633fa8d7bc0f49bf9b74369e46a64f6038b5bc5df

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.12

File hashes

Hashes for rjieba-0.1.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 aa3c2cab69e0e051383974ea4d8ca213959463ad9abafe49af6c7a7f18cc9683
MD5 cba6087af5013a0b3ab89ef578a97481
BLAKE2b-256 6d6dab326a569cac9b356279a461c4a83f0e62c4d0b7cf1d6eb616e8a4536dbe

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp35-none-win_amd64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp35-none-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.5, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.5.4

File hashes

Hashes for rjieba-0.1.2-cp35-none-win_amd64.whl
Algorithm Hash digest
SHA256 4de38500aaf4a5ddf679cbe5826accebbbc5991dd5216b9dddf9293c6f412c0f
MD5 faab43de596351bc5b358880d9e0ba8c
BLAKE2b-256 a069a230f239177a71e27267bb39c64cd7179580494d6718cef928044addd4e0

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6

File hashes

Hashes for rjieba-0.1.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7596393aa0d0b5f302731ab3a4fdc0c8a2e294e46da48a880655afcdc2d1f5e9
MD5 b2a4395d4b838ab5a32db79df1d66097
BLAKE2b-256 8bf8ddae54006cfe984efb0c2175f7ff5a1b55e1d2a0b78d26fbf7581e92d4ca

See more details on using hashes here.

File details

Details for the file rjieba-0.1.2-cp35-cp35m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: rjieba-0.1.2-cp35-cp35m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.5m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.5.10

File hashes

Hashes for rjieba-0.1.2-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 c638e8d3b97e48c7ed378f2d97caf51ccc091675041267cf48aee53dbce8a703
MD5 c155f7592d58b7260b26f751855a8d45
BLAKE2b-256 79fcab0a64b77870fc16889c45a45bec8fdb5912fa2ff7c34949d32142339f60

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