A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
Project description
PyNLPIR is a Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
Documentation: http://pynlpir.rtfd.org
Free software: MIT license
About
Easily segment text using NLPIR, one of the most widely-regarded Chinese text analyzers:
import pynlpir
pynlpir.open()
s = '欢迎科研人员、技术工程师、企事业单位与个人参与NLPIR平台的建设工作。'
pynlpir.segment(s)
[('欢迎', 'verb'), ('科研', 'noun'), ('人员', 'noun'), ('、', 'punctuation mark'), ('技术', 'noun'), ('工程师', 'noun'), ('、', 'punctuation mark'), ('企事业', 'noun'), ('单位', 'noun'), ('与', 'conjunction'), ('个人', 'noun'), ('参与', 'verb'), ('NLPIR', 'noun'), ('平台', 'noun'), ('的', 'particle'), ('建设', 'verb'), ('工作', 'verb'), ('。', 'punctuation mark')]
Features
Helper functions for common use cases
English/Chinese part of speech mapping
Support for UTF-8, GBK, and BIG5 encoded strings (and unicode of course!)
Access to NLPIR’s C functions via ctypes
No third-party dependencies (PyNLPIR includes a copy of NLPIR)
Runs on Python 2.7 and 3
Supports Linux and Windows (no OS X support until NLPIR supports it)
Getting Started
Read PyNLPIR’s tutorial
Learn from the API documentation
Contribute documentation, code, or feedback
Change Log
0.1.2 (2014-05-01)
Adds version information to __init__.py.
Adds Travis CI configuration information.
Reformats README.rst.
Adds documentation about contributing.
Fixes #2. Fixes segmenting text with whitespace.
Fixes #3. Fixes _encode()/_decode default encoding error.
0.1.1 (2014-04-07)
Fixes installation problem with package data.
0.1.0 (2014-04-07)
Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file PyNLPIR-0.1.2.tar.gz
.
File metadata
- Download URL: PyNLPIR-0.1.2.tar.gz
- Upload date:
- Size: 12.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c43d95596a4056359f4a7c62958047904d3cd2bc8d8424bb1101ec8139a2613c |
|
MD5 | 9f60ab3a371f8dab2299a5ffb563123d |
|
BLAKE2b-256 | 132329c6fa071a41ed428ebce8f2d58e5577ddfb11eadbafa8bdda8319cf549d |