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

Uploaded Python 3 Windows x86-64

nlpir_python-0.9.7-py3-none-macosx_11_0_x86_64.whl (37.0 MB view details)

Uploaded Python 3 macOS 11.0+ x86-64

nlpir_python-0.9.7-py3-none-macosx_10_9_x86_64.whl (37.0 MB view details)

Uploaded Python 3 macOS 10.9+ x86-64

nlpir_python-0.9.7-py3-none-any.whl (84.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nlpir_python-0.9.7-py3-none-win_amd64.whl
  • Upload date:
  • Size: 30.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 211a57eebe7ccf8e304ee1c5893c61d0b9443be0c618ed31724b70a901e5e7e4
MD5 fc25a775ab2e684da3343fdeb4fbc66a
BLAKE2b-256 13f399cc5413fb78aababdeb5359a094fb6cb35b401ee198cc28c455220bb037

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.7-py3-none-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 46.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.7-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8971990634dbc1c68a3db13f8daa80f3eaa86a8f2f1852f4cbff79ba9ec9df86
MD5 d0dff752ddf7a840c0084e320151b8a9
BLAKE2b-256 0c9e8d742bb64dca18550fcd05e1886ebecfcc3ede40e016c4732b534cd078af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.7-py3-none-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 46.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.7-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8809b2524d0fbbace86be14b428a7e8bc9568b7cdb8c67f6baa26bb38c8bed48
MD5 e1a072fe5b979abb377c2874513d7a63
BLAKE2b-256 b38fc27538af0213e878610a8ce2a14d406ffa42d1624f4550f85b16204aaf4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.7-py3-none-macosx_11_0_x86_64.whl
  • Upload date:
  • Size: 37.0 MB
  • Tags: Python 3, macOS 11.0+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.7-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c25a3cfa381d7750e2714d793da78c6067316acbc6294816f22b79d3837ab038
MD5 2481e80476a12fb1235a2c85bd24922a
BLAKE2b-256 aa43cf56d8384d94ca34e9e1ea50e28ea545f33578f3cc101f8b0c3896bbad48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.7-py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 37.0 MB
  • Tags: Python 3, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.7-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 63c5ba85cdaeebab874456ac6cb5bcc10ea566356bdd11ea89dc6404b303feb0
MD5 babc8fdbb3561c252466a386a44d7361
BLAKE2b-256 f8e7c4037879912f2bf9159db252d74efe973eb99ddd646a203417b2a212cc54

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nlpir_python-0.9.7-py3-none-any.whl
  • Upload date:
  • Size: 84.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for nlpir_python-0.9.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f3107e66c692e9efeeefb98e2c2907ada643d9018096303cb53a9c4f65b9f8a2
MD5 ae07d8430397ad2560a1bcd6615db8d1
BLAKE2b-256 79f58fbb79cf5303b86ef0e62cb225e6a38b61be79ebed7ce16b6dfcc259bdd0

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