Skip to main content

NLPIR-python A python wrapper and toolkit for NLPIR

Project description

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
DocCompare
DocExtractor
DocParser
iEncoder
HTMLParser
KeyScanner
RedupRemover
SpellChecker
SplitSentence
TextSimilarity
Word2vec

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nlpir_python-0.9.14b4-py3-none-win_amd64.whl (43.4 MB view details)

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.14b4-py3-none-macosx_11_0_x86_64.whl (55.0 MB view details)

Uploaded Python 3 macOS 11.0+ x86-64

nlpir_python-0.9.14b4-py3-none-macosx_10_9_x86_64.whl (55.0 MB view details)

Uploaded Python 3 macOS 10.9+ x86-64

File details

Details for the file nlpir_python-0.9.14b4-py3-none-win_amd64.whl.

File metadata

  • Download URL: nlpir_python-0.9.14b4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 43.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for nlpir_python-0.9.14b4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1956db650426ef94b3ec0c98c8f8d682e3bc127cf5e70fc4073000b801e74940
MD5 aa72680f3d0020dd6c014a6d7381e6a6
BLAKE2b-256 62beede9c732b2498c1a669dd60ea7f5d3249f2ee0d0df998dcf84a964b8b976

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.14b4-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.14b4-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 64.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for nlpir_python-0.9.14b4-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f94a26a1756f180b2ede47987676b07cf943888c250db283f72c28347b550fe2
MD5 5c60c96c449cf3543f581ebc65bc673e
BLAKE2b-256 3ca4e0142e349187c4dcf782308cd7b7791a2f226490780b6ca96912d8dd2c4c

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.14b4-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: nlpir_python-0.9.14b4-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 65.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for nlpir_python-0.9.14b4-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 72eb358483d4206bc12c4dd8cb4d30a261371e511e68446d972188461b3ca20f
MD5 ee5073915d512f855ee5e9069e824fd4
BLAKE2b-256 7baedd95528a0068565dcc19e02e0ea38e36eb22c5b7a823d9afb4469f717c6d

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.14b4-py3-none-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.14b4-py3-none-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 55.0 MB
  • Tags: Python 3, macOS 11.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for nlpir_python-0.9.14b4-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 708f0db82a1677088d19b887ab6cd9575a0d9a43e8581477af30428c8cf2833d
MD5 d98be520b5497f2106809555d006b345
BLAKE2b-256 9ce0e988be042e1f085750efec520e631f9b1a5a6eb33e4509d0646318821041

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.14b4-py3-none-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.14b4-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 55.0 MB
  • Tags: Python 3, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for nlpir_python-0.9.14b4-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9f77383ab936e85e206896543f80e3c6cd904a56fc13b402017a131d5ff01805
MD5 5c41da075f450bae90dc198ecf19c2c6
BLAKE2b-256 e4f00d48439f8bb56014207b8f7103944158392963d96df96c5cbbe6b67b2088

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