Skip to main content

Tensorflow Operation Wrapper of cppjieba (Chinese Word Segamentation)

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Built Distributions

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page