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.12-py3-none-win_amd64.whl (40.3 MB view details)

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.12-py3-none-macosx_11_0_x86_64.whl (46.9 MB view details)

Uploaded Python 3 macOS 11.0+ x86-64

nlpir_python-0.9.12-py3-none-macosx_10_9_x86_64.whl (46.9 MB view details)

Uploaded Python 3 macOS 10.9+ x86-64

nlpir_python-0.9.12-py3-none-any.whl (94.7 MB view details)

Uploaded Python 3

File details

Details for the file nlpir_python-0.9.12-py3-none-win_amd64.whl.

File metadata

  • Download URL: nlpir_python-0.9.12-py3-none-win_amd64.whl
  • Upload date:
  • Size: 40.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.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.12-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6629a21bc2e93a45d5dbb8ce0f1004a41d15d7d55e50b03b003a997faaa24eae
MD5 e2a6f2d1959a708b1cddfdb42d5afc41
BLAKE2b-256 200a746fda8747429a28a34688dea38e62914b71e0e49dcfd4f0dcf9823177a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.12-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 56.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.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.12-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7bc0a4f781fb4365e0845e0dbba522301dae3749923990d34b23092cbdf38d1f
MD5 0f68277b67788560472a06545aa56991
BLAKE2b-256 7b4e729d5dabc4635af367d41379e72a897cfd0d8beb149504be93e7f9b806ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.12-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 56.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.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.12-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8027c9e0eb3911f838bbe00f6d6bc40925af404b2ceb2c4e7baca468a04bc091
MD5 2accbd4f2c366d1c8b3788eb1383713a
BLAKE2b-256 8c824ccb0685c01e9546b74dd2e2f5beb5443f86527bbcf404eb0e97cc680947

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.12-py3-none-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 46.9 MB
  • Tags: Python 3, macOS 11.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.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.12-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e3bf30ff02294c76fde8d05d4912ee139f7d1ceb991ad18d3febb92b91ef4174
MD5 49c94e65e1e6dfc3a543f360f387c963
BLAKE2b-256 e111121ec925f561a652532c2338db3f25196c8413017fc15c419f8354e60b3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.12-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 46.9 MB
  • Tags: Python 3, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.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.12-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3c970697eb0d629ca3738b00d98414d30df1f30ec1dc6a2662b649a672ebb719
MD5 112b2808db1c3fef18ff91eaad38e6d1
BLAKE2b-256 d1fd2621683ec84f05eefcc7603fca15d8c5ec78bbf14157ebe098398182cbd0

See more details on using hashes here.

File details

Details for the file nlpir_python-0.9.12-py3-none-any.whl.

File metadata

  • Download URL: nlpir_python-0.9.12-py3-none-any.whl
  • Upload date:
  • Size: 94.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 3bc5472cb6eabe716461adc434968f05329db01b4fca6e043304e671af3dc325
MD5 62f667a7158ca04aae486e0969709bb8
BLAKE2b-256 3fa307d89d0568809f71401952f3f61a921c6c9be14010b50d3376edb8720069

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