Skip to main content

NLPIR-python A python wrapper and toolkit for NLPIR

nlpir-python 是一个 NLPIR 的python调用包

nlpir-python is a python wrapper for NLPIR modules.

Documentation Status PyPI version Test

About

本模块提供两种调用方式:

This package includes two level of method:

1. Native call from Dynamic Link Library(DLL) 原生的直接调用DLL的调用方式

These methods are native method directory from DLL, you can easily use them if you are familiar with the NLPIR modules.

原生方法是直接调用的NLPIR中的api,并进行了部分简化处理,和python化.

    from nlpir.native import ICTCLAS
    test_str = "法国启蒙思想家孟德斯鸠曾说过:“一切有权力的人都容易滥用" \
               "权力,这是一条千古不变的经验。有权力的人直到把权力用到" \
               "极限方可休止。”另一法国启蒙思想家卢梭从社会契约论的观点" \
               "出发,认为国家权力是公民让渡其全部“自然权利”而获得的," \
               "他在其名著《社会契约论》中写道:“任何国家权力无不是以民" \
               "众的权力(权利)让渡与公众认可作为前提的”。"
    ictclas = ICTCLAS()
    ictclas.paragraph_process(test_str, 0)
2. High-level pythonic method 整合后的更加Python的调用方式

However, the native methods are not very friendly to the beginners. These methods provide a wrapper and tools for the native call, make it easier to use.

然而,对于一般用户来说,原生api功能强大但是却不是很友好.这里nlpir-python对原生api就行包装, 并提供了一些工具方法,使其更利于使用.

    from nlpir import ictclas, tools
    tools.update_license()
    test_str = "法国启蒙思想家孟德斯鸠曾说过:“一切有权力的人都容易滥用" \
               "权力,这是一条千古不变的经验。有权力的人直到把权力用到" \
               "极限方可休止。”另一法国启蒙思想家卢梭从社会契约论的观点" \
               "出发,认为国家权力是公民让渡其全部“自然权利”而获得的," \
               "他在其名著《社会契约论》中写道:“任何国家权力无不是以民" \
               "众的权力(权利)让渡与公众认可作为前提的”。"

    for word, pos in ictclas.segment(test_str, pos_tagged=True):
        print(word, pos)

NOTE: This module only support python3.6+

NOTE: This repo use the git-lfs, please install lfs when pull this repo

Supported Table

Native Native Doc Native Test High-Level High-Level Doc High-Level Test Tutorial
ICTCLAS ✔ ✔ ✔ ✔ ✔ ✔ ✔
NewWordFinder ✔ ✔ ✔ ✔ ✔ ✔
KeyExtract ✔ ✔ ✔ ✔ ✔ ✔
Summary ✔ ✔ ✔ ✔ ✔ ✔
SentimentNew ✔ ✔ ✍
SentimentAnalysis ✔ ✔ ✍ ✔ ✔
Classify ✔ ✔ ✍
DeepClassify ✔ ✔ ✍
Cluster ✔ ✔ ✔ ✔
EyeChecker ✔ ✔ ✔ ✔ ✔ ✔
DocCompare
DocExtractor ✔ ✔ ✔ ✔
DocParser
iEncoder
HTMLParser
KeyScanner ✔ ✔ ✔ ✔
RedupRemover
SpellChecker
SplitSentence
TextSimilarity ✔ ✍ ✔ ✔
Word2vec

Metadata

Release files for nlpir-python 0.9.15.1

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

Built distributions (wheels)

Table of built distributions (wheels) for nlpir-python 0.9.15.1
File
nlpir_python-0.9.15.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
nlpir_python-0.9.15.1-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
nlpir_python-0.9.15.1-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
nlpir_python-0.9.15.1-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details
nlpir_python-0.9.15.1-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details

Total release size: 301.5 MB

Release files / nlpir_python-0.9.15.1-py3-none-win_amd64.whl

Download URL nlpir_python-0.9.15.1-py3-none-win_amd64.whl
Size 61.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
181f032426967ec37a7679876cb206a4bcd236d6537f4112e011bc9c54d23929
BLAKE2b-256 checksum
How to use checksums
3a4dec8a5e13eb854bc7bf72586e152c09a36980cc490d9ba5b607273383e952
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

Release files / nlpir_python-0.9.15.1-py3-none-manylinux2014_x86_64.whl

Download URL nlpir_python-0.9.15.1-py3-none-manylinux2014_x86_64.whl
Size 64.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
91126730a2f85d4aff1838d642f28cf310cf52c3cd2748178715dd059ec23223
BLAKE2b-256 checksum
How to use checksums
c65798c380647464d16fb53dae770e2265a091b8f2c685cbb3c33251c7c0f3c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

Release files / nlpir_python-0.9.15.1-py3-none-manylinux2014_aarch64.whl

Download URL nlpir_python-0.9.15.1-py3-none-manylinux2014_aarch64.whl
Size 65.6 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
694ff2b38f9a6b3a30b8dfd58e176f6fa2ede738e1898648b0a8ce49408423b7
BLAKE2b-256 checksum
How to use checksums
310eaa901fada7f6abaaba4b587bd4f268dc4484e783c26e1b0fca112afc6117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

Release files / nlpir_python-0.9.15.1-py3-none-macosx_11_0_x86_64.whl

Download URL nlpir_python-0.9.15.1-py3-none-macosx_11_0_x86_64.whl
Size 55.0 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
c8313998c10315a0745f63cdbed306f61b8676f0b3fc0bfa1508366b9ae9cc8b
BLAKE2b-256 checksum
How to use checksums
dc72b4664b99c0267c9a109442029c682e7e77b1a72ffb719e68c609a56a7034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15

Release files / nlpir_python-0.9.15.1-py3-none-macosx_10_9_x86_64.whl

Download URL nlpir_python-0.9.15.1-py3-none-macosx_10_9_x86_64.whl
Size 55.0 MB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
ba72b4e9006f7d00583ef324a374da6a1dd1016b63f79347f7f14bdc1ab36c0f
BLAKE2b-256 checksum
How to use checksums
4eaf2565186341275fd76eb7470205fecd49fee19e2561e29c671aa87eacdadb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
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