Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pynlpir-0.6.1.tar.gz (13.0 MB view details)

Uploaded Source

Built Distribution

pynlpir-0.6.1-py3-none-any.whl (13.1 MB view details)

Uploaded Python 3

File details

Details for the file pynlpir-0.6.1.tar.gz.

File metadata

  • Download URL: pynlpir-0.6.1.tar.gz
  • Upload date:
  • Size: 13.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pynlpir-0.6.1.tar.gz
Algorithm Hash digest
SHA256 8cb147d8e16885b586ce1b5336afcf592ccea134027a903e16c8d9a343446c75
MD5 b0d614b3b2723161cfa48253ca5551c4
BLAKE2b-256 9bd5eb0308891aeb05c5859afd46d52c6f67a84ac2194dc5b2ce50b0f4124065

See more details on using hashes here.

File details

Details for the file pynlpir-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: pynlpir-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for pynlpir-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6350ec8d5bd5d105ca6d45b81beb47af1c7786111db9e4c88c5c39560bc407a9
MD5 0db87b3ce2107d8b77f3861e35774b5c
BLAKE2b-256 c00607c0d94e8328423e67d6c314b8937ddcb83afceda614557ea6b016a590e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page