ckiplab / ckip-classic

CKIP Classic Word Segmentation and Sentence Parsing Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

A Linux Python wrapper for CKIP classic tools — CKIP Word Segmentation and CKIP Parser.

Attention

Please use CKIPNLP for structured data types and pipeline drivers.

Attention

For Python 2 users, please use PyCkip 0.4.2 instead.

Git

https://github.com/ckiplab/ckip-classic

GitHub Version GitHub Release GitHub Issues

PyPI

https://pypi.org/project/ckip-classic

PyPI Version PyPI License PyPI Downloads PyPI Python PyPI Implementation PyPI Status

Documentation

https://ckip-classic.readthedocs.io/

ReadTheDocs Home

Contributers

Requirements

Note that one should have CKIPWS/CKIPParser for this project:

Installation

Attention

  • Offline version: CKIPWS (Academic/Commercial License) and CKIPParser (Commercial License).
  • Online version: CKIPParser (Academic License).

Offline Version

Download CKIPWS and/or CKIPParser from above links. Denote <ckipws-linux-root> as the folder containing CKIPWS, and <ckipparser-linux-root> as the folder containing CKIPParser.

Ignore ws/parser options if one doesn't have CKIPWS/CKIPParser.

Attention

Please use absolute paths.

Online Version

Register an account at http://parser.iis.sinica.edu.tw/v1/reg.exe

Installation Options

Option Detail Default Value
--[no-]ws Enable/disable CKIPWS. False
--[no-]parser Enable/disable CKIPParser. False
--ws-dir=<ws-dir> CKIPWS root directory.
--ws-lib-dir=<ws-lib-dir> CKIPWS libraries directory <ws-dir>/lib
--ws-share-dir=<ws-share-dir> CKIPWS share directory <ws-dir>
--parser-dir=<parser-dir> CKIPParser root directory.
--parser-lib-dir=<parser-lib-dir> CKIPParser libraries directory <parser-dir>/lib
--parser-share-dir=<parser-share-dir> CKIPParser share directory <parser-dir>
--data2-dir=<data2-dir> "Data2" directory <ws-share-dir>/Data2
--rule-dir=<rule-dir> "Rule" directory <parser-share-dir>/Rule
--rdb-dir=<rdb-dir> "RDB" directory <parser-share-dir>/RDB

Usage

See https://ckip-classic.readthedocs.io/ for API details.

CKIPWS

CKIP Word Segmentation offline driver.

CKIPParser

CKIP Parser offline driver.

CKIPParserClient

CKIP Parser online client.

FAQ

Danger

Due to C code implementation, both CkipWs and CkipParser can only be instance once.


Warning

CKIPParser fails if input text contains special characters such as ()+-:|. One may replace these characters by


Tip

fatal error: Python.h: No such file or directory". What should I do?

Install Python development package


Tip

The CKIPWS throws "what(): locale::facet::_S_create_c_locale name not valid". What should I do?

Install locale data.


Tip

The CKIPParser throws "ImportError: libCKIPParser.so: cannot open shared object file: No such file or directory". What should I do?

Add below command to ~/.bashrc:

License

GPL-3.0

Copyright (c) 2018-2023 CKIP Lab under the GPL-3.0 License.

About

CKIP Classic Word Segmentation and Sentence Parsing Tools

License:GNU General Public License v3.0


Languages

Language:Python 88.3%Language:Cython 9.2%Language:Makefile 2.4%Language:Shell 0.1%