Skip to main content

PyNLPIR

https://badge.fury.io/py/pynlpir.svg https://github.com/tsroten/pynlpir/actions/workflows/ci.yml/badge.svg

PyNLPIR is a Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.

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

  • Includes a copy of NLPIR

  • Supports macOS (Intel), Linux, and Windows

Getting Started

Release files for PyNLPIR 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyNLPIR 0.6.1
File Size Uploaded
pynlpir-0.6.1.tar.gz 13.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyNLPIR 0.6.1
File Interpreter ABI Platform
pynlpir-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.1 MB

Release files / pynlpir-0.6.1.tar.gz

Download URL pynlpir-0.6.1.tar.gz
Size 13.0 MB
Tags Source
SHA-256 checksum
How to use checksums
8cb147d8e16885b586ce1b5336afcf592ccea134027a903e16c8d9a343446c75
BLAKE2b-256 checksum
How to use checksums
9bd5eb0308891aeb05c5859afd46d52c6f67a84ac2194dc5b2ce50b0f4124065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / pynlpir-0.6.1-py3-none-any.whl

Download URL pynlpir-0.6.1-py3-none-any.whl
Size 13.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6350ec8d5bd5d105ca6d45b81beb47af1c7786111db9e4c88c5c39560bc407a9
BLAKE2b-256 checksum
How to use checksums
c00607c0d94e8328423e67d6c314b8937ddcb83afceda614557ea6b016a590e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page