Skip to main content

An Embedded CKIP Rasa NLU Components

Project description

rukip

An Embedded CKIP Rasa NLU Components

Introduction

This open-source library implements Rasa custom components.

It offerstokenizer powered by ckiptagger as condadate in RasaNLU pipeline.

Installation

This library is built on python >= 3.6

pip install rukip

Usage

Download model files

The model files are available on several mirror sites.

You can download and extract to the desired path by the following steps:

  1. Downloads to ./data.zip
  2. Extracts to ./data/

Add CKIPTokenizer component into rasa nlu pipeline and configure model_path as ./data.

The following is the example Rasa NLU config file

language: "zh"
pipeline:
  - name: "rukip.tokenizer.CTBCTokenizer"
    model_path: "./data"
    recommend_dict_path: ""
    cooerce_dict_path: ""
  - name: "CountVectorsFeaturizer"
  - name: "EmbeddingIntentClassifier"

Components

CKIPTokenizer

This component has one required field (model_path) to be configured and offers two optional fields for user to assign dictionaries.

  • recommend_dict_path is the file containing list of user-defined recommended-word
  • cooerce_dict_path is the file containing a list of must-word.

The following is the example of user-defined dictionary. Each line shows one pair of word and weight.

土地公 1
土地婆 1
公有 2
來亂的 1
緯來體育台 1

Development

$> git clone git@github.com:circlelychen/rukip.git
$> pip install -r requirements-to-freeze.dev.txt
$> make test

License

licensed under the GNU General Public License v3.0

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

rukip-0.0.2.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

rukip-0.0.2-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

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