Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsroten/pynlpir
A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
https://github.com/tsroten/pynlpir
Last synced: 3 days ago
JSON representation
A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
- Host: GitHub
- URL: https://github.com/tsroten/pynlpir
- Owner: tsroten
- License: mit
- Created: 2014-04-01T22:55:19.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T12:21:41.000Z (over 1 year ago)
- Last Synced: 2024-11-06T18:44:15.564Z (7 days ago)
- Language: Python
- Homepage:
- Size: 29.3 MB
- Stars: 568
- Watchers: 33
- Forks: 135
- Open Issues: 29
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
=======
PyNLPIR
=======.. image:: https://badge.fury.io/py/pynlpir.svg
:target: https://pypi.org/project/pynlpir.. image:: https://github.com/tsroten/pynlpir/actions/workflows/ci.yml/badge.svg
:target: https://github.com/tsroten/pynlpir/actions/workflows/ci.ymlPyNLPIR is a Python wrapper around the
`NLPIR/ICTCLAS Chinese segmentation software `_.* Documentation: https://tsroten.github.io/pynlpir/
* GitHub: https://github.com/tsroten/pynlpir
* Support: https://github.com/tsroten/pynlpir/issues
* Free software: `MIT license `_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
* Supports macOS (Intel), Linux, and WindowsGetting 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