Need help with pynlpir?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

493 Stars 129 Forks MIT License 286 Commits 26 Opened issues


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

Services available


Need anything else?

Contributors list



|Build Status| |PyPI|

PyNLPIR is a Python wrapper around the

NLPIR/ICTCLAS Chinese segmentation software 
  • Documentation:
  • GitHub:
  • Support:
  • Free software:
    MIT license 


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

.. code:: python

import pynlpir

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')]


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

Getting Started

  • Install PyNLPIR 
    • pip install pynlpir
      to install PyNLPIR
    • pynlpir update
      to download the latest license
  • Read

    PyNLPIR's tutorial 
  • Learn from the

    API documentation 
  • Contribute 
    _ documentation, code, or feedback

.. |Build Status| image:: :target:

.. |PyPI| image:: :target: :alt: Latest Version

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.