Skip to main content

Jieba Op for Tensorflow

Intro

This is a tensorflow wrapper for the cpp version of the famous Chinese word segmentation tool, cppjieba.

I made some changes from the original cppjieba. This is my fork of cppjieba.

Most code of this repo are from Didi's deep learning language platform: Delta

Install

pip install tf-jieba

Usage

  1. Clone the cppjieba repository for resource files like model and dict files.
git clone https://github.com/applenob/cppjieba.git
  1. Download or copy the test python script custom_test.py to the same project. You should have cppjieba and custom_test.py under your test directory now.
python3 custom_test.py

Demo output:

Support Platform

  • python == 3.6
  • tensorflow >= 1.14.0
  • OS: MacOS / Linux

Please refer to my Chinese blog post for more detail.

Release files for tf-jieba 0.3

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

Built distributions (wheels)

Table of built distributions (wheels) for tf-jieba 0.3
File Interpreter ABI Platform
tf_jieba-0.3-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
tf_jieba-0.3-cp36-cp36m-macosx_10_7_x86_64.whl CPython 3.6 CPython 3.6 pymalloc macOS 10.7+ x86-64 Details

Total release size: 9.5 MB

Release files / tf_jieba-0.3-cp36-cp36m-manylinux1_x86_64.whl

Download URL tf_jieba-0.3-cp36-cp36m-manylinux1_x86_64.whl
Size 5.2 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
181bcc2ded08c15cf3a07d668b70e3607ad44587fd8a0e063f3fcfa13be3dcc2
BLAKE2b-256 checksum
How to use checksums
82f7f62ad9eb9bb8647684accd27b0a1c87368deb1dac1344717684968f3715e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.4.3

Release files / tf_jieba-0.3-cp36-cp36m-macosx_10_7_x86_64.whl

Download URL tf_jieba-0.3-cp36-cp36m-macosx_10_7_x86_64.whl
Size 4.3 MB
Tags CPython 3.6 CPython 3.6 pymalloc macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
a36e9c218448270cbfe19d30794482b4083c7b7c2d4151de0178da74d4148c7a
BLAKE2b-256 checksum
How to use checksums
9a0789257efa14d1fd1da0c352ef7438d05cac4ac741fc26fc9fc5628c1c16fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 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