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

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.13-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.13-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.13-py3-none-any.whl (96.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlpir_python-0.9.13-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.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.13-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 022a169d6c45d9c01d72e801578b778d9043f265820c6d18cda65ae197b8830c
MD5 fb964e8d8341219ea50ac1abf85ba0fc
BLAKE2b-256 3c474609088fc97a8e6d66653e0253012adf4fa91c7ae42b28c507bcc66c8a63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.13-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 56.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.13-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9161c9756e2a8f952c1eb22d46a78fb10b8f58f8fc16128ffd77e129a545ee00
MD5 41cf6f385bb6777b4d97beb6d08f25f0
BLAKE2b-256 d966bf9a1b9aa3342aeac6745eb5f96db6ecc1a3282743a0afb8cfc9848a5b4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.13-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 57.8 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.13-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c5536b2af6771077609e21dd1d42beaa4b3008da15ca7b7343fd9fc96aab259
MD5 a5182a37c9dbf901b3da95b125a76b67
BLAKE2b-256 ac30d0d93e8ba095080d008ac4845348dfeeff046939da383cabcbafb5b93b2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.13-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.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.13-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 08a7af85d13858932e41ee78f3f4d9740da3127087b41aa57fdff429c5503ea7
MD5 e90a243677838841eebb023adc1e7a5c
BLAKE2b-256 8fc2ef1261e515a931f79d9272e95830b2972582a0a4ad57000dcb9e614c4b46

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.13-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.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.13-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 be2c9a89d433b07e2eaa3682b006ede5cb7c3aa6c21f9f118f3f753e04e20d9b
MD5 86e462e299c743dd75b9b77099cd8bb6
BLAKE2b-256 7b4df2d702966372e5892367283779f2d1b76ac14f4cf5b43f7e4973b49cac8a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.13-py3-none-any.whl
  • Upload date:
  • Size: 96.2 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.13-py3-none-any.whl
Algorithm Hash digest
SHA256 d0692d966c87e72506fba388f513e92d3403890b4f44aebccd989f0fbe9c6a59
MD5 1754993bbdee5bde3578773e4395bf55
BLAKE2b-256 6e629ed0e5606e15eec4b9d605ec8a0da35dc6512ee4c968523c08f623ad966a

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