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
EyeChecker
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.15.1-py3-none-win_amd64.whl (61.8 MB view details)

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.15.1-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.15.1-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.15.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: nlpir_python-0.9.15.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 61.8 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using 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

File hashes

Hashes for nlpir_python-0.9.15.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 181f032426967ec37a7679876cb206a4bcd236d6537f4112e011bc9c54d23929
MD5 c6aacc964b243c37119d69dbf858516c
BLAKE2b-256 3a4dec8a5e13eb854bc7bf72586e152c09a36980cc490d9ba5b607273383e952

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.15.1-py3-none-manylinux2014_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.15.1-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 64.2 MB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for nlpir_python-0.9.15.1-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91126730a2f85d4aff1838d642f28cf310cf52c3cd2748178715dd059ec23223
MD5 5c3cd0ac2c26e58227e8ff5323e6d0c6
BLAKE2b-256 c65798c380647464d16fb53dae770e2265a091b8f2c685cbb3c33251c7c0f3c4

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.15.1-py3-none-manylinux2014_aarch64.whl.

File metadata

  • Download URL: nlpir_python-0.9.15.1-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 65.6 MB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for nlpir_python-0.9.15.1-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 694ff2b38f9a6b3a30b8dfd58e176f6fa2ede738e1898648b0a8ce49408423b7
MD5 4aefe69bf0b2e55d28e62e9b0989e817
BLAKE2b-256 310eaa901fada7f6abaaba4b587bd4f268dc4484e783c26e1b0fca112afc6117

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.15.1-py3-none-macosx_11_0_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.15.1-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.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

File hashes

Hashes for nlpir_python-0.9.15.1-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c8313998c10315a0745f63cdbed306f61b8676f0b3fc0bfa1508366b9ae9cc8b
MD5 505ec0c475d1f72e8c7cd3a626186497
BLAKE2b-256 dc72b4664b99c0267c9a109442029c682e7e77b1a72ffb719e68c609a56a7034

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.15.1-py3-none-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: nlpir_python-0.9.15.1-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.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

File hashes

Hashes for nlpir_python-0.9.15.1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ba72b4e9006f7d00583ef324a374da6a1dd1016b63f79347f7f14bdc1ab36c0f
MD5 bf9cfca64f7a660561845600ef335a6b
BLAKE2b-256 4eaf2565186341275fd76eb7470205fecd49fee19e2561e29c671aa87eacdadb

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