pyn

PyNLPIR

A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

490

Maintenance

Last Commit

2yrs ago

Contributors

5

Package

Dependencies

1

License

MIT

Categories

Readme

=======

PyNLPIR

|Build Status| |PyPI|

PyNLPIR is a Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software <http://www.nlpir.org/wordpress/>_.

About

Easily segment text using NLPIR, one of the most widely-regarded Chinese text analyzers:

.. code:: python

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
  • Includes a copy of NLPIR
  • Runs on Python 2.7 and 3
  • Supports macOS, Linux, and Windows

Getting Started

  • Install PyNLPIR <http://pynlpir.readthedocs.org/en/latest/installation.html>_

    • pip install pynlpir to install PyNLPIR
    • pynlpir update to download the latest license
  • Read PyNLPIR's tutorial <http://pynlpir.readthedocs.org/en/latest/tutorial.html>_

  • Learn from the API documentation <http://pynlpir.readthedocs.org/en/latest/api.html>_

  • Contribute <http://pynlpir.readthedocs.org/en/latest/contributing.html>_ documentation, code, or feedback

.. |Build Status| image:: https://travis-ci.org/tsroten/pynlpir.png?branch=master :target: https://travis-ci.org/tsroten/pynlpir

.. |PyPI| image:: https://img.shields.io/pypi/v/pynlpir.svg :target: https://pypi.python.org/pypi/pynlpir/ :alt: Latest Version

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100